You are on page 1of 7

DHIRAJLAL GANDHI COLLEGE OF TECHNOLOGY, SALEM

Department of Computer Science and Engineering

CS3492/Database Management System

Cycle test-1 Answer key

APART-A

1. Define DBMS

DBMS is Data Base Management System, which consists of a collection of


interrelated data and a set of programs to access those data. The collection of data
is database. These are designed to manage large bodies of information.

2.What is physical, logical and view level data abstraction.

a. The lowest level of abstraction that describes how the data is stored is physical
level data abstraction.

b. The next higher level of abstraction that describes what data are stored in the

database and the relationship among those data is logical level data abstraction.

c. The highest level of abstraction describes only part of the entire database is view

level.

3. Define instance and schema?

Instance: Collection of data stored in the data base at a particular moment is


called an Instance of the database.

Schema: The overall design of the data base is called the data base schema.

4. What is an entity relationship model?

The entity relationship model is a collection of basic objects called entities


and relationship among those objects. An entity is a thing or object in the real
world that is distinguishable from other objects.

5. Define the terms i) Entity type ii) Entity set

Entity type: An entity type defines a collection of entities that have the same
attributes.
Entity set: The set of all entities of the same type is termed as an entity set.

6.Write an SQL query to fetch the Stu_Name and Stu_Marks of those


students whose age is 20.give an own example.

SELECT Stu_Name, Stu_Marks FROM Student WHERE Stu_Age = 20;

Output:

Stu_Name Stu_Marks

Akhil 85

Chetan 95

Diksha 99

7. Define Data independence.

The ability to modify a schema definition in only level without affecting a Schema
definition in the next higher level is called data independence

Super key – collection of keys of a database is called as super key

8.What are the types of attributes. April/May 2007


o Simple
o Composite
o Single-valued
o Multi-valued
Derived

9. Give the distinction between primary key, candidate key and super key.

Primary key – is used in a data base to avoid duplication of attributes and also
makes a relation to the other database.

Candidate key - a key which is in the data base is called as candidate key, it might
be any key attribute.

9.Give the distinction between primary key, candidate key and super key.
Primary key – is used in a data base to avoid duplication of attributes and also
makes a relation to the other database.

Candidate key - a key which is in the data base is called as candidate key, it might
be any key attribute.

Super key – collection of keys of a database is called as super key

10.Define Specialization and Aggregation.

It is the process of designating sub groupings within an entity set.It is a top down
process.

Specialization which is represented by triangle. The lable ISA stands for “is
a and represent, for eg that customer is a person.

Aggregation is a special kind of association that specifies a whole/part


relationship between the aggregate (whole) and a component part.

PART-B

11.Explain the data base system architecture with neat diagram?

1.Query Processor: It interprets the requests (queries) received from end user
via an application program into instructions. It also executes the user request
which is received from the DML compiler.
Query Processor contains the following components –
 DML Compiler: It processes the DML statements into low level instruction
(machine language), so that they can be executed.
 DDL Interpreter: It processes the DDL statements into a set of table
containing meta data (data about data).
 Embedded DML Pre-compiler: It processes DML statements embedded in
an application program into procedural calls.
 Query Optimizer: It executes the instruction generated by DML Compiler.
2. Storage Manager: Storage Manager is a program that provides an interface
between the data stored in the database and the queries received. It is also
known as Database Control System. It maintains the consistency and integrity of
the database by applying the constraints and executing the DCL statements. It is
responsible for updating, storing, deleting, and retrieving data in the database.
It contains the following components –
 Authorization Manager: It ensures role-based access control, i.e,. checks
whether the particular person is privileged to perform the requested operation
or not.

 Integrity Manager: It checks the integrity constraints when the database is


modified.
Transaction Manager: It controls concurrent access by performing the
operations in a scheduled way that it receives the transaction. Thus, it
ensures that the database remains in the consistent state before and after the
execution of a transaction.
File Manager: It manages the file space and the data structure used to
represent information in the database.
Buffer Manager: It is responsible for cache memory and the transfer of data
between the secondary storage and main memory.

3. Disk Storage: It contains the following components –


 Data Files: It stores the data.
Data Dictionary: It contains the information about the structure of any
database object. It is the repository of information that governs the
metadata.
 Indices: It provides faster retrieval of data item.
12.DATA MODELS IN DBMS
A Data Model is a logical structure of Database. It describes the design of
database to reflect entities, attributes, relationship among data, constrains etc.

Types of Data Models:


Object based logical Models – Describe data at the conceptual and view levels.
1. E-R Model
An entity–relationship model (ER model) is a systematic way of describing and
defining a business process. An ER model is typically implemented as a database.
The main components of E-R model are: entity set and relationship set.
2. Object oriented Model
An object data model is a data model based on object-oriented programming,
associating methods (procedures) with objects that can benefit from class
hierarchies. Thus, “objects” are levels of abstraction that include attributes and
behavior
Record based logical Models – Like Object based model, they also describe data
at the conceptual and view levels.
These models specify logical structure of database with records, fields and
attributes.
1. Relational Model
In relational model, the data and relationships are represented by collection of
inter-related tables. Each table is a group of column and rows, where column
represents attribute of an entity and rows represents records.
Sample relationship Model: Student table with 3 columns and three records.
Stu_Id Stu_Name Stu_Age
111 Ashish 23
123 Saurav 22
169 Lester 24

2. Hierarchical Model
In hierarchical model, data is organized into a tree like structure with each record is
having one parent record and
many children. The main drawback of this model is that, it can have only one to
many relationships between nodes.

3. Network Model – Network Model is same as hierarchical model except that it


has graph-like structure rather
than a tree-based structure. Unlike hierarchical model, this model allows each
record to have more than one
parent record.
Physical Data Models – These models describe data at the lowest level of
abstraction

14.Explain in detail about embedded and dynamic SQL.

There are two forms of SQL queries: embedded or static SQL and dynamic SQL. As a

result, we’ll be learning about these two varieties of SQL statements during this

blog.

Embedded SQL (or Static SQL): These are SQL statements that don’t change at

runtime and therefore can be hard coded into the application. As static SQL are fixed

queries, these statements will be analyzed and optimized and don’t require specific

handling for security purpose.

Dynamic SQL: These are SQL statements that are constructed at runtime; for

example, the application that allows users to enter their own queries. Dynamic SQL

might have more permissions and security handling and a malicious user can create

dangerous code as well.

Dynamic SQL enables you to make SQL statements dynamically at runtime. this

enables you to make more general purpose, flexible applications because the

complete text of a SQL statement is also unknown at compilation.

Using Static SQL has its own benefits too, one in all them being the optimization of

the statement that ends up in an application with high performance because it offers

a decent flexibility which is best than Dynamic SQL.

Course Coordinator Module Coordinator HOD/Programme

Coordinator

You might also like