Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PERSON: Iname, fname, rname, idnum, private, linkblue lname, fname, rname are variable length strings idnum is type INT and is a key attribute private is

image text in transcribedimage text in transcribedimage text in transcribed

PERSON: Iname, fname, rname, idnum, private, linkblue lname, fname, rname are variable length strings idnum is type INT and is a key attribute private is BOOLEAN linkblue is string of 8 characters ADDR: idnum, adtype, streetaddr, city, state, country, zip idnum is a foreign key to PERSON.idnum adtype is a string in the set {"bill", "permanent", "local"} streetaddr is a variable length string that includes #, street, and maybe apt # state is a 2 letter char denoting the state country is a 2 letter char denoting country zip is string no bigger than 10 characters. ADVISOR: student, advisor student is a foreign key to PERSON.idnum advisor is a foreign key to PERSON.idnum DIGITAL: smtype, idnum, smaddr smtype is a string in the set {"email", "facebook", "twitter"} idnum is a foreign key to PERSON.idnum smaddr is a variable length string There is a primary key on the pair (smtype, idnum) 1. CREATE TABLE PERSON(idnum INT NOT NULL PRIMARY KEY, Iname VARCHAR (50), fname VARCHAR(50), rname VARCHAR (50), private BOOLEAN, linkblue CHAR (8)); 2. CREATE TABLE ADDR(idnum INT, adtype SET('bill', 'permanent', 'local), streetaddr VARCHAR (50), city VARCHAR (50), state CHAR(2), zip VARCHAR(10), country CHAR(2), PRIMARY KEY(idnum, adtype), FOREIGN KEY(idnum) REFERENCES PERSON(idnum)); 3. CREATE TABLE ADVISOR(student INT, advisor INT, PRIMARY KEY (student, advisor), FOREIGN KEY(student) REFERENCES PERSON(idnum), FOREIGN KEY(advisor) REFERENCES PERSON (idnum)); 4. CREATE TABLE DIGITAL(smtype SET('email', 'facebook', 'twitter'), idnum INT, smaddr VARCHAR(50), PRIMARY KEY(smtype, idnum), FOREIGN KEY(idnum) REFERENCES PERSON (idnum)); #7 Write a DML statement for inserting an entry into the ADVISOR table using the 2 PERSON entries above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Contemporary Issues In Database Design And Information Systems Development

Authors: Keng Siau

1st Edition

1599042894, 978-1599042893

More Books

Students also viewed these Databases questions

Question

Write formal and informal proposals.

Answered: 1 week ago

Question

Describe the components of a formal report.

Answered: 1 week ago

Question

Write formal and informal reports.

Answered: 1 week ago