(A) MULTIPLE CHOICE QUESTIONS
Q.1 A relational database consists of a collection of :-
(1) Table (2) Fields (3) Records (4) Keys
Ans. (1)
Q.2 A relational database consists of a collection of :-
(1) Tuples (2) Attributes (3) Relations (4) Keys
Ans. (3)
Q.3 A(n).............. in a table represents a logical relationship among a set of values.
(1) Attribute (2) Key (3) Tuple (4) Entry
Ans. (3)
Q.4 The term ........ is used to refer to a record in a table.
JI
(1) Attribute (2) Tuple (3) Field (4) Instance
Ans. (2)
Q.5 The term....... is used to refer to a field in a table.
(1) Attribute (2) Tuple (3) Row (4) Instance
Ans. (1)
LA
(B) NCERT BASED QUESTIONS
Very Short Answer Type Questions
Q.1 MySQL provides some command line programs and GUI programs. Name some of these.
Ans. Command line programms : mysqldump and mysqladmin
GUI programs : MySQL Administrator and MySQL QueryBrowser
Q.2 Write the full form of the following abbreviations : (i) DDL (ii) DML
Ans. (i) DDL : Data Definition Language
(ii) DML : Data Manipulation Language
A
Short Answer Type Questions
Q.3 What is a database system? What is its need?
Ans. A database is a collection of interrelated data and a database system is basically a computer
based recordkeeping system.
A typical file processing system suffers from some major limitations like data redundancy
B
(duplication of data), data inconsistency, unsharable data, unstandardized data, insecure data,
incorrect data etc. On the other hand, a database system overcomes all these limitations and
ensures continuous efficiency.
The advantages provided by a database system are :
(i) Reduced data redundancy (ii) Controlled data inconsistency
(iii) Shared data (iv) Standardized data
(v) Secured data (vi) Integrated data.
Therefore, to have the systems with increased performance and efficiency, the database systems
are preferred.
CHEMISTRY & PHYSICS CLASSES BY ANKUR SIR 7983744732
Q.4 Can you think of disadvantages of using a database system? What are these?
Ans. With the complex tasks to be performed by database systems, certain things may crop up that
may be termed as disadvantages of using database system. These are :
1. Security may be compromised without good controls.
2. Integrity may be compromised without good controls.
3. Extra hardware may be required.
4. Performance overhead may be significant.
5. System is likely to be complex.
Long Answer Type Questions
Q.5 Differentiate between CHAR and VARCHAR datatypes.
JI
Ans. The difference between CHAR and VARCHAR is that of fixed length and variable length. The
CHAR datatype specifies a fixed length character string. When a column is given datatype
as CHAR(n), then MySQL ensures that all values stored in that column have this length
i.e., n bytes. If a value is shorter than this length n then blanks are added, but the size of value
remains n bytes.
VARCHAR, on the other hand, specifies a variable length string. When a column is given
LA
datatype as VARCHAR(n), then the maximum size a value in this column can have is n bytes.
Each value that is stored in this column stores exactly as you specify it i.e., no blanks are added
if the length is shorter than maximum length n. However, if you exceed the maximum length n,
then an error message is displayed.
Consider a table Emp as given below :
empno ename job mgr hiredate sal comm deptno
8369 SMITH CLERK 8902 1990 12 18 800.00 NULL 20
8499 ANYA SALESMAN 8698 1991 02 20 1600.00 300.00 30
A
8521 SETH SALESMAN 8698 1991 02 22 1250.00 500.00 30
8566 MAHADEVAN MANAGER 8839 1991 04 02 2985.00 NULL 20
8654 MOMIN SALESMAN 8698 1991 09 28 1250.00 1400.00 30
8698 BINA MANAGER 8839 1991 05 01 2850.00 NULL 30
8882 SHIAVNSH MANAGER 8839 1991 06 09 2450.00 NULL 10
8888 SCOTT ANALYST 8566 1991 12 09 3000.00 NULL 20
B
8839 AMIR PRESIDENT NULL 1991 11 18 5000.00 NULL 10
8844 KULDEEP SALESMAN 8698 1991 09 08 1500.00 0.00 30
8886 ANOOP CLERK 8888 1993 01 12 1100.00 NULL 20
8900 JATIN CLERK 8698 1991 12 03 950.00 NULL 30
8902 FAKIR ANALYST 8566 1991 12 03 3000.00 NULL 20
8934 MITA CLERK 8882 1992 01 23 1300.00 NULL 10
You can create above table by running the script file crEmpDep under SampleDB folder. For
this, you need to simply write SOURCE D:/SamplDB/[Link] on mysal> promopt
CHEMISTRY & PHYSICS CLASSES BY ANKUR SIR 7983744732
(C) CASE BASED STUDY
Q.1 A library uses a database management system (DBMS) to store the details of the books that it
stocks, its registered members and the book–loans that the library has made. These details are
stored in a database using the following three relations. Name of the Database : KV Library.
Book (BookID : Char(5), Title : Varchar(25), Author : Varchar(25), Publisher : Varchar (100))
Member(Member ID : Char (5), Last Name : Varchar(25), FirstName : Varchar(25),
Correspondance–Address : Varchar(100), Pincode : Char(6), Date of Birth : Date, EmailID :
Varchar(50))
Loan (MemberID : Char(5), BookID: Chart(5), LoanDate : Date, DueBackDate : Date,
JI
Returned : Boolean)
Note : The liberary does not stock more than one copy of the same book.
(a) Identify following types of keys from all the relations of the given database :
Foreign keys along with parent relations.
LA
(b) Can a relation have multiple foreign keys? Give example.
(c) Can a foreign key be part of a primary key? Give example.
(d) Write a SQL query to retrieve the names and email addresses of the members belonging to
KVS (they have email ids as _ @ [Link]) and who have not returned their books.
Ans.(a)Foreign Keys in Relation Loan
A
Member ID (Parent table Member)
BookID(Parent table Book)
(b) Yes, a relation can have multiple foreign keys, e.g., the Loan relation given above has two
foreign keys – MemberID and BookID.
B
(c) Yes, a foreign key can be a part of a composite primary key, e.g, the primary key of relation
Loan is : (Member ID, Book ID, Loan Date), which contains two foreign keys: Member ID and
Book ID.
(d) SELECT First Name, Last Name, EmailID
FROM Member, Loan
WHERE [Link] = [Link]
AND EmailID LIKE = %@[Link] AND Returned = "F" ;
CHEMISTRY & PHYSICS CLASSES BY ANKUR SIR 7983744732
(D) TRUE OR FALSE
Q.1 A table in a relational database can store empty values.
Ans. (F)
Q.2 A relation is a table having unordered non-atomic values.
Ans. (T)
Q.3 A primary key can store empty value in it.
Ans. (F)
Q.4 Common attribute of two tables is called a foreign key.
Ans. (F)
Q.5 A common attribute of two tables is called a foreign key if it is the primary is one table.
Ans. (T)
JI
(E) FILL IN THE BLANKS
Q.1 Collection of logically related data tables is called a .........
Ans. Database
Q.2 The duplication of data is known as data........
LA
Ans. redundancy
Q.3 A pool of values wherefrom a field can draw values, is called..........
Ans. domain
Q.5 A raw in a relation is called a...........
Ans. tuple
A
B
CHEMISTRY & PHYSICS CLASSES BY ANKUR SIR 7983744732
PCB ALL IN ONE #3.0( EKTA)
2024 NEW
MATHS 12th boards 2024
discussion group# 2.0
GROUP LINK
GROUP -1
GROUP -2
GROUP -3