subject

Consider the relations: Customer(CID, Name, City, State), Order(OID, CID, Date), and Product(PID, ProductName, Price) LineItem(LID, OID, PID, Number, TotalPrice), where CID is a customer id and is a key for Customer, OID is an order id and is a key for Order, and LID is a line item id and is a key for Line Item. In addition the attribute CID of Order is a foreign key referring to the CID of Customer, that is, for each CID c of Order there is exactly one tuple of Customer whose CID attribute is c. The OID of Line Item is a foreign key referring to the OID of Order. There are several line items for the same order, a line item refers to a product and contains the quantity ordered for the product. Express the following queries Algebra: 1. List the customers who ordered computers
2. List the other products bought by customers who bought computers.
3. List the customers who did not place any order since January 1 2014.
4. List the products bought by at least one customer of Newark.
5. List the products bought by all the customers of Newark.
6. List the products ordered only by the customers of Newark.
7. List the products never ordered by customers of New Jersey.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:10
Ihave a music player on my phone. i can buy songs, add them to playlists and play them. obviously it would be redundant to store each song in each playlist; each playlist is just a list of pointers to the songs. for this lab you will simulate this behavior. your program will need to have options to: add songs to the system library (you will store the text of the first line of the song, rather than the audio) add playlists add songs to a playlist list playlists play a playlist list all of the songs in the library with a count of how many times each song has been played remove a song from a playlist remove a playlist remove a song from the library (and thus from all playlists that contain it) note that we will not be checking many error cases. in real programming this would be bad, you should usually try to recognize and respond to as many types of errors as you can. in the context of class we are trying to acquaint you with as many concepts as possible, so for the sake of educational efficiency we will not be checking most errors in this lab, you may assume that your user provides correct input. you may add all appropriate error testing if you wish, but we will not be testing for it.
Answers: 2
question
Computers and Technology, 22.06.2019 22:20
Pp 4.1 design and implement a class called sphere that contains instance data that represents the sphere’s diameter. define the sphere constructor to accept and initialize the diameter and include getter and setter methods for the diameter. include methods that calculate and return the volume and surface area of the sphere (see pp 3.5 for the formulas). include a tostring method that returns a one-line description of the sphere. create a driver class called multisphere, whose main method instantiates and updates several sphere objects.
Answers: 1
question
Computers and Technology, 23.06.2019 01:20
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
question
Computers and Technology, 23.06.2019 10:20
Suppose there is a relation r(a, b, c) with a b+-tree index with search keys (a, b).1. what is the worst-case cost of finding records satisfying 10 < a < 50 using this index, in terms of the number of records n1, retrieved and the height h of the tree? 2. what is the worst-case cost of finding records satisfying 10 < a < 50 and 5 < b < 10 using this index, in terms of the number of records n2 that satisfy this selection, as well as n1 and h defined above? 3. under what conditions on n1 and n2, would the index be an efficient way of finding records satisfying the condition from part (2)?
Answers: 1
You know the right answer?
Consider the relations: Customer(CID, Name, City, State), Order(OID, CID, Date), and Product(PID, Pr...
Questions
question
Mathematics, 03.08.2019 01:40
Questions on the website: 13722359