Results 1 to 3 of 3
  1. #1
    neo651 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Posts
    110

    Relationships


    I'm new to Access and the concept of Normalization.

    I manage my company's devices (computers, access points, switches, etc). I'm looking to keep tabs on our static IPs better so I'm creating a table that stores all IPs in a unique column so we don't get duplicates. The problem is that we have 14 different devices that have static IP addresses and these 14 devices are in 14 different tables. Now, this is where it gets tricky, I think, sometimes a device will have multiple IPs and sometimes one IP will belong to multiple devices.

    How do I accomplish this?

    Thank you.

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    I would use two tables. One for the devices:

    DeviseID (PK)
    DeviseName
    OtherInfo
    ...
    ...
    ...

    Second Table would hold the IP Addresses

    IPAddressID (PK)
    DeviseID (FK)
    IPAddress

    Then in a query, join the two tables on the DeviseID fields.

    Alan

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    If this is a many to many relationship you may need one table for devices, one table for IP addresses and a junction table that shows the deviceID and the IPID

    for instance

    Code:
    tblDevices
    DeviceID DeviceName
    1        Printer A
    2        Printer B
    3        Computer A
    4        Computer B
    
    tblIP
    IPID IPAddress
    1    111.222.333.444
    2    111.222.333.555
    Now let's say that printer A and computer A are both related to IP 111.222.333.444. And PrinterA, PrinterB and Computer B are all related to IP 111.222.333.555

    your junction table would look like

    Code:
    tblIPDevice
    IPDID IPID DeviceID
    1     1    1
    2     1    3
    3     2    1
    4     2    2
    5     2    4

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

Similar Threads

  1. One to One Relationships
    By ketbdnetbp in forum Database Design
    Replies: 1
    Last Post: 04-27-2011, 11:22 AM
  2. Relationships
    By bopsgtir in forum Database Design
    Replies: 1
    Last Post: 01-10-2011, 12:44 PM
  3. One to many relationships
    By CoachBarker in forum Database Design
    Replies: 1
    Last Post: 09-13-2010, 09:01 PM
  4. Too Many Relationships
    By MikeT in forum Database Design
    Replies: 4
    Last Post: 08-25-2010, 07:23 PM
  5. Relationships?
    By rosh41 in forum Database Design
    Replies: 2
    Last Post: 06-23-2010, 01:26 PM

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