Computer Science Sumita Arora Database Concept
Computer Science Sumita Arora Database Concept
DATABASE CONCEPT
TYPE A : VERY SHORT ANSWER QUESTION
1.
What is the function of database management system ?
Ans. Following are the function of database management system:
- To organize information
- To store information
- To retrieve information
As efficiently and effectively as possible
2.
What is data redundancy? What are the problems associated with it?
Ans. Data redundancy means duplication of data. It causes duplicate data at different locations which destroys the
integrity of the database and wastage of storage space.
3.
How do database management system overcome the problems associated with data redundancy ?
Ans.
Database normalization prevents redundancy and makes the best possible usage of storage .Proper use of
foreign keys can minimize data redundancy and chance of destructive anomalies. However, concerns of efficiency
and convenience can sometimes result in redundant data design despite the risk of corrupting the data.
A solution to the problem is to place the redundant data in a separate table, one in
which the data no
longer will be redundant.
4.
How do database management system ensure data security and privacy ?
Ans. A database management system ensure data security and privacy by ensuring that only means of access to the
database is through the proper channel and also by carrying out authorization checks whenever access to sensitive
data is attempted.
5.
What are the three levels of data abstraction?
Ans.
a. Internal Level
b. Conceptual Level
c. External Level (View Level)
6.
What do you understand by data independence?
Ans. Data independence allows modification of a scheme definition in one level without affecting a scheme definition in
the next higher level.
7.
What are the two types of data independence? How they different?
Ans. There are two levels of data independence: Physical and Logical.
Physical Data Independence modifies the scheme followed at the physical level without affecting the scheme
followed at the conceptual level.
Whereas Logical Data Independence modifies the conceptual scheme without causing any changes in the
schemes followed at view levels.
8.
Define the following terms :
Ans. (i) Integrated database: Integrated database means union of several otherwise distinct data files, with any
redundancy among those files partially or wholly eliminated.
(ii) Shared database: Sharing of data means that individual pieces of data in the database may be shared among
several different users, in the sense that each of those users may have access to the same piece of data and each
of them may use it for different purpose. The database which contains this type of data is called shared database.
(iii) View: A view is a pseudo-table or virtual table. It displays the data. The data is derived from one or more base
tables.
(iv) Database system: A database is a collection of interrelated data and a database system is basically a computer
base recordkeeping system.
(v) Data security: Data security refers to protection of data against accidental or intentional disclosure to
unauthorized persons, or unauthorized modification or destruction.
(vi) Data integrity: Data integrity refers to maintaining and assuring the accuracy and consistency of data over its
entire life cycle
9.
Name the different data models available for database system. Which of them is the most preferred one ?
Ans. There are generally three data models available as following :
(i)Relational Model
CBSE CS N IP
Page 1 of 6
10.
Ans.
11.
Ans.
12.
Ans.
13.
Ans.
14.
Ans.
15.
Ans.
16.
Ans.
17.
Ans.
CBSE CS N IP
Page 2 of 6
18.
Ans.
19.
Ans.
20.
Ans.
21.
Ans.
22.
Ans.
23.
Ans.
For example, in the following table ITEM, the column Ino can uniquely identify each row in the table, hence Ino is
the primary key of the following table.
Ino
Item
Quantity
1
Pen
220
2
CD
530
3
DVD
450
4
Duster
110
What do you understand by the terms Primary Key and Degree of a relation in relational database?
A primary key is a column (or columns) in a table that uniquely identifies each row. A primary key value is
unique and cannot be null. There is only one primary key for a table.
Number of columns(attributes) in a relation are called its degree.
What do you understand by the terms Candidate Key and Cardinality of relation in relational database?
A candidate key is a column (or columns) that uniquely identify rows in a table. Any of the identified
candidate keys can be used as the table's primary key.
Cardinality of relation represents number of rows (or tuples) in a relation.
What is the function of select and project operation ?
The select operation selects tuples from a relation that satisfy a given condition. The selection is denoted by
lowercase Greek letter (sigma).
The project operation yields a vertical subset of a given relation in contrast to the horizontal subset returned
by select operation. The projection lets you select specified attributes in a specified order. Projection is denoted by
Greek letter pi().
What is the Cartesian product? How is it different from join operation?
When you join two or more tables without any condition, it is called Cartesian product or Cross Join.
The difference between Cartesian Product and Join is In Join operation we have to mention the column name
from both the tables on which join has to be perform for eg. Select EmpName,Salary from Employee, SalaryRange
where Employee.Salary =SalaryRange.MinSalary.
Whereas in Cartesian product we do not mention any condition for eg. Select a.Id,b.Id from Employee a,Manager
b;
What does union operation do? What are the conditions to carry out union operation?
The union operation is a binary operation that requires two relations as its operands. It produces a third relation
that contains tuples from both the operand relations. The union operation is denoted by . Thus, to denote the
union or two relations X and Y, we will write as X Y.
Following two condition must be satisfied by two operands A and B :
(i)The relations A and B must be of the same degree. That is, they must have the same number of attributes.
(ii) The domains of the ith attributes of A and the ith attributes of B must be the same.
What are the set difference and set intersection operations? How are they different?
The set difference operation, denoted by (minus) allows us to find tuples that are in one relation but not in
another. The expression A B results in a relation containing those tuples in A but not in B.
The set intersection operation finds tuples that are common to the two operands relations. The set intersection
operation is denoted by . That means A B will yield a relation having tuples common to A and B.
The difference between these two is that in set difference operation the result will contain those tuples which are
in one operand but not in other.
Whereas in set intersection operation result will contain those tuples which are common in both the operands.
Give the following relations
Page 3 of 6
24.
Ans.
25.
Ans.
26.
Ans.
27.
Ans.
28.
Ans.
30.
Ans.
31.
Ans.
32.
Ans.
33.
Ans.
34.
Ans.
35.
Ans.
36.
Ans.
37.
char(20),
char(20),
char(15),
integer,
char(10),
integer,
decimal,
decimal,
date);
CBSE CS N IP
Page 4 of 6
CBSE CS N IP
Page 5 of 6
Ans.
6.
Ans.
7.
Ans.
8.
Ans.
9.
Ans.
CBSE CS N IP
Page 6 of 6