Results 1 to 7 of 7

Thread: Relationships?

  1. #1
    Join Date
    Mar 2004
    Posts
    16

    Relationships?

    Can you please check my relationships and suggest me any improvements?

    thanx
    Attached Thumbnails Attached Thumbnails relationships.jpg  

  2. #2
    Join Date
    Feb 2004
    Posts
    108
    Any brief description of requirements will help in understanding this model.

  3. #3
    Join Date
    Mar 2004
    Posts
    16
    By saying requirements what do you mean?
    It's a system for Car sales management....
    Basically the relationship I'm mostly not sure of is the one between the SaleItem and TBLservices & TBLCars...I want the user to enter the id of the item sold, but i want it to be taken from 2 different tables....like when someone buys a car, he'll enter the CarID in the same field he'd enter the serviceid if he bought a service...
    I hope I managed to explain it

  4. #4
    Join Date
    Feb 2004
    Posts
    108
    Yea, services and Car ... what if a customer wants to purchase both - he buys a car and purchases some service plan for the same car. Or already has a car and wants just to purchase some service. (Is it allowed?)
    I suggest it should have two entities - both carid and serviceid - preferably optional.
    Both are independent of each other.

    I assume the payment table is duplicated in the diagram.

  5. #5
    Join Date
    Mar 2004
    Posts
    16
    I don't wanna do that, because it will not look good when printing reports. I've been told to create an update query for that....

  6. #6
    Join Date
    Feb 2004
    Posts
    108
    But how do you distinguish carid from serviceid ?
    ok, you have different sequence/series for both ids. But every time you get the id, you'll have to search two different places to determine whether it's a carid or a serviceid.
    How will this be done in reports ?
    You can have a flag indicating the type of id.
    like .. if flag = 'C' then the id belongs to carid
    if 'S' then it's a serviceid.

    Update query ? Dont' know ...

  7. #7
    Join Date
    Mar 2004
    Posts
    3
    Why do you have two tblPayments? They look to be the same.

Posting Permissions

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