Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pick the best answer that fits the question. Not all of the answers may be correct. If none of the answers fit, write your own

Pick the best answer that fits the question. Not all of the answers may be correct. If none of the
answers fit, write your own answer.
Answers must be emailed in plain text (no formatting, no attachments). Email must have your
full name at the top. Answers to questions must be clearly marked (question number before each
answer), and be in sequence (question 1 should come before question 2, etc.).
Email must arrive by midnight on 2020-12-17.
For the below questions, use the following schema definition.
customer(cid, fname, lname, dob, street, city, state, zip)
product(pid, description, listprice)
ordr(oid, tim, cid)
ordrdtls(odid, oid, pid, price, qty)
advertisement(aid, tim, cid, pid, type)
This is a schema for a store. The customer table has customer information, the product table has
product information. The ordr table has information on individual customer orders, with ordrdtls
table for products that are part of an order. Think of an online order, where a single purchase has
multiple products. The advertisement is when we advertise product pid to customer cid.
1.(5 points) Find address of customers named John Doe.
(a) select cid,fname,lname,dob
from customer
where (fname,lname)=(John,Doe)
(b) select * from customer
where (lname,fname)=(John,Doe)
(c) select cid,dob
from customer where fname=John and lname=Doe
(d) select cid,street,city,state,zip
from customer where fname=John and lname=Doe
(e) Other

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