SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


If I understand Views VS Functions correctly...I should use views to enapsulated commonly used where...


If I understand Views VS Functions correctly...I should use views to enapsulated commonly used where clauses?

Author
Message
Phillip.Putzback
Phillip.Putzback
SSC Veteran
SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)

Group: General Forum Members
Points: 249 Visits: 227
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?
below86
below86
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1811 Visits: 2742
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.

-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Sean Lange
Sean Lange
SSC Guru
SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)

Group: General Forum Members
Points: 65144 Visits: 17979
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 Modens 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)
below86
below86
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1811 Visits: 2742
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.

-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search