Sybase Question set IV

I) 1. What is the difference between Where and Having clause?

2. What are the difference types of Joins in Sybase?

3. What are the difference types of Sub Query?

4. Explain Union with an example?

5. State the following true or false

a) ‘Select into’ will enter into the log

b) Exists allow the duplicates in the result set

c) Distinct remove the duplicates in the result set

d) You can change the data types of a column

II) The database scheme consists of four relations:

Product(maker, model, type)
PC(code, model, speed, ram, hd, cd, price)
Laptop(code, model, speed, ram, hd, screen, price)
Printer(code, model, color, type, price)

The relation "Product" shows the maker, model number, and type (pc, laptop, or printer). It is assumed that model numbers are unique for all the makers and product types. For each model number specifying pc in the relation "PC", its listed speed (of the processor in MGz), total RAM (in MGb), hd capacity (in Gb), CD ROM speed (for example, '4x'), and the price. The relation "Laptop" is similar to that one of PCs except for the CD ROM speed which is replaced by screen size (in inches). For each printer model in the relation "Printer" it is pointed whether the printer is color or not (color attribute is 'y' for color printers; otherwise it is 'n'), printer type (laser, jet, or matrix), and the price.

  1. Find the pc model which have the maximum price

2. Delete from PC table the computers having minimal hdd size

3. Maker A has passed manufacture of printers to maker Z. Perform necessary changes

4. Find the maker who produces matrix printer with minimum price

No comments: