Re: DB Architecture Questions (for joe celko)
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Wed, 06 May 2009 15:36:07 -0700
(sqlguru@xxxxxxxx) writes:
Question about the celko approach....
Take a simple user table for an example. In this case, if the only
"valid" unique identifier is the email address instead of a user_id,
the Celko's approach would have you use the email address as the
foreign key.....isn't a seek by a non-numerical value more expensive
than a numerical one??
More exactly, string columns are slower, since you have to take all
the collation rules into consideration.
Also, regarding the DAL.....access to methods are controlled within
the application layer. The DBA Team writes the ad-hoc queries (so they
are optimized) and send to the application architects to integrate
into the DAL. Because the DB model is based of the Business object
model, we know which columns are being used etc and we get full IDE
support (intellisense, reflection, dependancy check, compile-time
protection).
Not that I know how your model works, but since the IDE does not know
what is in those query strings, I doubt that you have full control
over column usage.
Regarding the statement about using SP because it's easier to quickly
fix a bug.....in an enterprise environment, you never "quickly" fix a
bug. Everything is documented and has to go through a CMI request and
tested etc.
When the system has grinded to a standstill? Or when users need to
get that report, register that trade, whatever, NOW?
Of course, if the system you work is not business-critical, you can
afford the luxury of being rigid.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- Follow-Ups:
- Re: DB Architecture Questions (for joe celko)
- From: --CELKO--
- Re: DB Architecture Questions (for joe celko)
- References:
- DB Architecture Questions (for joe celko)
- From: sqlguru
- Re: DB Architecture Questions (for joe celko)
- From: --CELKO--
- Re: DB Architecture Questions (for joe celko)
- From: sqlguru
- DB Architecture Questions (for joe celko)
- Prev by Date: Re: Multiple lookup tables
- Next by Date: Re: DB Architecture Questions (for joe celko)
- Previous by thread: Re: DB Architecture Questions (for joe celko)
- Next by thread: Re: DB Architecture Questions (for joe celko)
- Index(es):
Relevant Pages
|