Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

If I understand Views VS Functions correctly...I should use views to enapsulated commonly used where clauses? Expand / Collapse
Author
Message
Posted Monday, May 5, 2014 11:55 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, June 23, 2014 10:03 PM
Points: 47, Visits: 174
Do you use a naming convention for lookup tables so report writers have a way of noticing them before they go create their own? Their own schema or prefix perhaps?
Post #1567654
Posted Monday, May 5, 2014 12:05 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, July 25, 2014 2:51 PM
Points: 276, Visits: 1,003
We have a database that we store all of our 'reference' type tables like this. We just try to give it a descriptive name and let everyone know about it. (name of table/database, what values it contains and how to join to it) I think if you can get everyone on board with either one database to store this type of data or one common table prefix for these type of tables you should be able to limit any duplication.
Post #1567658
Posted Monday, May 5, 2014 12:15 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 11:55 AM
Points: 13,110, Visits: 11,941
Phillip.Putzback (5/5/2014)
Do you use a naming convention for lookup tables so report writers have a way of noticing them before they go create their own? Their own schema or prefix perhaps?


I agree with other poster who suggested using a separate database for this. That is a good idea. So is using a specific schema. Either of these two approaches is clean and manageable. Prefixes on object names are just ugly for a number of reasons and should be avoided.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1567664
Posted Monday, May 5, 2014 12:36 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, July 25, 2014 2:51 PM
Points: 276, Visits: 1,003
Sean Lange (5/5/2014)
Phillip.Putzback (5/5/2014)
Do you use a naming convention for lookup tables so report writers have a way of noticing them before they go create their own? Their own schema or prefix perhaps?


I agree with other poster who suggested using a separate database for this. That is a good idea. So is using a specific schema. Either of these two approaches is clean and manageable. Prefixes on object names are just ugly for a number of reasons and should be avoided.


It does make for some ugly, and long table names. Thats why we do the database, do that if you can. Schema would be my second option. You have to be careful when using the schema that someone doesn't create the same name different schema on same database and then accidentally delete both tables. That happened, once.
Post #1567675
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse