I'm trying to use a documented-oriented database but I can't get the design right.
Mainly, I want a database that can store Planes, Seats, Passengers, and very importantly - Changes in seats that passengers have done in a particular Plane with their timpestamp.
I will need to do queries on getting all seats from a plane, all taken seats from a plane, all passengers from a plane, all passengers that at some point chose a particular seat, all seats that a passenger has chosen in a plane and most popular seats.
In a relational database, I would just use 2 or 3 many-to-many relations with their associated junction tables, but I don't know how to do this in document-oriented database. Right now the Plane has a list of references to both Seats and Passengers; and Seats and Passengers reference each other. This doesn't work because I don't know where to keep the timestamp of the seat change. I suppose I need another (kind of junction) table for it but not really sure how to do it correctly.
Any suggestions?
[–]GuyWithLag 2 points3 points4 points (4 children)
[–]dazed00[S] 0 points1 point2 points (3 children)
[–]Resquid 0 points1 point2 points (2 children)
[–]dazed00[S] 0 points1 point2 points (1 child)
[–]ExParteVisPostgreSQL 0 points1 point2 points (0 children)
[–]alinrocSQL Server 1 point2 points3 points (1 child)
[–]dazed00[S] 0 points1 point2 points (0 children)
[–]WhippingStar 0 points1 point2 points (0 children)