Name: Rajat Chowdhry Roll Number: 520810922 Learning Centre: 2017 Subject Code: BC0041 Subject: Fundamental of DBMS

Assignment No.: 2 Course: Bachelor Of Computer Application (II Semester) Date of Submission at the Learning Centre: 8th June, 2009

Ques. 1. (a) (b) Ans. (a)

Describe the following:

Advantages of Database Systems Functions of DBMS

Advantages of Database Systems:

1. 2. 3. 4.

The DBMS is a central system, which provides a common interface between the data and the various front-end programs in the application. It also provides a central location for the whole data in the application reside. Providing data security against unauthorized access. Provide an efficient and convenient environment that is used to store data in, and retrieve data from a database.
Functions of DBMS Data Definition: The DBMS provides function to define the structure of the data in the

(b) 1.

application. These include defining and modifying the record structure, the type and size of fields and the various constraints/conditions to be satisfied by the data in each field.
2. Data Manipulation: When the data structure is defined than data needs to be interested,

modified or deleted, the function which perform those operations are also part of the DBMS. These functions can handle planned unplanned data manipulation needs.
3. Data Security & Integrity: The DBMS contains functions, which handle the security and

integrity of data in the application. These can be easily invoked by the application and hence the application programmer need not code these functions in his/her programs.
4. Data Recovery and Concurrency: Recovery of data after a system failure and concurrent

access of records by multiple users are also handled by the DBMS.
5. Data Dictionary Maintenance: Maintaining the Data Dictionary which conations the data

definition of the application is also one of the functions of a DBMS.
6. Performance: Optimizing the performance of the queries is one of the important functions of

DBMS. Hence the DBMS has a set of programs forming the Query Optimizer, which evaluates the different implementations of a query and chooses the best among them.

Ques. 2. Ans. (a)

Describe difference and dive operators with suitable example.

Difference operator: The difference operator builds a relation of tuples appearing in the first

but not the second of two specified relations. For Example: To retrieve Cust # of customers who have placed orders in July but not in August. Cust # 001

Customer who have placed orders in July but not in August.
(b) Divide Operator: The divide operator takes two relations and builds another relation

consisting of values of an attribute of one relation that match all the values in the other relation. Divide





For example: Employee Name Anisha Anisha Anisha Nancy City NY CA WA LA

City City NY CA WA

Result of Divide Result Anisha

Ques. 3.

Explain the first 3 Normal Forms taking the help of an un-normalized relation and reducing it to 3 NF


First Normal Form: No Repeating Elements or Group

In database lingo, this group of rows is referred to as a single database row. Never mind the fact that one database row is made up here of three spreadsheet rows: It's an unfortunate ambiguity of language. Academic database theoreticians have a special word that helps a bit with the ambiguity: they refer to the "thing" encapsulated by rows 2, 3 and 4 as a tuple (pronounced tu'ple or too'ple). We're not going to use that word here (and if you're lucky, you'll never hear it again for the rest of your life). Here, we will refer to this thing as a row.
Second Normal Form: No Partial Dependencies on a Concatenated

Next we test each table for partial dependencies on a concatenated key. This means that for a table that has a concatenated primary key, each column in the table that is not part of the primary key must depend upon the entire concatenated key for its existence. If any column only depends upon one part of the concatenated key, then we say that the entire table has failed Second Normal Form and we must create another table to rectify the failure.
Third Normal Form: No Dependencies on Non-Key Attributes

At last, we return to the problem of the repeating Customer information. As our database now stands, if a customer places more than one order then we have to input all of that customer's contact information again. This is because there is columns in the orders table that rely on "non-key attributes".

Ques. 4. Ans. (a)

Explain all the relation algebraic operators with a suitable example.

Select: The select operator extracts specified tuples or rows from a given relation, based on a

condition. For example: A student table has the attributes ROLL NO., Student Name, Age and Gender, The condition is to extract the tuples of only those student whose age is more than 25. ROLL NO. 0910 0976 STUDENT NAME Anisha Nancy AGE 28 30 GENDER Female Female


Project: The project operator extracts specified attributes or column from a given relation.

For example: If only the name and age of the students is to be extracted, the resultant relation appears, as follows Student Name Anisha Nancy Neha Mansi

Age 21 22 21 20

Product: The product operator builds a relation from two specified relations. It consists of all

possible combinations of tuples, one from each of the two relations. For example: Product P Q R A B C P P Q Q R R A A B B C C X Y X Y X Y



Union: The union operator builds a relation from tuples appearing in either or both of the

specified relations. For example: Two tables A and B. A consists the roll no. and names of all students whose major discipline is computers science. B contains the roll no. and name of all students whose major discipline is mathematics. These tables are union compatible because they have the same type of attributes. A – Table Roll No. Name 0910 Anisha 0846 Nancy B – Table Roll No. Name 0846 Nancy 0976 Neha A – B Table

Roll No. 0910 0846 0976

Name Anisha Nancy Neha

Sign up to vote on this title
UsefulNot useful