944,167 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Jun 29th, 2007
0

How to convince my boss that normalisation is best

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Ebots is offline Offline
1 posts
since Jun 2007
Jun 29th, 2007
0

Re: How to convince my boss that normalisation is best

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.
Reputation Points: 10
Solved Threads: 2
Light Poster
sibir1us is offline Offline
30 posts
since Jun 2007
Jun 29th, 2007
0

Re: How to convince my boss that normalisation is best

Click to Expand / Collapse  Quote originally posted by Ebots ...
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
Reputation Points: 22
Solved Threads: 19
Posting Whiz
DenisOxon is offline Offline
345 posts
since Jan 2007
Jun 29th, 2007
0

Re: How to convince my boss that normalisation is best

Denis is Absolutely Right. Still, if his method doesn't work, I highly recommend mine.
Reputation Points: 10
Solved Threads: 2
Light Poster
sibir1us is offline Offline
30 posts
since Jun 2007
Jul 7th, 2007
0

Re: How to convince my boss that normalisation is best

Click to Expand / Collapse  Quote originally posted by sibir1us ...
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.
pty
Reputation Points: 64
Solved Threads: 39
Posting Pro
pty is offline Offline
530 posts
since Oct 2005
Feb 17th, 2009
0

Re: How to convince my boss that normalisation is best

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Asim Munir is offline Offline
1 posts
since Jan 2009
Feb 19th, 2009
0

Re: How to convince my boss that normalisation is best

Click to Expand / Collapse  Quote originally posted by Asim Munir ...
[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.
Sponsor
Featured Poster
Reputation Points: 557
Solved Threads: 735
Bite my shiny metal ass!
pritaeas is offline Offline
4,204 posts
since Jul 2006
Feb 25th, 2009
1

Re: How to convince my boss that normalisation is best

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?
Reputation Points: 13
Solved Threads: 0
Newbie Poster
tjuncewicz is offline Offline
2 posts
since Feb 2009
Feb 25th, 2009
0

Re: How to convince my boss that normalisation is best

Click to Expand / Collapse  Quote originally posted by DenisOxon ...
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.
Reputation Points: 13
Solved Threads: 0
Newbie Poster
tjuncewicz is offline Offline
2 posts
since Feb 2009
Feb 26th, 2009
0

Re: How to convince my boss that normalisation is best

Click to Expand / Collapse  Quote originally posted by tjuncewicz ...
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.
Sponsor
Featured Poster
Reputation Points: 557
Solved Threads: 735
Bite my shiny metal ass!
pritaeas is offline Offline
4,204 posts
since Jul 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: Boyce-Codd normal form
Next Thread in Database Design Forum Timeline: Criticize Me, Please.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC