Home All Groups Group Topic Archive Search About

Sql Server 2005 - Schema Object

Author
7 Jun 2006 4:49 PM
S Chapman
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.

Author
7 Jun 2006 5:16 PM
David Browne
"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
Are all your drivers up to date? click for free checkup

Author
8 Jun 2006 8:18 AM
S Chapman
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
Author
8 Jun 2006 3:00 PM
David Browne
"S Chapman" <s_chapma***@hotmail.co.uk> wrote in message
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
>

Good naming is more of an art than a science.  Personally I'm inclined
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



Post Thread options