A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Relationship setup - CAFM



 
 
Thread Tools Display Modes
  #1  
Old April 1st, 2009, 11:42 PM posted to microsoft.public.access.tablesdbdesign
vbcraft
external usenet poster
 
Posts: 23
Default Relationship setup - CAFM

Hi,
Maybe someone can help me with a relationship setup for the following senario:
I have the following tables, furniture, Building, Floor, and RoomCode.
I want to have in my furniture table the building_id, floor_id, and room_id.
I want to create relationships which would enforce referential integrity. I
have tried to set this relationship up but I get errors.
Point me to any example and I would really appreciate it.
FYI Building table has building_id (makes PKEY)
Floor table has building_id and floor_id (both make PKEY)
RoomCode table has building_id and floor_id and room_id (all three make PKEY)
--
Thank you,
vbcraft
  #2  
Old April 2nd, 2009, 12:36 AM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Relationship setup - CAFM

Seems to me you only need three tables --
Building --
BLDG_ID - autonumber - primay key
BLDG_Name
Floor
RoomCode
Purpose

Furniture --
FurnID - autonumber - primay key
FurnType - text - chair, table, bookcase, desk, etc.
QTY - number

BLDG_Furn --
BLDG_FurnID - autonumber - primay key
FurnID - number - long integer - foreign key
BLDG_ID - number - long integer - foreign key

Set one-to-many between Building and BLDG_Furn. Also one-to-many between
Furniture and BLDG_Furn.

Use form/subform for Building to BLDG_Furn (Furniture), using a combo box to
select Furniture. Use BLDG_ID for Master/Child links.
Use separate form/subform for Furniture to BLDG_Furn (Building), using a
combo box to select Building. Use FurnID for Master/Child links.

"vbcraft" wrote:

Hi,
Maybe someone can help me with a relationship setup for the following senario:
I have the following tables, furniture, Building, Floor, and RoomCode.
I want to have in my furniture table the building_id, floor_id, and room_id.
I want to create relationships which would enforce referential integrity. I
have tried to set this relationship up but I get errors.
Point me to any example and I would really appreciate it.
FYI Building table has building_id (makes PKEY)
Floor table has building_id and floor_id (both make PKEY)
RoomCode table has building_id and floor_id and room_id (all three make PKEY)
--
Thank you,
vbcraft

  #4  
Old April 2nd, 2009, 01:07 AM posted to microsoft.public.access.tablesdbdesign
vbcraft
external usenet poster
 
Posts: 23
Default Relationship setup - CAFM

I will look into these suggestions! thank you so much!
--
Thank you,
vbcraft


"KARL DEWEY" wrote:

Seems to me you only need three tables --
Building --
BLDG_ID - autonumber - primay key
BLDG_Name
Floor
RoomCode
Purpose

Furniture --
FurnID - autonumber - primay key
FurnType - text - chair, table, bookcase, desk, etc.
QTY - number

BLDG_Furn --
BLDG_FurnID - autonumber - primay key
FurnID - number - long integer - foreign key
BLDG_ID - number - long integer - foreign key

Set one-to-many between Building and BLDG_Furn. Also one-to-many between
Furniture and BLDG_Furn.

Use form/subform for Building to BLDG_Furn (Furniture), using a combo box to
select Furniture. Use BLDG_ID for Master/Child links.
Use separate form/subform for Furniture to BLDG_Furn (Building), using a
combo box to select Building. Use FurnID for Master/Child links.

"vbcraft" wrote:

Hi,
Maybe someone can help me with a relationship setup for the following senario:
I have the following tables, furniture, Building, Floor, and RoomCode.
I want to have in my furniture table the building_id, floor_id, and room_id.
I want to create relationships which would enforce referential integrity. I
have tried to set this relationship up but I get errors.
Point me to any example and I would really appreciate it.
FYI Building table has building_id (makes PKEY)
Floor table has building_id and floor_id (both make PKEY)
RoomCode table has building_id and floor_id and room_id (all three make PKEY)
--
Thank you,
vbcraft

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:51 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.