0

I have table called Services and I want to make another table that have the Categories of services ( One-to-Many ) What's the best approach i can use to naming it is it one of the following ?

ServiceCategoreis
ServicesCategoreis
Serviecs_Categories
CategoriesOfServices

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Hotmoil
  • 623
  • 1
  • 7
  • 15
  • possible duplicate of [SQL Join Table Naming Convention](http://stackoverflow.com/questions/1764483/sql-join-table-naming-convention) and http://stackoverflow.com/questions/2705775/with-database-table-design-is-there-an-advantage-of-using-special-naming-convent and http://stackoverflow.com/questions/1813321/what-should-i-name-a-table-that-maps-two-tables-together – Martin Smith Aug 28 '10 at 10:46
  • Ah actually - All these supposed duplicates are many-to-many not one-to-many. Sorry about that! – Martin Smith Aug 28 '10 at 11:32

2 Answers2

1

You will find the "best" naming convention to be purely subjective. The database architects at my company argue that ALL_CAPS_UNDERSCORED_AND_SUFFIX is the "best" way to name database tables, which is unfortunate.

That said, I usually choose a naming convention that flows like natural speech, favoring a table name such as ServiceCategories, because the table contains "service categories".

A common point of discussion is whether to pluralize or singularize the table name (e.g., ServiceCategory vs. ServiceCategories). As more object relational mappers such as Linq-to-Sql, employ de-pluralizer techniques, I find that there's not much ground for dogmatically sticking to one practice or the other. It is probably in your best interest to decide once whether to pluralize or singularize your table names, then stick to it.

kbrimington
  • 25,142
  • 5
  • 62
  • 74
0

ServiceCategory

One row is one category for one service...?

gbn
  • 422,506
  • 82
  • 585
  • 676