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


Database design


Database design

Author
Message
karthik M
karthik M
SSCertifiable
SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)

Group: General Forum Members
Points: 6845 Visits: 2586
I want to know about Database design. If we think about 'DataBase Design', which would trigger first in our mind ?

Pls dont tell 'do a search'. I am expecting some good answers from best experts.

karthik
GilaMonster
GilaMonster
SSC Guru
SSC Guru (225K reputation)SSC Guru (225K reputation)SSC Guru (225K reputation)SSC Guru (225K reputation)SSC Guru (225K reputation)SSC Guru (225K reputation)SSC Guru (225K reputation)SSC Guru (225K reputation)

Group: General Forum Members
Points: 225779 Visits: 46321
First questions that come to mind.

What's the database for?
What's going to be stored in it, for how long and why?
Who's going to be using this and how?

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


abmore
abmore
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1557 Visits: 931
Hi karthikeyan,
when we think abount DB Design the 1st trigger comes in mind is DDL trigger on database.

Trigger depends on the requirements.
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)

Group: General Forum Members
Points: 216138 Visits: 41986
"3rd Normal Form"

Heh... Look it up Wink

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
karthik M
karthik M
SSCertifiable
SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)

Group: General Forum Members
Points: 6845 Visits: 2586
whcih one should comes to mind ?

3 rd normal form
(or)
What's the database for?
What's going to be stored in it, for how long and why?
Who's going to be using this and how?
(or)
both

karthik
abmore
abmore
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1557 Visits: 931
absolutly correct karthikeyan, but beforeDB design we need to analyze do we really need a trigger. If yes the for what purpose we will desing it , trigger may be on table or on database (in Sql 2005 ) so it depends upon the user as well as on developer also.

If suppose DB dev. want to maintain DDL log audit on database then will write a DB trigger.
if want to maintain any table audit will create trigger on tables.
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)

Group: General Forum Members
Points: 216138 Visits: 41986
Ahbijit,

Karthick doesn't need a "trigger"... what he said was...
I want to know about Database design. If we think about 'DataBase Design', which would trigger first in our mind ?

... and where he said "which would trigger first in our mind?", he meant "What should be the first thing we take into consideration when designing a database?

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)

Group: General Forum Members
Points: 216138 Visits: 41986
3 rd normal form
(or)
What's the database for?
What's going to be stored in it, for how long and why?
Who's going to be using this and how?
(or)
both

Both... you cannot design a database in correct 3rd normal form without knowing the rest "what's going to be stored in it".

The "how long" and "who's going to be using this and how" actually doesn't matter much. Whether it's for a GUI or Batch File processing doesn't matter because it should always be able to do both.

If you're talking a "data mart", then that's something different. Frequently, they are both pre-summarized and somewhat "de-normalized" for performance reasons.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Matt Miller (4)
Matt Miller (4)
One Orange Chip
One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)

Group: General Forum Members
Points: 29647 Visits: 19006
Jeff Moden (11/26/2007)
3 rd normal form
(or)
What's the database for?
What's going to be stored in it, for how long and why?
Who's going to be using this and how?
(or)
both

Both... you cannot design a database in correct 3rd normal form without knowing the rest "what's going to be stored in it".

The "how long" and "who's going to be using this and how" actually doesn't matter much. Whether it's for a GUI or Batch File processing doesn't matter because it should always be able to do both.

If you're talking a "data mart", then that's something different. Frequently, they are both pre-summarized and somewhat "de-normalized" for performance reasons.


3NF kind of entails that you know what the "database is for". Keep in mind that the single question "what's the DB for" represents a whole (often iterative) process describing in detail what the DB is for. You need to have an idea of the breadth and depth of the data you need to collect (let's call that the "universe"); you then need to organize your universe into items that naturally go together (let's call them "entities"), and then determine how your entities should relate to each other. Then, using 3NF, you then start looking at your ENTITIES, and try to make sure that THEY don't need to be broken up and organized into more granular entities, etc...

This is not a single question anymore, as you can see. It's an intricate process, requiring involvement from both the business, dev and data areas in most cases.

----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
GilaMonster
GilaMonster
SSC Guru
SSC Guru (225K reputation)SSC Guru (225K reputation)SSC Guru (225K reputation)SSC Guru (225K reputation)SSC Guru (225K reputation)SSC Guru (225K reputation)SSC Guru (225K reputation)SSC Guru (225K reputation)

Group: General Forum Members
Points: 225779 Visits: 46321
Jeff Moden (11/26/2007)


The "how long" and "who's going to be using this and how" actually doesn't matter much.


I had a reason for writing those, but now I can't remember fully.

Hmmm.... Think it had to do with need for archiving and growth planning (how long). OLTP or decision support (ie, do we need to consider storing pre-computed averages, selective denormalisation, etc)

But those are more advanced concepts in DB design, and one of the biggest mistakes I see is people skipping intermediate steps to get to a final design.ie not bothering to normalise fully.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


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