Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You have been given a university business plan that produced the following information: PERSON: lname, fname, rname, idnum, private, linkblue lname, fname, rname are variable
You have been given a university business plan that produced the following information: PERSON: lname, 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)
This is done in MySQL.
#11 Write the DML statement to query the database for all people with email addresses. Output their first and last name and their email address - only those 3 pieces of information. #12 Write the DML statement to query the database for all people with no billing address. #13 Write the DML statement to query the database for all people whose linkblue account is part of DIGITAL.smaddr entry that belongs to them. Output their first and last name and the smtype and smaddr. Sort the output by last name and smtype. #14 Write the DML statement to query the database for all people who do not have the privacy flag set to true, output their first and last name and the number of DIGITAL accounts they have. #15 Write the DML statement to query the database for all peoples' first name, last name, email address, advisor's first name, last name, and twitter address. Hint: This should print out for all people regardless of whether they actually have email addresses or advisors. Advisors should print regardless of whether they have a twitter handle.
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