|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Sql Server 2005 - Schema ObjectWe have tables that belong to distinct categories. Right now I am using
naming convention to keep them grouped together. Like for example all tables that belong to Reference Data area are prefixed with RD_ and so on. Is this an old concept? Should I really be using schemas? If schemas are the way fwd are there any pit falls? Thanks. "S Chapman" <s_chapma***@hotmail.co.uk> wrote in message This is one of the two main scenarios for using Schemas in 2005 (the other news:1149698987.337720.307670@h76g2000cwa.googlegroups.com... > > > We have tables that belong to distinct categories. Right now I am using > naming convention to keep them grouped together. Like for example all > tables that belong to Reference Data area are prefixed with RD_ and so > on. Is this an old concept? Should I really be using schemas? If > schemas are the way fwd are there any pit falls? Thanks. > is for security segregation). The only pitfall I can think of is that you only get one level of naming using schemas, so you should use it wisely. For instance you mention using RD_ for reference data, but you might also want to segrate by business area. So you have Sales and Production, but each has reference data. Do you use Sales.RD_Territory or RD.Sales_Territory ? Is is really appropriate to decorate the names of tables used a "Reference Data"? David Hi David, we have an app for Insurance purposes and tables fall into
only three distinct categories - exposure, loss and reference (like list of post codes, streets to name a few). So do you think it is a good idea to use schema rather than prefixes? Thanks David Browne wrote: Show quoteHide quote > "S Chapman" <s_chapma***@hotmail.co.uk> wrote in message > news:1149698987.337720.307670@h76g2000cwa.googlegroups.com... > > > > > > We have tables that belong to distinct categories. Right now I am using > > naming convention to keep them grouped together. Like for example all > > tables that belong to Reference Data area are prefixed with RD_ and so > > on. Is this an old concept? Should I really be using schemas? If > > schemas are the way fwd are there any pit falls? Thanks. > > > > This is one of the two main scenarios for using Schemas in 2005 (the other > is for security segregation). > > The only pitfall I can think of is that you only get one level of naming > using schemas, so you should use it wisely. > > > For instance you mention using RD_ for reference data, but you might also > want to segrate by business area. So you have Sales and Production, but > each has reference data. > > Do you use > > Sales.RD_Territory > > or > RD.Sales_Territory > > ? > > Is is really appropriate to decorate the names of tables used a "Reference > Data"? > > > David "S Chapman" <s_chapma***@hotmail.co.uk> wrote in message Good naming is more of an art than a science. Personally I'm inclined news:1149754720.530629.31310@j55g2000cwa.googlegroups.com... > > Hi David, we have an app for Insurance purposes and tables fall into > only three distinct categories - exposure, loss and reference (like > list of post codes, streets to name a few). So do you think it is a > good idea to use schema rather than prefixes? Thanks > against prefixes in the first place. Many people use them unnecessarily. Tables should names that are nouns or short noun phrases. I prefer singular nouns, but many people use plurals for tables. Prefixes or Schemas can be used to segregate tables, but only if it increases the readability of code or the managibility of the database. David
Help on grouping time
Insert a IF stmt in a stored proc same code in stored procedure 3 times slower than as transact sql IDENTITY column? Cascading updates question pivot table, calculated rows? if statement in where? sp_OAMethod & access violation errors Insert Data between tables Retieving Column Names of Table Valued UDF |
|||||||||||||||||||||||