Results 1 to 5 of 5
  1. #1
    cysklement is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Sep 2013
    Posts
    15

    Confused with database relationship...

    Hi,



    I am creating a machine leasing and complaint database.

    I am confused whether a machine shall have a one to one relationship to a customer
    or
    a machine shall have one to many relationship.... Is there a database sample that I could look into..


    For instance, if a customer complain about a machine and let us know about the machine tag...we will able to find the customer info(search).....by keyin the machine tag who is currently leasing the machine. Then, when the machine is returned and leased by company B. Then he enter the machine tag again in the search box it will only show the details of the company B.. But then it will also keeps records of the previous company which has leased the machine before.....


  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Each machine can have many customers. Each customer can have many machines. That is many to many relationship. Requires a junction table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Determining relationships is done by examing (and testing) your business rules.

    As June pointed out

    A Machine may be leased to many Customers
    A Customer may lease 1 or Many Machines

    So your tables, initially, would be

    Customers
    Machines
    and a junction jcnCustomerLeasedMachine

    Customers------->jcnCustomerLeasedMachine<-------Machines

    Now, Complaints-- are all complaints about leased Machines? Could a Complaint be for another reason/topic?
    Do you want to know if a Complaint was resolved? Or had action taken?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Maybe the MS Customer Service template will be helpful http://office.microsoft.com/en-us/te...010206880.aspx
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Jim Connell is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    4
    The other responders are correct. You've hit a critical concept in building robust databases - table and relation structure.

    If you want a detailed approach to the problem you can't go wrong with Database Design for Mere Mortals by Hernandez.

    If you want a quick overview take a look at the Access Wizard Page

    http://custom-software.biz/accessWizard.html

    and do search on "normalization" and "relation".

    Hope this helps.
    Jim Connell
    Custom Software
    978-392-3462
    http://custom-software.biz
    Home of the Access Wizard

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Best Scheme for my third database relationship
    By Rizkidwip in forum Access
    Replies: 1
    Last Post: 04-29-2014, 12:11 AM
  2. Replies: 9
    Last Post: 04-22-2014, 11:09 AM
  3. Database Relationship Question
    By Leonidsg in forum Database Design
    Replies: 7
    Last Post: 03-22-2013, 11:00 PM
  4. Replies: 2
    Last Post: 09-07-2011, 06:00 AM
  5. Help in relationship for this Database
    By Nokia N93 in forum Database Design
    Replies: 1
    Last Post: 02-25-2011, 10:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums