How to convince my boss that normalisation is best

Reply

Join Date: Jun 2007
Posts: 1
Reputation: Ebots is an unknown quantity at this point 
Solved Threads: 0
Ebots Ebots is offline Offline
Newbie Poster

How to convince my boss that normalisation is best

 
0
  #1
Jun 29th, 2007
Hi everyone,

I'm trying to convince my boss that using normalisation is the best way to design a database but he's a hacker rather than a coder and he's taking some convincing.

If we take the typical Staff\Department scenario as an example (where it would be possible for a new member of staff to not yet be assigned to a department, say - (this is similar to a problem we are trying to iron out at the moment)).

My intuition and all the text books I've ever read would say do this:

Staff
StaffId *
Name

Department
DepartmentId *
Name

StaffDepartment
StaffId
DepartmentId

However he would want to do this:

Staff
StaffId *
Name
DepartmentId (Nullable)

Department
DepartmentId *
Name

I can see his point-of-view but still want to do it the normalised way. If I can convince him that the performance of the database is better when normalised then it would sway him, but I'm no expert when it comes to indexes and table scans and the like.

Could somebody please explain if and why a normalised database performs better.

Many thanks in advance.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 30
Reputation: sibir1us is an unknown quantity at this point 
Solved Threads: 2
sibir1us's Avatar
sibir1us sibir1us is offline Offline
Light Poster

Re: How to convince my boss that normalisation is best

 
0
  #2
Jun 29th, 2007
I dont think explaining will help. You are a smart person, and i may suggest a different solution (it does help, if used the right way):

1. Go to your boss' office and say hello to him.
2. Pick a heavy book from his desk.
3. Hit him on the head with it.

In other words, dont waste your time explaining rather simple things.
******************
15 minutes of research can save you 50% or more. forum.feodorgeorgiev.com

***Need Web Hosting?
******************
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 319
Reputation: DenisOxon is an unknown quantity at this point 
Solved Threads: 15
DenisOxon's Avatar
DenisOxon DenisOxon is offline Offline
Posting Whiz

Re: How to convince my boss that normalisation is best

 
0
  #3
Jun 29th, 2007
Originally Posted by Ebots View Post
Hi everyone,


Staff
StaffId *
Name

Department
DepartmentId *
Name

StaffDepartment
StaffId
DepartmentId

However he would want to do this:

Staff
StaffId *
Name
DepartmentId (Nullable)

Department
DepartmentId *
Name

.

Hi

First off good luck convincing him that you are correct. (You are correct)


Relational databases should contain minimum amout of repeated data for following reasons.

a) Your bosses solution will need more disk space which meabs records take longer to load etc. Try calculating extra disk space required. You know how many records and field length allocated for department.

b) Multiple department entries (your bosses method) will lead to spelling mistakes will lead to bad reporting, etc.

Your method will allow for the department to be entered once. One possible spelling mistake, one place to update, etc.

Your method leads to easier reporting, less errors, less disk space used, quicker running.

Let us know how you get on please.

Denis
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 30
Reputation: sibir1us is an unknown quantity at this point 
Solved Threads: 2
sibir1us's Avatar
sibir1us sibir1us is offline Offline
Light Poster

Re: How to convince my boss that normalisation is best

 
0
  #4
Jun 29th, 2007
Denis is Absolutely Right. Still, if his method doesn't work, I highly recommend mine.
******************
15 minutes of research can save you 50% or more. forum.feodorgeorgiev.com

***Need Web Hosting?
******************
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 521
Reputation: pty is on a distinguished road 
Solved Threads: 37
pty's Avatar
pty pty is offline Offline
Posting Pro

Re: How to convince my boss that normalisation is best

 
0
  #5
Jul 7th, 2007
Originally Posted by sibir1us View Post
I dont think explaining will help. You are a smart person, and i may suggest a different solution (it does help, if used the right way):

1. Go to your boss' office and say hello to him.
2. Pick a heavy book from his desk.
3. Hit him on the head with it.

In other words, dont waste your time explaining rather simple things.
Not any old book will do; please use "A Relational Model of Data for Large Shared Data Banks" by Dr Edgar F Codd.
Note to self... pocket cup
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1
Reputation: Asim Munir is an unknown quantity at this point 
Solved Threads: 0
Asim Munir Asim Munir is offline Offline
Newbie Poster

Re: How to convince my boss that normalisation is best

 
0
  #6
Feb 17th, 2009
Dear,

Scenario by you:

Staff
StaffId *
Name

Department
DepartmentId *
Name

StaffDepartment
StaffId
DepartmentId

Scenario of your boss:

Staff
StaffId *
Name
DepartmentId (Nullable)

Department
DepartmentId *
Name

My Conclusion:
Database design always follows business rules.
1) If one staff member can be assigned only one department then your boss is right coz ur design allows multiple departments to one staff member (violation of business rule)

2) If one staff member can be assigned multiple departments then you are right and design of your boss fails.

Note: Both designs are normalized in their respective domain of business rules. A normalized database is not always the best solutions while keeping database performance and business rules in mind.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 831
Reputation: pritaeas will become famous soon enough pritaeas will become famous soon enough 
Solved Threads: 136
Sponsor
pritaeas's Avatar
pritaeas pritaeas is offline Offline
Practically a Posting Shark

Re: How to convince my boss that normalisation is best

 
0
  #7
Feb 19th, 2009
Originally Posted by Asim Munir View Post
[My Conclusion:
Database design always follows business rules.
1) If one staff member can be assigned only one department then your boss is right coz ur design allows multiple departments to one staff member (violation of business rule)
In my humble opinion, in this case you should still use the normalized version and add a unique key on the intermediate table, thus forcing one staffmember per department.

The solution with the unique also allows an easy change, should it in the future be possible for a staff member to work in two departments. Just remove the key. In the boss' version, you need to change the database AND your code.
Last edited by pritaeas; Feb 19th, 2009 at 7:13 am. Reason: Forgot point.
"If it is NOT source, it is NOT software."
-- NASA
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 2
Reputation: tjuncewicz is an unknown quantity at this point 
Solved Threads: 0
tjuncewicz tjuncewicz is offline Offline
Newbie Poster

Re: How to convince my boss that normalisation is best

 
1
  #8
Feb 25th, 2009
It seems like there are many DBAs lurking here :-) I say that because of the dogmatic adherence to normalization at all costs, even where it doesn't make practical sense to do so. As a previous poster pointed out, the business rules should determine if a 1:1 or 1:M. Setting up the database with an extra layer for 1:M, even if only 1:1, does more than just add useless schema, but adds more complexity to the DB for hapless coders writing business logic and UI.

One poster had mentioned that doing it your way means no code change when/if 1:M is later needed, but that may be untrue if the business object is designed to expose a single entity for department as opposed to a collection (which it should if the biz rules call for that). Not to mention any UI differences such a business rule change would cause.

At some point, ya gotta weigh dogmatic "normalize for all eventualities" thinking vs practicality and simplicity. I mean, if you had a status attribute for Staff, even though only one status could be attributed to a person at a time (working, non-working, terminated), would you still use this model "just in case"? Where does the madness end?
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 2
Reputation: tjuncewicz is an unknown quantity at this point 
Solved Threads: 0
tjuncewicz tjuncewicz is offline Offline
Newbie Poster

Re: How to convince my boss that normalisation is best

 
0
  #9
Feb 25th, 2009
Originally Posted by DenisOxon View Post
Hi

First off good luck convincing him that you are correct. (You are correct)


Relational databases should contain minimum amout of repeated data for following reasons.

a) Your bosses solution will need more disk space which meabs records take longer to load etc. Try calculating extra disk space required. You know how many records and field length allocated for department.

b) Multiple department entries (your bosses method) will lead to spelling mistakes will lead to bad reporting, etc.

Your method will allow for the department to be entered once. One possible spelling mistake, one place to update, etc.

Your method leads to easier reporting, less errors, less disk space used, quicker running.

Let us know how you get on please.

Denis
I must disagree with both point a and point b IF the business rule states that a Staff can only have only one department. In fact, point a would use more space if done the poster's way. Point b would/should not happen in either case.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 831
Reputation: pritaeas will become famous soon enough pritaeas will become famous soon enough 
Solved Threads: 136
Sponsor
pritaeas's Avatar
pritaeas pritaeas is offline Offline
Practically a Posting Shark

Re: How to convince my boss that normalisation is best

 
0
  #10
Feb 26th, 2009
Originally Posted by tjuncewicz View Post
One poster had mentioned that doing it your way means no code change when/if 1:M is later needed, but that may be untrue if the business object is designed to expose a single entity for department as opposed to a collection (which it should if the biz rules call for that). Not to mention any UI differences such a business rule change would cause.
Absolutely true, and I agree. My point was (didn't make it clear enough I think) that the 1-1 relation does not by definition need to be made by the business logic. My preference is to enforce rules on the DB side if you can. This does not mean it's always right, only something I've encountered along the way. For example, if you think you maybe moving to a new sql server (different brand), these db forced rules may get you into trouble, because the new db doesnt support them.
"If it is NOT source, it is NOT software."
-- NASA
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Database Design Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC