by emileifrem · 8y ago · 0 comments
Btw, if you've ever stayed at a Marriott (or anyone they now own: Starwood, Hilton, Ritz Carlton) then you've used Neo4j in production (to book that room). If you've ever purchased a flight ticket, then you've used Neo4j in production (over 99% of all fare calculations are done with Neo4j). Etc.
create table room_booking {
roomid,
booking_started,
booking_ended
}
and some simple sql to check if any rows exist within the required date range would have covered it? What other aspects am I not considering?https://www.youtube.com/watch?v=wdFYEuWWpzo
Pretty amazing stats in there!
book(Room, Rate):-
availableBuildings(Buildings),
availableRooms(Buildings, Rooms),
rate_less_than(Rate, Rooms)
cheapest(Rooms, Room).
However complex you think this problem is, it's pretty simple. It's a very old problem, scheduling, well understood and solved. Using the wrong tool makes it a nightmare. Using the right tool makes it ridiculously easy. The solution is not the database, but the language. https://www.youtube.com/watch?v=wdFYEuWWpzo
The other one is confidential but is in the airline industry.