Hello,
I'd be curious to hear thoughts on my database and table design. I posted another question recently but this is for a different design question.
My database is for 'space use' in a lodging facility - will eventually hold all spaces, like rooms (lodging rooms, dining areas, public areas), grounds, bathrooms, hallways, etc. User would like to keep track of items in the space as well, and the condition of items, so he can budget when it's time to replace them. He does not want to track specific items, with tags or codes or anything like that.
For the items, I have an Item Table, which contains all the different types of items and their description. The Room Table contains fields for all items in a room: door, carpet, paint, chair, closet, and many more, and each of these items is populated with data from the Item Table. For each item in the Room Table, I also have a 'Condition' field (DoorCond,
CarpetCond, PaintCond, ChairCond, etc). Condition is kept as a number from 1 to 5. For Beds and Windows, I set up 2 additional tables. tblBed has PK of RoomNumber + BedNumber. tblWindow has PK of RoomNumber + WindowNumber. I did this so there could be an infinite number of beds for a room (they have dorms with 25 beds), and windows for a room. (I have not set up any other spaces yet besides Guest Lodging, so as to get this piece finished fast).
I am now questioning my design. Would there have been a better way to keep track of a room's items and their condition? What about the possibility of endless amounts of items - for example, lamps in a room. I made lamp1, lamp2,lamp3, lamp4 fields on the Room table, but not crazy about this solution. But, if I made a separate RoomItem table (Item ID + Room it is assigned to), I am afraid this would quickly become inaccurate, as user does not want to track items, and items do get switched around. So if a lamp is switched among rooms, the RoomItem table would be inaccurate. If items were permanently assigned to a room, I would prefer this design route.
Any suggestions?
Thanks in advance,
Lori
I'd be curious to hear thoughts on my database and table design. I posted another question recently but this is for a different design question.
My database is for 'space use' in a lodging facility - will eventually hold all spaces, like rooms (lodging rooms, dining areas, public areas), grounds, bathrooms, hallways, etc. User would like to keep track of items in the space as well, and the condition of items, so he can budget when it's time to replace them. He does not want to track specific items, with tags or codes or anything like that.
For the items, I have an Item Table, which contains all the different types of items and their description. The Room Table contains fields for all items in a room: door, carpet, paint, chair, closet, and many more, and each of these items is populated with data from the Item Table. For each item in the Room Table, I also have a 'Condition' field (DoorCond,
CarpetCond, PaintCond, ChairCond, etc). Condition is kept as a number from 1 to 5. For Beds and Windows, I set up 2 additional tables. tblBed has PK of RoomNumber + BedNumber. tblWindow has PK of RoomNumber + WindowNumber. I did this so there could be an infinite number of beds for a room (they have dorms with 25 beds), and windows for a room. (I have not set up any other spaces yet besides Guest Lodging, so as to get this piece finished fast).
I am now questioning my design. Would there have been a better way to keep track of a room's items and their condition? What about the possibility of endless amounts of items - for example, lamps in a room. I made lamp1, lamp2,lamp3, lamp4 fields on the Room table, but not crazy about this solution. But, if I made a separate RoomItem table (Item ID + Room it is assigned to), I am afraid this would quickly become inaccurate, as user does not want to track items, and items do get switched around. So if a lamp is switched among rooms, the RoomItem table would be inaccurate. If items were permanently assigned to a room, I would prefer this design route.
Any suggestions?
Thanks in advance,
Lori