Hotmoil
Hotmoil

Reputation: 633

How to name sql table and its category in sql server?

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

Upvotes: 1

Views: 323

Answers (2)

kbrimington
kbrimington

Reputation: 25652

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.

Upvotes: 0

gbn
gbn

Reputation: 432331

ServiceCategory

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

Upvotes: 0

Related Questions