0% found this document useful (0 votes)
160 views12 pages

18CST41 - DBMS Cat 1 Answer Key

The document contains a sample exam for a Database Management Systems course. It includes: - Part A contains 10 multiple choice questions testing concepts like the role of DBMS, database schemas, database administration functions, relational database modeling concepts, and relational algebra operations. - Part B contains short answer questions on topics like the purpose of database systems, the difference between database instances and schemas, single and multivalued attributes in an ER model, and drawing an ER diagram for a given scenario. - Part C contains longer answer questions on data abstraction levels in DBMS, common data models like relational, entity-relationship, object-based and semi-structured models, and designing an ER schema to model information
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
160 views12 pages

18CST41 - DBMS Cat 1 Answer Key

The document contains a sample exam for a Database Management Systems course. It includes: - Part A contains 10 multiple choice questions testing concepts like the role of DBMS, database schemas, database administration functions, relational database modeling concepts, and relational algebra operations. - Part B contains short answer questions on topics like the purpose of database systems, the difference between database instances and schemas, single and multivalued attributes in an ER model, and drawing an ER diagram for a given scenario. - Part C contains longer answer questions on data abstraction levels in DBMS, common data models like relational, entity-relationship, object-based and semi-structured models, and designing an ER schema to model information
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

VELALAR COLLEGE OF ENGINEERING AND TECHNOLOGY

CONTINUOUS ASSESSMENT TEST - 1

18CST41 & DATABASE MANAGEMENT SYSTEMS

PART - A
 1)The DBMS acts as an interface between what two components of an enterprise-
class database system?
A. Database application and the B. Data and the database
database
C. The user and the database application D. Database application and SQL
2)The overall description of database is called
A. Data Integrity B. Data Manipulation
C. Database Schema D. Data Definition
 3)Which of the following is a database administrator’s function?

A.Database design B.Performance monitoring


C.Backing up the database D.All of the above
4)A relation is considered a
A. Column. A. one-dimensional table.
C. Two-dimensional table. B. three-dimensional table
5)The primary key is selected from
A. Composite keys. B. Determinants.
C. Candidate keys. D. Foreign keys
6)In an Entity-Relationship(ER)model,suppose R is a many-to-one relationship from
entity set E1 to entity set E2.Assume that E1 and E2 participate totally in R and that
the cardinality of E1 is greater that the cardinality of E2.Which one of the following
is true about R?
A.Every entity in E1 is associated with B. Some entity in E1 is associated with
exactly one entity in E2 more than one entity in E2
C.Every entity in E2 is associated with D. Every entity in E2 is associated with
exactly one entity in E1 at at most one entity in E1
7)Which is not a property of Relational Database model?
A. Data is presented as a collection of B. Each relation is depicted as a table
relations
C. Each tuple represents as a single entity D. Each column should contain unique
value
8)An entity E1 is associated with any number of entities in E2 and an entity in E2
can be associated with atmost one entities is called one-to-many. c. many-to- one.
d.many-to-many.
A.One-to-one. B. One-to-many
C. Many-to- one D. Many-to-many.
9)The cardinality in relational data model is considered as
A. total number of values B. limited number of values
C. two numbers from set D. three numbers from set
10)Which of the following is not a relational algebra function?
A. Select B. Project
C. Manipulate D.  Union
PART-B

1)PURPOSE OF DATABASE SYSTEM: 

The purpose of DBMS is to transform the following


 Data into information. 
 Information into knowledge. 
 Knowledge to the action. 

 2)Difference between instance and schema: 

 
 

3)SINGLE VALUED ATTRIBUTES: 


                Attributes that can have single value at a particular instance of time are
called single valued. 
EXAMPLE:  
              A person can’t have more than one age value 
 
MULTIVALUED ATTRIBUTE:  
               A multi-valued attribute can have more than one value at one time 
EXAMPLE: 
              MOBILE NUMBER 
 
 
 
4) HOW TO UNIQUELY IDENTIFY THE ENTITY IN ENTITY SET ? GIVE
EXAMPLE 
 A strong entity set is an entity set that contains sufficient attributes to uniquely
identify all its entities.
 In other words, a primary key exists for a strong entity set.
 Primary key of a strong entity set is represented by underlining it
     
 
 
5) EVERY STUDENT ENTITY IS RELATED TO ATLEAST ONE INSTRUCTIR
ENTITY THROUGH THE ADVISOR RELATIONSHIP.DRAW ER DIAGRAM
FOR THI SCENARIO. 

PART - C

16)a)i)DATA ABSTARCTION:

Data Abstraction is a process of hiding unwanted or irrelevant details from the end
user. It provides a different view and helps in achieving data independence which is
used to enhance the security of data.
The database systems consist of complicated data structures and relations. For users
to access the data easily, these complications are kept hidden, and only the relevant
part of the database is made accessible to the users through data abstraction.

Levels of abstraction for DBMS

Database systems include complex data-structures. In terms of retrieval of data,


reduce complexity in terms of usability of users and in order to make the system
efficient, developers use levels of abstraction that hide irrelevant details from the
users. Levels of abstraction simplify database design.
Mainly there are three levels of abstraction for DBMS, which are as follows −
 Physical Level
 Logical Level
 View Level

Physical Level

It is the lowest level of abstraction for DBMS which defines how the data is actually
stored, it defines data-structures to store data and access methods used by the
database. Actually, it is decided by developers or database application programmers
how to store the data in the database.
So, overall, the entire database is described in this level that is physical or internal
level. It is a very complex level to understand. For example, customer's information is
stored in tables and data is stored in the form of blocks of storage such as bytes,
gigabytes etc.

Logical Level

Logical level is the intermediate level or next higher level. It describes what data is
stored in the database and what relationship exists among those data. It tries to
describe the entire or whole data because it describes what tables to be created and
what are the links among those tables that are created.
It is less complex than the physical level. Logical level is used by developers or
database administrators (DBA). So, overall, the logical level contains tables (fields
and attributes) and relationships among table attributes.

View Level

It is the highest level. In view level, there are different levels of views and every view
only defines a part of the entire data. It also simplifies interaction with the user and it
provides many views or multiple views of the same database.
View level can be used by all users (all levels' users). This level is the least complex
and easy to understand.
For example, a user can interact with a system using GUI that is view level and can
enter details at GUI or screen and the user does not know how data is stored and what
data is stored, this detail is hidden from the user.

16)A)ii)DATA MODELS:

Data Model is the modeling of the data description, data semantics, and consistency
constraints of the data. It provides the conceptual tools for describing the design of a
database at each level of data abstraction. Therefore, there are following four data
models used for understanding the structure of the database:

1) Relational Data Model: This type of model designs the data in the form of rows
and columns within a table. Thus, a relational model uses tables for representing data
and in-between relationships. Tables are also called relations. This model was initially
described by Edgar F. Codd, in 1969. The relational data model is the widely used
model which is primarily used by commercial data processing applications.

2) Entity-Relationship Data Model: An ER model is the logical representation of


data as objects and relationships among them. These objects are known as entities,
and relationship is an association among these entities. This model was designed by
Peter Chen and published in 1976 papers. It was widely used in database designing. A
set of attributes describe the entities. For example, student_name, student_id describes
the 'student' entity. A set of the same type of entities is known as an 'Entity set', and
the set of the same type of relationships is known as 'relationship set'.
3) Object-based Data Model: An extension of the ER model with notions of
functions, encapsulation, and object identity, as well. This model supports a rich type
system that includes structured and collection types. Thus, in 1980s, various database
systems following the object-oriented approach were developed. Here, the objects are
nothing but the data carrying its properties.

4) Semistructured Data Model: This type of data model is different from the other
three data models (explained above). The semistructured data model allows the data
specifications at places where the individual data items of the same type may have
different attributes sets. The Extensible Markup Language, also known as XML, is
widely used for representing the semistructured data. Although XML was initially
designed for including the markup information to the text document, it gains
importance because of its application in the exchange of data.

17)a)Suppose that you are designing a schema to record information about reality
shows on TV. Your database needs to record the following information:
For each reality show, its name, genre, basic_info and participants name. Any reality
show has at least two or more participants.
For each producer, the company name, company country. A show is produced by
exactly one producer. And one producer produces exactly one show.
For each television, its name, start year, head office.  A television may broadcast
multiple shows. Each show is broadcasted by exactly one television.
For each user, his/her username, password, and age. A user may rate multiple shows,
and a show may be rated by multiple users. Each rating has a score of 0 to 10.

17)b)i)Explain in detail about different types of keys with example

Keys allow you to find the relation between two tables. It help you uniquely
identify a row in a table by a combination of one or more columns in that table.
Candidate Key: The minimal set of attribute which can uniquely identify a tuple is
known as candidate key. The value of Candidate Key is unique and non-null for
every tuple. There can be more than one candidate key in a relation.

Super Key: The set of attributes which can uniquely identify a tuple is known as
Super Key. Adding zero or more attributes to candidate key generates super key.

Primary Key: There can be more than one candidate key in a relation out of which
one can be chosen as primary key.
Foreign Key: If an attribute can only take the values which are present as values of
some other attribute in some other relation, it will be foreign key to the attribute to
which it refers.

17)b)ii)With example,explain the basic relalational algebra operations.

Relational algebra is a procedural query language. It gives a step by step process to


obtain the result of the query. It uses operators to perform queries.

Types of Relational operation

1. Select Operation:
o The select operation selects tuples that satisfy a given predicate.
o It is denoted by sigma (σ).

Notation:  σ p(r)  
Where:
σ is used for selection prediction
r is used for relation
p is used as a propositional logic formula which may use connectors like: AND OR
and NOT. These relational can use as relational operators like =, ≠, ≥, <, >, ≤.
For example: LOAN Relation
Skip Ad
BRANCH_NAME LOAN_NO AMOUNT

Downtown L-17 1000


Redwood L-23 2000
Perryride L-15 1500
Downtown L-14 1500
Mianus L-13 500
Roundhill L-11 900
Perryride L-16 1300
Input:

σ BRANCH_NAME="perryride" (LOAN)  
Output:
BRANCH_NAME LOAN_NO AMOUNT

Perryride L-15 1500


Perryride L-16 1300
2. Project Operation:
o This operation shows the list of those attributes that we wish to appear in the
result. Rest of the attributes are eliminated from the table.
o It is denoted by ∏.

Notation: ∏ A1, A2, An (r)   
Where
A1, A2, A3 is used as an attribute name of relation r.
Example: CUSTOMER RELATION
NAME STREET CITY

Jones Main Harrison


Smith North Rye
Hays Main Harrison
Curry North Rye
Johnson Alma Brooklyn
Brooks Senator Brooklyn
Input:

∏ NAME, CITY (CUSTOMER)  
Output:
NAME CITY

Jones Harrison
Smith Rye
Hays Harrison
Curry Rye
Johnson Brooklyn
Brooks Brooklyn

3. Union Operation:
o Suppose there are two tuples R and S. The union operation contains all the
tuples that are either in R or S or both in R & S.
o It eliminates the duplicate tuples. It is denoted by ∪.
Notation: R ∪ S   
A union operation must hold the following condition:
o R and S must have the attribute of the same number.
o Duplicate tuples are eliminated automatically.
Example:
DEPOSITOR RELATION
CUSTOMER_NAME ACCOUNT_NO

Johnson A-101
Smith A-121
Mayes A-321
Turner A-176
Johnson A-273
Jones A-472
Lindsay A-284
BORROW RELATION
CUSTOMER_NAME LOAN_NO

Jones L-17
Smith L-23
Hayes L-15
Jackson L-14
Curry L-93
Smith L-11
Williams L-17
Input:

∏ CUSTOMER_NAME (BORROW) ∪ ∏ CUSTOMER_NAME (DEPOSITOR)  
Output:
CUSTOMER_NAME

Johnson
Smith
Hayes
Turner
Jones
Lindsay
Jackson
Curry
Williams
Mayes

4. Set Intersection:
o Suppose there are two tuples R and S. The set intersection operation contains
all tuples that are in both R & S.
o It is denoted by intersection ∩.

Notation: R ∩ S   
Example: Using the above DEPOSITOR table and BORROW table
Input:

∏ CUSTOMER_NAME (BORROW) ∩ ∏ CUSTOMER_NAME (DEPOSITOR)  
Output:
CUSTOMER_NAME

Smith
Jones

5. Set Difference:
o Suppose there are two tuples R and S. The set intersection operation contains
all tuples that are in R but not in S.
o It is denoted by intersection minus (-).

Notation: R - S  
Example: Using the above DEPOSITOR table and BORROW table
Input:

∏CUSTOMER_NAME(BORROW) ∏ CUSTOMER_NAME (DEPOSTOR)  
Output:
CUSTOMER_NAME

Jackson
Hayes
Willians
Curry
6. Cartesian product
o The Cartesian product is used to combine each row in one table with each row
in the other table. It is also known as a cross product.
o It is denoted by X.

Notation: E X D  
Example:
EMPLOYEE
EMP_ID EMP_NAME EMP_DEPT

1 Smith A
2 Harry C
3 John B
DEPARTMENT
DEPT_NO DEPT_NAME

A Marketing
B Sales
C Legal
Input:

EMPLOYEE X DEPARTMENT  

Output:
EMP_ID EMP_NAME EMP_DEPT DEPT_NO DEPT_NAME

1 Smith A A Marketing
1 Smith A B Sales
1 Smith A C Legal
2 Harry C A Marketing
2 Harry C B Sales
2 Harry C C Legal
3 John B A Marketing
3 John B B Sales
3 John B C Legal

7. Rename Operation:
The rename operation is used to rename the output relation. It is denoted by rho (ρ).
Example: We can use the rename operator to rename STUDENT relation to
STUDENT1.
ρ(STUDENT1, STUDENT)  

You might also like