CMP-3440 Database Systems UOS Solved Past Paper 2019

University of Sargodha

MSc. 3rd Term Examination 2019.

Subject: I.T        Paper: Database Systems(CMP: 3440)

Objective Part

Question No 01: Write short answers of the following in 2-3 lines each  .

1.     List any two disadvantages of the File Processing System

Answer:

1.    Data Redundancy: Redundancy means multiple copies of the same data. In a file processing system each application program has its own set of data files. The same data may exist in more than one file.

2.    Data Inconsistency: Data inconsistency means the different file may contain different information of a particular object or person. Actually redundancy leads to inconsistency. When the same data is stored as multiple locations, the inconsistency may occur.

2.      What is the disadvantage of Normalization

Answer:  Since data is not duplicated in tables, so table joins are required. This makes queries more complicated, and thus decrease efficiency in terms of read times. In case of joining tables, indexing does not work as efficiently. Again, this makes read times slower because the joins don’t typically work well with indexing.

 

3.     Draw an example of Associative Entity Type.

Answer: An Associative entity is one that associates the instances of one or more entity types with one another. It also contains some attributes that is only unique to the relationship between those entity instances.  

Here CERTIFICATE is an Associative Entity.

4.       What is derived attribute? Give an example.

Answer:  sometimes attributes’ values are not stored, rather they are computed or derived based on some other value. That other value may be stored in the database or obtained some other way. For example, date of birth is stored in database, but age can be computed from date of birth. Here age is a derived attribute.

5.      Name any Two Components of database environment.

Answer:

Ø  Hardware

Ø  Software

Ø  Data

Ø  Procedures

Ø  People

6.      What is program data dependency?

Answer:  In file processing system, the data stored in a data file depends upon the application program through which the data file was created. The structure of data file is defined in application program it is difficult to change the structure of data file (or format of file) then we have to modify the application program also. This problem file processing system is known as program data dependency problem.

7.       Define total specialization rule.

Answer:

Answer:  Total specialization rule is a rule that specifies that each entity instance of a super-type must be a member of some sub-type in the relationship.

 8.       What is self-join?

Answer:  A self-join is a join in which a table is joined with itself, A self-join occurs when the table has a FOREIGN KEY which references its own PRIMARY KEY. To join a table with itself means that each row of the table is combined with itself and with every other row of the table.

9.      Differentiate between logical and physical schema.

Answer:  

Logical Schema: A logical schema is a conceptual model of the data. The logical schema is primarily concerned with understanding the business entities, their attributes and their relationships.

Physical Schema: The physical schema is a conversion of the logical schema into an implementation that works on a particular database platform. Physical schema represents the actual connection to the data source or data target.

10.      Define partial functional dependency.

Answer:  A dependency in which one or more non-key attributes are functionally dependent on part (but not full) of the primary key, is known as partial functional dependency. The partial functional dependency creates problem of data redundancy in the relation, which results in anomalies when the relation is updated.

11.     Draw an example of Unary one to one relationship.

Answer: In unary relationship, an entity type is associated with itself. So unary relationship is of degree one, also called “Recursive Relationship”. For Example: A STUDENT is class fellow of other STUDENT. Here class fellow is relationship in which only one entity in involved STUDENT.

12.        Differentiate between a table and a view.

Answer:

 

View

Table

The view is treated as a virtual table that used to show data extracted form database

The table is structured with a set number of columns and rows.

A view is a database object which is utilized as a table and inquiry that can be connected to different tables.

The table is database object which are used to hold the information permanently in database. 

The view is utilized to query certain information which is contained in a few distinct tables

The table holds fundamental client information and holds cases of a characterized object.

A view is dynamic in nature. It is used to display information to user. It is not stored in database permanently.

Table is a static object of database and holds information the remains constant in database.

13.       List any two negative consequences of having anomalies.

Answer:

1.      There may be a data, which is not inserted in database due to insertion anomaly.

2.      Data may be lost accidently due to deletion in anomaly in database.

3.      A modification anomaly decrease the data modification speed and decrease efficiency.

14.      What is referential integrity constraint?

Answer:  Referential Integrity Constraint is applied to foreign keys. This constraint states that if a foreign key exists in a relation, either the foreign key value must match the primary key value of some tuple in its home relation or the foreign key value must be completely null. It maintains consistency of relationship.

15.     Differentiate between table and relation.

Answer: Relation is a mathematical term. Relation refers to the sub set from Cartesian product of two sets. Relation provides foundation for a database object Table. Table is a set of rows and columns that is used to store data in database.

16.     Write a SQL statement to Drop a table form database schema.

Answer:

   using database_name

      DROP TABLE table_name