Results 1 to 3 of 3
  1. #1
    mcarvell is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    1

    Lightbulb Inventory Database Design Help - Conditional Relationships?

    I work for a university and I am setting up an Access Database to track locations of computers and other items. There are a few tables and I will explain what is contained within each one.

    Main Inventory/Location Table contains [Inventory]:

    Unique University TAG Number
    Serial Number
    Building Code
    Room Number
    Station Number
    Item Description
    etc...

    Table which contains information on each computer [SPECS]:

    Unique University Tag
    MAC Address
    Processor
    Memory
    etc...

    Station I.P. Addresses [STATIONIP]

    Building Code
    Room
    Station Number
    I.P. Address

    Question:


    The goal is to have a query that will show each station with the items located at its station along with the computer's specs and the I.P. address.

    Currently I have a relationship set up from [Inventory] to [SPECS] using the University TAG Number. Also I have a relationship which relates the [Inventory] to [STATIONIP] by using the Building Code, Room, Station Number.

    The problem is that this obviously associates an IP address to items which are not computers, such as monitors and projectors. Brainstorming I realize that items should only have an IP Address if the University TAG for the item is on the [SPECS] table. Is there a way I can do some sort of conditional relationship so that it only relates the I.P. address to the [Inventory] if the item is contained on the [SPECS] table? I assume this would involve visual basic coding.



    I posted in the section in case someone has an idea for how to change the structure of the database by changing tables or anything that would allow a better end result. The main idea is to have the location for each item be in only one table. Also the I.P. addresses are strictly set no matter what computer is at that station, this is why I have these in a separate table.

    MAC Addresses are unique to each computer but could from time to time be changed if a network card fails, so I wanted to keep it in one table as well, however maybe something clever could be done with changes cascading. I have tried thinking up several different ways to setup these relationships to make this query work well. Struggling I come to you for help =]

    Thank you in Advance!

  2. #2
    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,726
    Get a data model set up to support your needs. Use some test conditions to validate your tables and relationships.
    Get your tables designed before getting too deeply involved with forms and queries.

    You may get some ideas from this site, but you have some specific issues beyond this model
    http://www.databaseanswers.org/data_...sets/index.htm

    I recommend you DO NOT USE spaces or special characters in field or object names. It will lead to syntax issues with time.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Never heard of 'conditional' relationships and don't think is possible, not even with code.

    Options appear to be a Tag field in IP addresses table or IP address in Inventory instead of relating on Building Code, Room, Station Number
    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.

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

Similar Threads

  1. Database Design/Relationships
    By sloft21 in forum Access
    Replies: 1
    Last Post: 10-31-2012, 09:07 PM
  2. Software Inventory Database Design
    By andy1970 in forum Database Design
    Replies: 1
    Last Post: 06-22-2012, 07:00 PM
  3. Inventory/Forecast Database Design
    By jadown in forum Database Design
    Replies: 6
    Last Post: 06-11-2012, 02:54 PM
  4. database design: conditional drop-downs?
    By sebeckett in forum Access
    Replies: 5
    Last Post: 09-05-2011, 12:46 PM
  5. Database design for simple inventory
    By toptech in forum Database Design
    Replies: 12
    Last Post: 10-24-2009, 07:24 AM

Tags for this Thread

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