March 19, 2013 at 4:38 pm
we are creating a new database maintaining address and in the future may have more into the databases.
I have a question about the nameing convention for database tables.
We used to have a standard to give a prefix of 3 letters for a table to group them together functionally, like schSchoolProgram, schAssignment, appProcess, secUsers.
Is this a good way to name tables, I found sometimes it is hard to mention the table, I have to spell out the first 3 characters when I talk to someone about the tables.
For the new database, when creating tables, shall I just use the plain names, like Address instead of addrAddress, StudentHomeAddress instead of addrStudentHomeAddress?
Also for domain tables shall I just: City, County instead of domCity, domCounty?
Thanks
March 19, 2013 at 5:45 pm
sqlfriends (3/19/2013)
...when creating tables, shall I just use the plain names, like Address instead of addrAddress, StudentHomeAddress instead of addrStudentHomeAddress?Also for domain tables shall I just: City, County instead of domCity, domCounty?
Thanks
That is the right decision and very good practice! Don't prefix or suffix your tables.
If you want to group your tables logically or by any another means - use schemas!
March 19, 2013 at 5:47 pm
Eugene Elutin (3/19/2013)
sqlfriends (3/19/2013)
...when creating tables, shall I just use the plain names, like Address instead of addrAddress, StudentHomeAddress instead of addrStudentHomeAddress?Also for domain tables shall I just: City, County instead of domCity, domCounty?
Thanks
That is the right decision and very good practice! Don't prefix or suffix your tables.
If you want to group your tables logically or by any another means - use schemas!
Thanks, besides using schemas, what other options I could use to group them logically?
Thanks,
March 19, 2013 at 6:02 pm
sqlfriends (3/19/2013)
Eugene Elutin (3/19/2013)
sqlfriends (3/19/2013)
...when creating tables, shall I just use the plain names, like Address instead of addrAddress, StudentHomeAddress instead of addrStudentHomeAddress?Also for domain tables shall I just: City, County instead of domCity, domCounty?
Thanks
That is the right decision and very good practice! Don't prefix or suffix your tables.
If you want to group your tables logically or by any another means - use schemas!
Thanks, besides using schemas, what other options I could use to group them logically?
Thanks,
You can keep your tables in separate databases if you really want to keep them so grouped and separate from each other...
But in a single database:
Using schemas is the best way.
Using prefixes - is the worst one.
I don't think that there is another way to group tables "logically".
Keep in mind, that if your common queries will involve tables from multiple "logical" groups, then you better not to group them at all. As your database is a kind of logical group of tables itself...
Keep it simple, create all your main tables under dbo schema.
If you have some specific data (let say application configuration) which you want separate logically from your core data, you can create config schema and and make all relevant objects (tables, views and stored procs) part of this schema.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy