Entity Relationship Diagram
When developing a relational database understanding the logical flow of information and proper planning will improve the probability of the database functioning the way it is intended and producing the desired results. In determining the proper structure of a relational database for a video rental store one must consider what information is stored, the process for renting videos and information on the videos maintained in inventory. Customer, Videos and Video Types are the entity classes that will be discussed and Customer Order is the intersection relation needed to explain the complete process as seen on the Entity Relationship Diagram below.
...view middle of the document...
Each customer may zero or many Customer Orders, but each Customer Order must have one and only one customer. The Customer Order must have at least one video, but may have many videos. A specific video must only be rented to one customer at a time and may not be rented out to any customers.
Videos and Video Types
The video entity class is a table containing the video library. The video store may own multiple copies of each video to rent to multiple customers, but each video would be assigned a unique number used as the primary key. Each unique video can only be rented to one customer at a time, but the customer may rent multiple videos with each order. The video entity class would contain information related to the video such as title, director, year released and main actors. The video rental store may also want to track the type of video so they can easily locate it in their store. A video type entity class would contain a list of categories or sections within the video store. The primary key would be a unique number automatically generated when a new category is added to the table. If categories are later combined or names are changed,...