Anda di halaman 1dari 3

Assignment- I Questions

1. Consider the following student table

a. Write a program in C Language to create student file. Write appropriate


functions to insert, delete and update records from student file
b. Write a program in Java Language to create student file. Write appropriate
functions to insert, delete and update records from student file
c. Discuss the disadvantages of creating student data using traditional file
processing systems as in question 1a and question 1b

2. Consider a MAIL_ORDER database in which employees take orders for parts


from customers. The data requirements are summarized as follows:
■ The mail order company has employees, each identified by a unique
employee number, first and last name, and Zip Code.
■ Each customer of the company is identified by a unique customer number,
first and last name, and Zip Code.
■ Each part sold by the company is identified by a unique part number, a part
name, price, and quantity in stock.
■ Each order placed by a customer is taken by an employee and is given a
unique order number. Each order contains specified quantities of one or more
parts. Each order has a date of receipt as well as an expected ship date. The
actual ship date is also recorded.
a. Design an entity–relationship diagram for the mail order database
b. Be sure to indicate the various types of attributes of each entity and
relationship set
c. Specify the key and participation constraints for each relationship set. Specify
any necessary constraints as well.
3. Consider a type that describes objects in plane geometry, which may be
defined as follows:
GEOMETRY_OBJECT: Shape, Area, Reference_point
For the GEOMETRY_OBJECT type, Shape is implemented as an attribute (its
domain can be an enumerated type with values ‘triangle’, ‘rectangle’, ‘circle’,
and so on), and Area is a method that is applied to calculate the area.
Reference_point specifies the coordinates of a point that determines the object
location. Now suppose that we want to define a number of subtypes for the
GEOMETRY_OBJECT type, as follows:
RECTANGLE subtype-of GEOMETRY_OBJECT: Width, Height
TRIANGLE S subtype-of GEOMETRY_OBJECT: Side1, Side2, Angle
CIRCLE subtype-of GEOMETRY_OBJECT: Radius
a. Design an OO schema for Geometry object a database
b. Write a Java program to create base class Geometry object and its derived
classes.
c. Include method to calculate Area of each of the derived classes. This
operation may be implemented by a different method for each subtype, since the
procedure for area calculation is different for rectangles, triangles, and circles.
Similarly, the attribute Reference_point may have a different meaning for each
subtype; it might be the center point for RECTANGLE and CIRCLE objects,
and the vertex point between the two given sides for a TRIANGLE object.

4. Consider the following relations:


BOOKS(Book#, Primary_author, Topic, Total_stock, $price)
BOOKSTORE(Store#, City, State, Zip, Inventory_value)
STOCK(Store#, Book#, Qty)
Total_stock is the total number of books in stock, and Inventory_value is the
total inventory value for the store in dollars.
a. Give an example of two simple conditions to create horizontal partitions for
the BOOKSTORE relation.
b.Give an example of two simple conditions to create vertical partitions for the
BOOKSTORE relation.
c. If replication factor is three for each of the relations and fragment, draw a
diagram to show the data allocation among the nodes in distributed database
design
d. Give sample examples for distribution transparency, fragmentation
transparency, replication transparency in this distributed database system.

5. Identify various types of attributes for the following figures. Also identify
cardinality of the relationship between the objects
a. Explain the procedure adopted to find entities, attributes and relationships.
b. Identify base class and derived class for each of the entities present in the
following figure

Anda mungkin juga menyukai