Answered step by step
Verified Expert Solution
Question
1 Approved Answer
draw an ERD diagram according to the given information for veteniery clinic below. CREATE TABLE Customers ( customer _ id INT PRIMARY KEY, name VARCHAR
draw an ERD diagram according to the given information for veteniery clinic below. CREATE TABLE Customers
customerid INT PRIMARY KEY,
name VARCHAR
contactdetails VARCHAR
;
CREATE TABLE Pets
petid INT PRIMARY KEY,
name VARCHAR
dateofbirth DATE,
genre VARCHAR
type VARCHAR
specialfoods VARCHAR
habitat VARCHAR
care VARCHAR
licensenumber VARCHAR
customerid INT,
FOREIGN KEY customerid REFERENCES Customerscustomerid
;
CREATE TABLE Vets
vetid INT PRIMARY KEY,
name VARCHAR
specialization VARCHAR
;
CREATE TABLE Inspections
inspectionid INT PRIMARY KEY,
petid INT,
vetid INT,
date DATE,
findings TEXT,
FOREIGN KEY petid REFERENCES Petspetid
FOREIGN KEY vetid REFERENCES Vetsvetid
;
CREATE TABLE Treatments
treatmentid INT PRIMARY KEY,
petid INT,
vetid INT,
date DATE,
description TEXT,
FOREIGN KEY petid REFERENCES Petspetid
FOREIGN KEY vetid REFERENCES Vetsvetid
;
CREATE TABLE Staff
staffid INT PRIMARY KEY,
name VARCHAR
role VARCHAR
;
CREATE TABLE PetSupplies
supplyid INT PRIMARY KEY,
name VARCHAR
description TEXT,
price DECIMAL
;
CREATE TABLE SalesRecords
saleid INT PRIMARY KEY,
customerid INT,
supplyid INT,
date DATE,
quantity INT,
FOREIGN KEY customerid REFERENCES Customerscustomerid
FOREIGN KEY supplyid REFERENCES PetSuppliessupplyid
;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started