I'm working on a database (I have a few related posts on here, and you guys have been very helpful). Basically its a database which stores customer information, building information, room information, and equipment information.
I've setup my relationships and run quite a few queries/test scenarios. Everything has tested out great. I do have a couple one to one relationships. I was hoping someone here could shed some light on this as far as best practices are. I've read one to one relationships are rarely needed.
One example is I have an equipment table which contains switch information. That is linked to my rooms table because equipment belongs in a room. A switch is in one room however one room can have many switches. So, I created a junction table with a one to many relationship on the rooms side (setting roomID to indexed, duplicated OK), and a one to one relationship on the equipment side (setting equipmentID as indexed, no duplicates).
Is it a good idea to do it this way or is it better to simply have a field for RoomID inside of my equipment table and setup a one to many relationship between rooms and equipment? I personally prefer to have the junction table. I like that my equipment table only contains equipment information and doesn't have any room information.