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

CS8492 – DATABASE MANAGEMENT SYSTEMS

UNIT I
RELATIONAL DATABASES
Part – A
1. Define database management system. [May-05, Dec-08]
Database management system (DBMS) is a collection of interrelated data and a set of
programs to access those data.
It is a collection of interrelated data and various programs that are used to handle the
data.
Primary Goal is to store and retrieve the requested information.

2. What is the purpose of DBMS? [Dec 2014]


a. Define the structure for storing of information
b. Provide mechanism for manipulation of information
c. Ensure the safety of information
3. List any two advantages of database systems. [Dec 2007]
The advantages of using a DBMS are
a) Controlling redundancy
b) Retrieve the desired data
c) Data can be isolated
d) Access efficiency.

4. Define Data abstraction. [May 2005]


Data abstraction means retrieving only required amount of information of the
system and hiding background details.

5. What are three levels of data abstraction? [Dec -02, 04 May – 14, Dec - 17]
a) Physical level
b) Logical level
c) View level

6. What is data model?


It is a collection of conceptual tools for describing data, relationships among
data, semantics (meaning) of data and constraints.
Data model is a structure below the database.

7. What are the different types of data models? [May 2012]


 Relational data model
 Entity-relationship data model
 Object-Based data model
 Semi – Structured data model
8. Name the categories of SQL commands. [May 2012]
 Data - Definition Language (DDL)
 Data Manipulation Language (DML)
 Data Control Language (DCL)

9. What is data definition language? [Dec – 16, May - 18]


 Data base schema is specified by a set of definitions expressed by a
special language called a data definition language.
 Used for creating and modifying the structure of tables, views, indexes.
 Commands are – CREATE, ALTER, DROP

10. Give brief description of DCL command. [Dec - 14]


 DCL stands for Data Control Language.
 Commands: GRANT and REVOKE
 It deals with rights, permissions and other control of database systems.

11. Define the term tuple. [Dec - 05]


Tuple means a row present in the table.

12.Define Primary Key. Give example. [May - 09]


It is a candidate key chosen by database designer to identify the tuple in the
relational unique.
Ex: Consider a Student database as Student (Rollno,Name,Address). The
primary key is Rollno. Primary Key is underlined.
Primary key is chosen by the database designer as the principal means of
identifying an entity in the entity set.

13.Define Foreign Key. Give example. [May - 18]


It is a single attribute or collection of attributes in one table that refers to the
primary key of other table.
Ex: Consider a Student database as Student (Rollno,Name,Address) and
Course(CourseID, CourseName, RollNo). RollNo is Foreign Key.
A relation schema r1 derived from an ER schema may include among its
attributes the primary key of another relation schema r2. This attribute is called a foreign key
from r1 referencing r2.

14.What is referential integrity? [May – 04, 08]


 It states that “Whenever a foreign key value is used it must reference a valid,
existing primary key in the parent table”.
 Example: Consider two tables – Employee and Managers
 Employee has foreign key attribute entitled Manager which points to the
record for reach employee’s manager in the Managers table.
15. What is domain Integrity? [Dec - 08]
It ensures that all the data items in a column fall within defined set of valid
values. Each column in a table has a defined set of values, such as the set of all
members for zip (five-digit), the set of all character strings for name.

16. What are the different types of integrity constraints used in designing- rational
databases? [Dec – 07]
 Entity Integrity Constraint
 Referential Integrity Constraint
 Domain Integrity Constraint
 Key Integrity Constraint

17. List the reasons why null value might be introduced into the database.
NULL is a special value provided by database in two cases
i) When field value of some tuples are unknown
ii) Inapplicable

18. List various operators used in relational algebra. [May 06]


 Selection Operator (σ)
 Rename Operator (ρ)
 Projection Operator (∏)
 Cartesian Product (×)

19. Describe any two undesirable properties that a database design may have?
 Repetition of data
 In-ability of representation of certain information in database.

20. Define Independence.


It is an ability by which one can change the data at one level without affecting
the data at another level. Here level can be physical, conceptual or external.

21. What is meant by instance and Schema of the database?


 When information is inserted or deleted then the database gets changed. The
collection of information at particular moment is called instances.
 The overall design of the database is called schema.
22. Why key is essential? Write the different types of keys.
 Keys are used to specify the tuples distinctly in the given relation
 Various types of keys used in relational model are – Superkey, Candidate
Keys, Primary keys, foreign keys.

23. Difference between Dynamic SQL and Static SQL. [Dec – 14,15,16,17 May-15]
Static SQL Dynamic SQL
1 SQL statements are compiled at SQL statements are compiled at run time
compile time
2 It is more efficient It is less efficient
3 It is less flexible It is more flexible
4 It is used in the situations where It is used in the situations where data is
data is distributed uniformly distributed non uniformly

24. Is it possible for several attribute to have same domain? Illustrate your answer
with suitable example. [Dec 15]
A domain is the set of legal values that can be assigned to an attribute. Each
attribute in a database must have a well – defined domain It can’t mix values from
different domains in the same attribute. Hence it is not possible for several attributes
to have same domain.
Example: Student domain has attributes RollNo, Name, Address. Similarly Employee
domain has EmpID, Enmae, Salary, Address. We can’t define the same domain for
defining several attributes.

25. List out the advantages and disadvantages of Object based data model.
Advantages:
i. Enriched modelling
ii. Reusability
iii. Support for schema evolution
iv. Improved performance
Disadvantages:
I. Lack of universal data model
II. Lack of experience.
Part – B
1. What are all the applications of Database System applications and the disadvantages
of traditional File Processing System? [MAY 2012]
2. Briefly explain about views of data. [MAY 2016]
3. Write short note on: Data model and its types. [Dec - 2014]
4. With the help of neat diagram explain basic Architecture of a database management
system. [MAY – 12,13,14,16,17 DEC – 08,15,17]
5. Explain the distinction among the terms primary key, candidate key, foreign key and
super key with suitable example. [MAY – 06,07,12, DEC – 06]
6. Discuss the entity Integrity and referential integrity constraints. Why are they
important? Explain them with suitable examples.
7. Explain various operations in relational algebra with examples. [Dec – 07,08 May -
14 ]
8. Explain select, project, Cartesian product and join operations in relational algebra
with an example. [May – 18, Dec - 16]
9. Differentiate between foreign key constraints and referential integrity constraints with
suitable example. [Dec - 2017]
10. What is embedded SQL? Give an example with its need. [Dec–14,16,17 May-14,17]

Part – C
1. Write the following queries in relational algebra and SQL [MAY 2017]
i) Find the name of employees who have borrowed a book published by McGraw - Hill
ii) Find the names of employees who have borrowed all books published by McGrew -
Hill.
2. Write the DDL, DML, DCL for the students database. Which contains student details:
name, id, DOB, branch, DOJ. Course details: Course name, Course ID, Stud.id, Faculty
name, id, marks. [DEC - 2017]
3. Explain the six clauses in the syntax of SQL query and show what type of constructs can be
specified in each of the six clauses. Which of the six clauses required and which are
optional? [Dec -2015]
4. Consider the relation student(Reg.No, name, mark and grade). Write embedded SQL -
program in C language to retrieve all the students records whose mark is more than 90.
[May -17, Dec-17]
5. Consider the relational database [Dec-06]
employee(person-name, street, city)
works(person-name,company-name,salary)
company(company-name,city)
manages(person-name,manager-name)
where primary keys are underlined.
a. Find the names of all employees who work for First Bank Corporation
b. Find the names, street address, and cities of residence of all employees who
work for First Bank Corporation and earn more than 2,00,000 per month
c. Find the names of all employees in this database who live int the same city as
the company for which they work.

You might also like