Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2006

    Arrow Unanswered: this is urgent!! Relationships

    I'm a new learner of how databases work...
    this is too urgent..
    i have two tables:
    customer [id,fname, lname, gender, membership, phone, address]
    preference [dvdtitle, genre, rentaldate, returned(yes/no)]

    how can i make a relationship between these two tables...

  2. #2
    Join Date
    Apr 2005
    Zagreb - Croatia

    Hello deulu!

    I suppose the field "Id" is a Primary key.
    In tbl "preference" put the field "PId" (Indexed YES, Duplicates OK).
    Link "Id" with "PId".

  3. #3
    Join Date
    Sep 2003
    Currently not at all.

    As Stef pointed out you need to add at 1 column to your Preference table. I would add 2 columns:

    1) A Preference ID column (Stef showed this)
    2) And a Customer ID column called say "cid" (same attibutes as the pid column)

    Make the pid column the primary key (as before)
    LINK/relate the Customer ID to the cid column as 1 to Many ...
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    I think you hgave a problme with your design
    how do you intend to cater for two or more people who prefer the same DVD?
    how do you intend to handle for the instance where someone may prefer the DVD so much that they rent it more than once, or rent more than one copy concurrently?
    is the totle of a DVD relevant to a customers preference.
    how do you expect to handle multiple custom,ers 'preferring' the same DVD?

    I would expect that a customers preference for a DVD would separate to the details of the DVD. IE I would expect to see another table containing details of DVD's. Your preferences table would then contian details of a customer and details of a DVD.

    Have a look at this to get a perspective on table design before you start to do to much actual table design.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts