If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > could some1 check my improved design?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-04-07, 10:53
player123 player123 is offline
Registered User
 
Join Date: Mar 2007
Posts: 12
Wink could some1 check my improved design?

hi!

http://img77.imageshack.us/img77/1042/2345jl8.jpg

do i think that will work? and does it pass all 1st 2nd 3rd normal form?

thanks! )
Reply With Quote
  #2 (permalink)  
Old 04-04-07, 11:43
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Are you sure Employement details is a one to one relationship?

One employee can have one career record?
If so, why not include it in your employee table?

But I would think one employee can have more than one career record.
(left the company and rejoined...)
---
Account > employee relationship: Prove me wrong on this one!

It looks like you originally had a many to many relationship between employee and account - hence the customer_account table...
Now, can you explain to me why it was a many to many relationship?
__________________
George
Twitter | Blog
Reply With Quote
  #3 (permalink)  
Old 04-05-07, 07:42
player123 player123 is offline
Registered User
 
Join Date: Mar 2007
Posts: 12
hi! i want to keep one-to-one between the employee and employement_details otherwise the table gets too big. i dont need to worry about career records and so on. an employee can act as a banker to the customer, so a banker can have many customers, a customer can have 1 customer account, a customer_account can have many accounts. basically the customer_account table acts as an intersection entity.
Reply With Quote
  #4 (permalink)  
Old 04-05-07, 07:48
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
I'm unconvinced by your arguements here:
Quote:
Originally Posted by player123
... otherwise the table gets too big
Look at your two tables: If you dropped the Employment_Details tab and inserted StartDate and LengthOfEmployment into the Employee table, wouldn't that be LESS data?
[HINT: the answer in this case is "yes!"]
Quote:
Originally Posted by player123
i dont need to worry about career records and so on
Why don't you have to worry? Why are they there if you don't have to worry about them?

As for the many to many relationship jiggery:
Many customers can have many accounts?

That implies that:
- 1 Customer can have many accounts
- 1 Account can have many customers
So can customers share accounts?
__________________
George
Twitter | Blog
Reply With Quote
  #5 (permalink)  
Old 04-05-07, 08:14
player123 player123 is offline
Registered User
 
Join Date: Mar 2007
Posts: 12
oh yeah ur right. i will merge the two tables. i dont know why i havent done that in first place. probably cause the whole of my design is rushed.
yes there was a many-to-many relationship, but it is problematic, thats why i have done a bridging table between them.
Reply With Quote
  #6 (permalink)  
Old 04-05-07, 08:17
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Quote:
Originally Posted by player123
yes there was a many-to-many relationship ...
Was? When creating the ER diagram just ask yourself:
Does:
One A have One B,
One A have many B or
Many A have many B ?
__________________
George
Twitter | Blog
Reply With Quote
  #7 (permalink)  
Old 04-05-07, 08:20
player123 player123 is offline
Registered User
 
Join Date: Mar 2007
Posts: 12
Reply With Quote
  #8 (permalink)  
Old 04-05-07, 08:29
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
From your diagram:
1 Branch has many employees
1 Employee has many customers
Many customers have many accounts
--> 1 customer has many accounts AND
--> Many accounts can have 1 customer

Tell me - does that seem right to you?
__________________
George
Twitter | Blog
Reply With Quote
  #9 (permalink)  
Old 04-06-07, 10:26
player123 player123 is offline
Registered User
 
Join Date: Mar 2007
Posts: 12
yes.........
Reply With Quote
  #10 (permalink)  
Old 04-07-07, 05:22
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,246
Quote:
Originally Posted by player123
yes.........
..fair enough

wearing my devils advocate cape (very fetching it is to....)

why would an account holder have a bank employee directly assigned to them
I would have thought the majority of the cases a person may hold multiple accounts with a branch and that should be the link not the employee.
Arguably in reality they may hold multiple accounts held at one or more branches.

they may have somebody allocated specifically to look after them, but on UK practise, unless they are stinking rich its unlikely that many will have a specific person allocated to the account. Mnay business acoutns have a notional business banker.. but in any event the account is run form the business banking centre, not run as part of the employees portfolio

by implementing it this way you are potentially creating a problem if say an employee moves to a new branch you will have to manually reallocate that employees accounts back to a new employee at the old branch

theoretically an employee can work at one or more branches (at least they do seem to in the Royal Bank of Scotland, does your real world situation have the same issue, if so can it handle that.

An account is unlikely to move branch unless its handled by a simple transaction. so to move an account between branchews you need to know who the new person handling the account will be, ratrher than say the old branch merely changing 'their' data the banks IBAN or sort code to the new branch and lkettign the new branch do what ever they want. you modle will force someone to move an account to a new person.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On