0% found this document useful (0 votes)
7 views4 pages

Untitled Document 1

The document describes different entity relationships in a database including customer-order, order-product, and product-category relationships. It also lists the entity constraints with unique identifiers for each entity like customer, product, order, and category. Relationship tables are shown to connect the different entities like order-product and product-category.

Uploaded by

sharm mendez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

Untitled Document 1

The document describes different entity relationships in a database including customer-order, order-product, and product-category relationships. It also lists the entity constraints with unique identifiers for each entity like customer, product, order, and category. Relationship tables are shown to connect the different entities like order-product and product-category.

Uploaded by

sharm mendez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1.

Customer-Order Relationship
+ + + + + +
| Customer | | Order | | Product |
+ + + + + +
| CustomerID |---------| OrderID |--------|ProductID |
| Name | | Date | | Name |
| ContactInfo | +----------------+ | Price |
| |<-------| CustomerID | +----------------------+
+-----------------+ +-----------------+ |ProductCategory|
+ +
| CategoryID |
| Name |
+ +

2. Order-Product Relationship
+ + + +
| Order | | Product |
+ + + +
| OrderID |--------| ProductID |
| Date | | Name |
| CustomerID | | Price |
+ + + +
| (1 to many) | (0 to many)
|
|
v
+ +
| OrderProduct |
+ +
| OrderID |
| ProductID |
| Quantity |
+ +
3. Product-Category Relationship

+ + + +
| Product | | Category |
+ + + +
| ProductID |--------| CategoryID |
| Name | | Name |
| Price | +-------------------+
+ +
| (1 to many)
|
|
v
+ +
| ProductCategory |
+ +
| ProductID |
| CategoryID |
+ +

Constraints
1. Entity Constraints

Customer Entity:
+--------------+
| Customer |
+--------------+
|CustomerID| <------Unique
| Name |
| ContactInfo|
+--------------+
Product Entity:
+ +
| Product |
+ +
| ProductID | <-----Unique
| Name |
| Price |
+ +

Order Entity:
+ +
| Order |
+ +
| OrderID | <-----Unique
| Date |
| CustomerID |
+ +

Category Entity:
+ +
| Category |
+ +
| CategoryID | <-----Unique
| Name |
+ +
1. Patient-Doctor Relationship

+ + + +
| Patient | | Doctor |
+ + + +
| PatientID |---------| DoctorID |
| Name | | Name |
| DateOfBirth | | Specialty |
|ContactDetails| | ContactInfo |
|MedicalHistory| | Credentials |
+ + + +
| (0 to many) | (0 to many)
| |
+ +
|
+ +
| PatientDoctor |
+ +
| PatientID |
| DoctorID |
+ +

+ + + +
|MedicalRecord | | Appointment |
+ + + +
| RecordID | | AppointmentID |
| Diagnosis | | Date |
|TreatmentDetails| | Time |
| Prescriptions | | Duration |
| PatientID | | DoctorID |
+-------------------+ | PatientID |
+ +

You might also like