On one hand, we're talking a city government site so changing DB is not
something that they'll probably ever do. On the other, the underscore
prefix is unsupported and may lead to problems down the road, especially if
my spec is used by others outside of this contract. It may even lead to
problems inside the contract if copied by people without thought to other
places or if people decide to use something else other than an underscore
(like a $ or #).
I wanted to have some logical and easily observed divider between tables
with 'live' data and those which will rarely, if ever, change. A prefix is
the best way to do this but I can't trust either people or the future.
Guess I have to do a small rewrite. Luckily, the look-up tables I did with
the underscore prefix are all in a component or two so its a fast fix. Now
all I have to do is find a way to hammer into my managers head that stored
procedures are NOT the way to separate database from application logic. :(


On Wed, Jan 22, 2014 at 9:09 AM, Cameron Childress <camer...@gmail.com>wrote:

>
> On Tue, Jan 21, 2014 at 12:28 PM, Michael Dinowitz wrote:
>
> > I use an underscore for look-up tables in an MS SQL2008 DB. To me, a
> > look-up table is anything that will almost never change. Things like
> > _roles, _states, _ethnicity.
>
>
> I've run into enough problems with special characters at the beginning of
> variable names that I totally avoid anything but letters to start anything.
> Variables, tables, columns, whatever. I would also be more likely to come
> up with something like states_lk if you want to call them out specifically.
> Even if it works in the DB you are using today you never know when, 20
> years down the road, someone may port this to another platform where this
> becomes a problem.
>
> Plain Jane keeps you sane.
>
> However, I usually don't treat lookup tables any differently than other
> tables. I like them to appear alphabetically alongside all the other tables
> when I am looking at a listing in my database tool.
>
> -Cameron
>
> --
> Cameron Childress
> --
> p:   678.637.5072
> im: cameroncf
> facebook <http://www.facebook.com/cameroncf> |
> twitter<http://twitter.com/cameronc> |
> google+ <https://profiles.google.com/u/0/117829379451708140985>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3527
Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/sql/unsubscribe.cfm

Reply via email to