Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

PART I (OBJECTIVE)

Question (1) Marks (20) Encircle True or False on answer sheet provided to you for
objective questions 1 to 10:
1. A database application is a system program that is used to perform a series of activities on
behalf of database users. (True)
2. Enterprise data model does not describe the high-level entities in an organization and the
relationship between these entities.(False)
3. A database is a self-describing collection of integrated records. (True)
4. Data that describes the properties and context of user data is known as Metadata. (True)
5. Entity type that is not existence-dependent on some other entity type is called a weak entity.
(False)
6. The most common degree for relationships is binary. (True)
7. Where a model represents a relationship between entity types, but pathway between certain
entity occurrences is ambiguous is called chasm trap. (True)
8. A user of a database system can be an entity. (False)
9. A relationship which also has attributes is called an associative entity. (True)
10. In DBMS architecture the conceptual level does not present a logical view of the entire
database. (False)

For following question 11 to 20 encircle only one correct answer on the answer sheet
provided to you.
11. The hierarchical data model organizes data in a ___________structure.
a) Tree b) Object Relational c) Object Oriented d) Relational
12. The first stage in the design of a database is to define the ________view.
a) External b) Conceptual c) Internal d) Physical
13. A software system that enables users to define, create, maintain, and control access to the
database is called___________.
a) File System b) Operating System c) DBMS d) Application
Program
14. Primary key attribute should contain____________values.
a) Duplicate b) Unique c) Single d) Null
15. Associative entity is a combination of relationship and__________________.
a) Attributes b) Cardinality c) Foreign Key d)
Candidate Key
16. Degree of a relationship is represented by the number of _____________.
a) Relationship b) Users c) Entities d) Keys
17. Recursive relationship is of degree ______________.
a) Quaternary b) Binary c) Trenary d) Unary
18. Entity type that is existence – dependent on some other entity type is called ______________.
a)Strong Entity b) Weak Entity c) Parent Entity d) Zero Entity
19. A row in a relation is also called ______________.
a) Record b) Tuple c) Instance d) All of the above
20. Oracle is a ________________________.
a) DBMS b) Database c) Tuple d) Relation

Question (2) Marks(10)


Differentiate between the followings:
1. Two tire and Three tire architecture
Two tire: The two-tier architecture is like client server application. The direct
communication takes place between client and server. There is no intermediate between
client and server.
Three tire : Three tier architecture having three layers. They are
1. Client layer
2. Business layer
3. Data layer
Client layer: Here we design the form using textbox, label etc.
Business layer: It is the intermediate layer which has the functions for client layer and it is
used to make communication faster between client and data layer. It provides the business
processes logic and the data access.
Data layer: it has the database
2. Attribute and Tuple
TUPLE: Is the "ROW" in a table and
ATTRIBUTE: Is the "COLUMN" and it can also be called as "ATTRIBUTE".
3. Stored (Simple) Attribute versus Derived Attributes
Stored Attribute: An attribute that supplies a value to the related attribute.
Derived Attribute: An attribute that’s value is derived from a stored attribute
4. Data and Information
Data: is raw material & unorganized facts that need to be processed
Information: When data are processed, organized, structured or presented in a given
context so as to make them useful, they are called Information.
5. Metadata and database
Metadata: that describes the fields and formats of databases and data
Database: is a collection of information that is organized so that it can easily be accessed,
managed, and updated. In one view, databases can be classified according to types of
content: bibliographic, full-text, numeric, and images.

Question (7) - Optional Marks(6)


Consider the following Entity Relationship (ER) diagram.
• Assume that an employee may work in up to two departments or may not be assigned to any
department.
• Assume that each department must contain one and may contain up to three phone numbers.
• Assume that each department can have anywhere between 5 to 25 employees.
• Assume that each phone is used by one, and only one, department.
• Assume that each phone is assigned to at least one, and may be assigned to up to 10 employees.
• Assume that each employee is assigned at least one, but no more than 6 phones.
Write the (min, max) constrains for both sides of each relationship on the following ER diagram.

Phone Contain Department

Has- Work-
phone Employee in

Final Exam
Question (1) Marks (20) Encircle True or False on answer sheet provided to you for
objective questions 11 to 30:
11. Join is the most frequently used relation operation, which brings together data from two or
more related tables into one result table. (True)
12. Linear search does not require reading and searching half the file blocks on the average, and
is hence not quite expensive. (False)
13. All of the non-key attributes of a relation are functionally dependent on the primary key of
that relation. (True)
14. Cardinality constraint does not specify the number of instances of one entity that can (or
must) be associated with each instance of another entity. (False)
15. An instance of a subtype is not an instance of the super type. (False)
16. Keys usually are used as indexes to speed up the response to user queries. (True)
17. Relational integrity is not enforced via the primary – key to foreign – key match. (False)
18. ALTER TABLE statement allows you to change column specifications. (True)
19. CREATE VIEW defines a logical table from one or more views. (False)
20. Commands that define a database, including creating, altering, and dropping tables and
establishing constraints are called data manipulation language. (False)
21. Unordered files are also called a heap or a pile file. (True)
22. A relation is a named, two dimensional table of data. (True)
23. Reading or writing a disk block is not a time consuming process because of the seek time (s)
and rotational delay (latency) (rd). (False)
24. A file can have fixed-length records or variable-length records. (True)
25. Blocking factor (bfr) refers to the number of records per block. (True)
26. A secondary index does not provide a secondary means of accessing a file for which some
primary access already exists. (False)
27. The relational tables used in the union operation must not be union compatible. (False)
28. The project operator retrieves a subset of columns from a table, removing duplicate rows from
the result. (True)
29. Functional dependency describes relationship between attributes. (True)
30. There is no difference between equal join and outer join. (True)
Question (5) Marks (20)
(i) Write complete clause / syntax of the SELECT SQL Statement. Marks(5)
Solution: SELECT FROM
WHERE Group by Having Order by
(ii) Answer the following questions by writing the queries in SQL and Relational Algebra.
Marks(15)
Employee (ssn , Fname , lname , Bdate , Address , sex , salary , Super_ssn , Dno)
Department (Dnumber , Dname , Mgr_ssn , Mgr_start_date)
Dept_Locations (Dnumber , Dlocation)
Project (Pnumber , Pname , Plocation , Dnum)
Works_on (Essn , Pno , Hours)
Dependent (Essn , Dependent_name , Sex , Bdate , Relationship)
1. Write an aggregate and group function operation to show the count of the
employees and maximum salary from the EMPLOYEE table for each department
by department number wise. (in SQL and Relational Algebra)
Select max(salary),count(*) from employee group by dno; DNO ℱCOUNT SSN,
AVERAGE Salary (EMPLOYEE)
2. Write down the Unary Relational Operation to show each employee's first and last
name and salary which you can project from the EMPLOYEE table. (in SQL and
Relation Algebra) Select fname, lname, salary from employee;
π fname, lname, salary (employee)
3. Write a function to get the attributes (LName, FName and Salary) of the
Employees who are working in DNo. 5 from the EMPLOYEE table. (in SQL and
Relation Algebra) Select lname, fname, salary from employee where dno=5;
FNAME, LNAME, SALARY( DNO=5(EMPLOYEE))
4. For every project located in "Stafford" list the project number, the controlling
department number, and the department manager's last name address, and birth
date. (in SQL and Relation Algebra)
SELECT PNUMBER, DNUM, LNAME, BDATE, ADDRESS FROM PROJECT,
DEPARTMENT, EMPLOYEE WHERE DNUM=DNUMBER AND
MGRSSN=SSN AND PLOCATION='Stafford'
5. Find the Maximum, Minimum and Average of the salary that is given that is given
to the employees. (in SQL and Relation Algebra)
Select max(salary), min(salary), avg(salary) from employee;
ℱ Max salary, Min salary, Average salary (EMPLOYEE)

You might also like