December 2017
Intermediate to advanced
372 pages
8h 46m
English
In the previous section, we saw how to retrieve, insert, update, and delete single entities from the database. Entities are rarely isolated; in the vast majority of cases they are related to other entities.
Entities can have one-to-one, one-to-many, many-to-one, and many-to-many relationships.
In the CustomerDB database, for example, there is a one-to-one relationship between the LOGIN_INFO and the CUSTOMERS tables. This means that each customer has exactly one corresponding row in the login info table. There is also a one-to-many relationship between the CUSTOMERS table and the ORDERS table. This is because a customer can place many orders, but each order belongs only to a single customer. Additionally, there is a many-to-many ...