Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

ERD design question

ERD design question

ERD design question

I have a table called Employee.
I want to place permanent address and current address.
What I thought was that Address table itself has got its own attributes like state,district so I cannot place a field inside the Employee table for the permanent and current address.
Therefore, I place a permanet_address and current_address field inside the Employee table and tried to create the links from the Address table. But, MS Access does not allow that. It says relationship already created.
What is the best design for this Permanent and Current address issue?...thanks

RE: ERD design question

I would use three tables as shown below:

Table: Employee
  PK - EmployeeID

Table: Address
  PK - AddressID
       Type (P = Perm; C = Current)

Table: Employee_Address
  PK = EmployeeID + AddressID


Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design

RE: ERD design question

what about if the address for joe is permanent but for his cousin who's staying with him, it's temporary?  sounds like they would need different addresses in your scheme, leslie

r937.com | rudy.ca

RE: ERD design question

and I would want it that way so that each Employee has his/her own address record even if they are living with their cousin.

RE: ERD design question

in that case, stuff the address(es) into the employee table


r937.com | rudy.ca

RE: ERD design question

Why do you need a many to many table join?  Are the addresses really unique?  I have seen systems where 2 families or 2 adults can have the same address.  However often people spell the street differently or some other thing and it is too combersome.  Then sometimes people may have a vacation home or a vacation address or may live at another address during the summer.  Or some people may actually have 2 full-time addresses.  Another thing is having one address for a location and another address like a post office box for mail for business only.  Then you may have phones that are home based and some that are not.  That is another nightmare.  Home Phone, Cell Phone, Fax Phone, Business Phone.

You should be able to have a joining table and a preferred address foreign key and have them both point to the same table.  Either that or on the joining table add an extra field for the type of address however you want to describe it.  In this way you can know what the preferred address is without reading joining to the address table and reading a table.  It really describes the join and not the address and nothing but the address.  There is nothing wrong with a join table having a field in it that better describes the join.  You can actually select on the join if that is the case.  Otherwise you would have to slece on one of the tables and then read multiple table entries in the join table, to find the correct join.

Anyway you could have a preferred Mail Address, or a designated Check Address.

If you do not like my post feel free to point out your opinion or my errors.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close