Hi! I need suggestions designing the backend for a system that allows searching of specific houses.
This will be a web based project, hopefully in PHP utilizing mySQL.
Here’s the scenario:
[ul][li] There are many houses in a neighborhood.[/li]
[li] Each house has rooms.[/li]
[li] Each room has items like furniture.[/li]
[li] Each item such as the furniture has related specifications like color, or height.[/li]
[li][/li]
[li] Rooms are priced, along with everything in the room like the furniture.[/li][/ul]
I want to set up the houses data, then be able to search it by strings such as “pink bedroom and a bathroom with a shower for 500$” which will be parsed and perhaps create a mysql search query
I imagine I would use codes like the following:
[php]
bedroom = new room(“bedroom”, 200); //Create a room named “bedroom” priced 200$
bedroom.color = “red”;
restroom = new room(“restroom”);
shower = new item(“shower”, 100);
restroom.addItem(shower);
house = new house(“123 green ave, east lansing, MI”);
house.addRoom(bedroom);
house.addRoom(restroom);
results = findNearbyHousesMatching(“pink bedroom and a bathroom with a shower for 500$”);
[/php]
Thank you in advance for any suggestions!