4 ms·
You have a house with an array of rooms, and each room has a house with an array of rooms? Etc. Unless that's a reference to a house in the room class, that is
by chris_wot 10y ago
You have a house with an array of rooms, and each room has a house with an array of rooms? Etc.
Unless that's a reference to a house in the room class, that is not in any way a good design. And if it is a reference, then you implement it like this:
House is a table
Room is a table that has a foreign key that references the House primary key.
Can't get much simpler than that!