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)

Database Systems: Design, Implementation, & Management
11th Edition
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Chapter11: Database Performance Tuning And Query Optimization
Section: Chapter Questions
Problem 2P: Problem 1 and 2 are based on the following query: SELECT EMP_LNAME, EMP_FNAME, EMP_AREACODE, EMP_SEX...
icon
Related questions
Question

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.

  1. 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)

  1. 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)

 

  1. Customer Order:

Customer (customerNO, customerName, address, city, category, custBalance)

Product (productNO, productTitle, price, QStock )

customerOrder ( orderNO, orderDate, customerNO)

orderedProduct (orderNO, productNO, orderQuantity)

Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
SQL Query
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning