Create tables based on the below given relational model. Define your own data type to the attributes and apply your own constraints to the attributes Identify the primary, foreign keys apply it to the attributes. Populate the data in all the tables using SQL commands/queries. Car insurance tables: person (driver-id, name, address) car (license, year, model) accident (report-number, date, location) participated(driver-id, license, report-number, damage-amount)
Create tables based on the below given relational model.
Define your own data type to the attributes and apply your own constraints to the attributes
Identify the primary, foreign keys apply it to the attributes.
Populate the data in all the tables using SQL commands/queries.
- Car insurance tables:
person (driver-id, name, address)
car (license, year, model)
accident (report-number, date, location)
participated(driver-id, license, report-number, damage-amount)
- Hospital tables:
patients (patient-id, name, insurance, date-admitted, date-checked-out)
doctors (doctor-id, name, specialization)
test (testid, testname, date, time, result)
doctor-patient (patient-id, doctor-id)
test-log (testid, patient-id) performed-by (testid, doctor-id)
- University registrar’s tables:
student (student-id, name, program, dateofbirth)
course (courseno, title, syllabus, credits)
course-offering (courseno, sectionno, year, semester, time, room)
instructor (instructor-id, name, deptno, title)
enrolls (student-id, courseno, sectionno, semester, year, grade)
- Customer Order:
Customer (customerNO, customerName, address, city, category, custBalance)
Product (productNO, productTitle, price, QStock )
customerOrder ( orderNO, orderDate, customerNO)
orderedProduct (orderNO, productNO, orderQuantity)
Step by step
Solved in 2 steps with 4 images