1. What is an entity in the context of databases?
An entity is a real-world object or concept about which data is stored in a database, such as a
customer, product, or order.
2. What are the three degrees of relationship between entities?
One-to-one (1:1), one-to-many (1:M), and many-to-many (M:N).
3(a) Dentist and patient
One dentist can treat many patients, and a patient can be treated by many dentists
(many-to-many).
3(b) Student and teacher
A teacher teaches many students, and a student may be taught by many teachers (many-to-many).
3(c) UK citizen and UK Passport
One UK citizen has one UK passport, and one passport belongs to one citizen (one-to-one).
3(d) Product and component
A product is made of many components, and a component can be used in many products
(many-to-many).
4. Relationships between Customer, Product, Order, and OrderLine
A customer places many orders (1:M). An order contains many order lines (1:M). Each order line
refers to one product, and a product can appear on many order lines (1:M).
5. Primary key fields of the entities
Customer: CustomerID. Product: ProductCode or ProductID. Order: OrderNumber. OrderLine:
OrderLineID or a composite key of OrderNumber and LineNumber.