Q 15

I)

1.What are the two types of updates in Sybase?

2.Explain the steps performed by Deferred update when the modification statement have a cascading effect on

unique index column?

3.Direct update will occur when the following are true:

a)Variable –length column modification

b)The table has an update trigger

c)Join clause are used in update statement

d)The affected columns are not used for Referential Integrity

4. Explain Cheap direct update

5. Explain Expensive direct update

II) Under consideration is the database of naval ships that took part in World War II. The database has the following relations:

Classes(class,type,country,numGuns,bore,displacement)
Ships(name,class,launched)
Battles(name,date)
Outcomes(ship,battle,result)

Ships in classes are arranged to a single project. A class is normally assigned the name of the first ship in the class under consideration (head ship); otherwise, class name does not coincide with any ship name in the database).
The relation Classes includes the class name, type (bb for a battle ship, or bc for a battle cruiser), country the ship was built, number of main guns, gun caliber (diameter of the gun barrel, in inches), and displacement (weight in tons). The relation Ships includes the ship's name, its class name, and launch year. The relation Battles covers the name and date of the battle the ships participated; while the result of their participation in the battle (sunk, damaged, or unharmed - OK) is in the relation Outcomes. Note: the relation Outcomes may include the ships not included in the relation Ships.

1 .Find out the battle ships [Taking Outcomes table into the account]

2. Find out Average no of guns for Japan ships[Taking Outcomes table into the account]

3. Find out the Average displacement for the HeadShips and round it to the integer

4. Find the names of ships sunked in battles and the names of corresponding battles.

No comments: