Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CREATE TABLE person ( person _ id SMALLINT UNSIGNED PRIMARY KEY, first _ name VARCHAR ( 2 0 ) , last _ name VARCHAR (
CREATE TABLE person
personid SMALLINT UNSIGNED PRIMARY KEY,
firstname VARCHAR
lastname VARCHAR
email VARCHAR
active VARCHAR
lastupdate TIMESTAMP,
addressid SMALLINT UNSIGNED,
FOREIGN KEY addressid REFERENCES addressaddressid ON DELETE RESTRICT ON UPDATE RESTRICT
;
CREATE TABLE staff
personid SMALLINT UNSIGNED PRIMARY KEY,
picture BLOB,
username VARCHAR
password VARCHAR
storeid TINYINT UNSIGNED,
FOREIGN KEY personid REFERENCES personpersonid ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY storeid REFERENCES storestoreid ON DELETE RESTRICT ON UPDATE RESTRICT
;
CREATE TABLE customer
personid SMALLINT UNSIGNED PRIMARY KEY,
createdate TIMESTAMP,
FOREIGN KEY personid REFERENCES personpersonid ON DELETE CASCADE ON UPDATE CASCADE
;
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