Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
token
Posting Yak Master
133 Posts |
Posted - 2012-10-28 : 14:31:21
|
| I have a database called 'Lookup' where I keep all my lookup tables that are used to make sense of the data held in other tables in other databases.Because my 'Lookup' database contains all lookup tables, I have to organise them by what type of data they hold. For example a few tables may be to do with Products, and some are to do with Education, while others are to do with Users.So far I am putting an abbreviation in front of the table names so I know what they hold e.g. prodSKU, eduAccreditation, userGenders.Does anyone agree with my way of doing this or have I got it fundamentally wrong somewhere? It feels like I am not following best practice so if anyone could please suggest how they would tackle it I'b be very thankful! |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2012-10-28 : 18:33:27
|
| This is a subject of great debate. What do I name my tables? Personally, I just like to name them for what they are, e.g, SKUs,Accreditation, Genders (do you really need a table for this?). If that doesn't seem enough to name that table decisively, I will then go to putting a table into a schema. For example, we have tables with states -- our state number and abbreviation for them -- which works for any line of business, but each line of business may have different needs for that basic table, like which lines of business are active for that state, which companies are licensed in that state, etc. Here, a table called ActiveStates may get complicated if it has to apply to all lines of business. But a table with a schema, like WorkComp.ActiveStates, CommAuto.ActiveStates or WorkComp.LicensedCompanies, etc. always makes sense. And you can maintain them easily.JimEveryday I learn something that somebody else already knew |
 |
|
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-10-28 : 20:33:01
|
| To add to what Jim already said which I concur with, one of the things I try to do, at least of late, is to use a consistent naming convention. For the most part, as long as you are consistent, it does not matter.There are ISO standards on naming conventions etc. which some people are fond of, but I found them to be too dense and too rigid. A related thread, which may or may not be useful for you: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=158521 |
 |
|
|
token
Posting Yak Master
133 Posts |
|
|
|
|
|
|
|