0% found this document useful (0 votes)
558 views

Sample Paper Questions on Database Management System

Uploaded by

swaroop64734
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
558 views

Sample Paper Questions on Database Management System

Uploaded by

swaroop64734
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Grade – 10 (Phase 2)

Part B – Unit 3: Database Management System


Sample Question Paper
Objective Type Questions
1. It enables users to view, enter, and change data directly in database objects. [ c ]
a. Report b. Query c. Form d. Table
2. There are _______ types of Relationships in a table of a database. [ b ]
a. One b. Three c. Four d. Many
3. A Relational database uses _____________ commands which is a standard user application that
provides an easy programming interface for database interaction. [ c ]
a. Access b. Python c. SQL d. Protocol
4. Suraj wants to create a database for his clients. For this purpose, he needs to store the Email IDs
of his clients. Which datatype should he use to accomplish this purpose. [ b ]
a. Numeric b. Varchar c. Binary d. Boolean
5. Geet has written a SQL query in SQL view. But he doesn’t know how to execute the query using
keyboard keys. Suggest him the shortcut key to complete the task. [ d ]
a. Enter b. Ctrl + E c. Space bar d. F5
6. A table can have only _________ primary key in a database. [ a ]
a. One b. Two c. Three d. Many
7. The details associated with an entity are called ____________. [ b ]
a. Table b. Attributes c. Records d. Primary Key
8. The _____________ data is a combination of letters, numbers or special characters. [ d ]
a. Structured b. Unstructured
b. Semi – Structured d. Alphanumeric
9. In a Query Design wizard, which of the following buttons is clicked to move a field from Available
fields’ list box to ‘Fields in the query‘ list box? [ a ]
a. > b. <9 c. V d. ^
10. Identify the mode, where we can modify in the structure of table? [ c ]
a. Datasheet View b. Structure View
c. Design View d. All of the above
11. What is the primary purpose of a query in a database? [ c ]
a. To enter new records b. To create reports
c. To retrieve specific data d. To design forms
12. Which of the following is NOT true about forms? [ d ]
a. It is the front end for data entry
b. It can contain text fields
c. Graphics can be inserted on the form
d. It can accept only fixed number of records
13. _________ means that the query uses criteria you provide to hide some data and display only
required data. [ a ]
a. Filtering b. Sorting c. Report d. Forms
14. Which of the following application is not appropriate to store data about ABC Bank customers?
[ b ]
a. Base b. Writer c. MS Access d. MS Excel
15. Identify the property which help to set the number of characters in text/ varchar type field of a
table in DBMS. [ d ]
a. Entry Required b. Size
b. Default Value d. Length
16. The length of the field value of text data type is _____ characters by default in DBMS.
[ d ]
a. 10 b. 25 c. 20 d. 50
17. Identify the mode, where we can modify in the structure of table? [ b ]
a. Datasheet View b. Design View
c. Structure View d. All of the above
18. __________ store data in a single table which is suitable to store less amount of Data.
[ a ]
a. Flat File b. Relational File c. Mini File d. Single File
19. ___________ database is a type of database that stores data in several tables. [ b ]
a. Flat b. Relational c. Both a & b d. None of them
20. In database _________ helps us to retrieve the filtered data based upon some conditions.
[ c ]
a. Forms b. Reports c. Queries d. Table
21. Rudraksh wants that the name column of a table must not be left blank. Help him to identify the
field property for this purpose. [ c ]
a. Length b. Default c. Entry Required d. Format
22. ___________ can be set for a field if the user doesn't provide any value while entering the values
in the table. [ b ]
a. Required b. Default c. Primary Key d. Format
23. Aadya wants to create a connection between two or more tables. Suggest her the option to
accomplish the task. [ c ]
a. Table b. Form c. Relationships d. Sorting
24. _____________ data type takes the values in the form of 0 and 1 in the database. [ c ]
a. Integer b. Text c. Boolean d. Memo
25. ____________statement is used to retrieve records in a database. [ c ]
a. Alter b. Update c. Select d. Create
26. ___________ represents a single, data item in a table. [ a ]
a. Row b. Column c. Datatype d. Primary Key

Subjective Type Questions


Answer the following questions in 20 – 30 words.
1. Differentiate between a Primary key and Foreign key.
A. A primary key is a unique value that identifies a row in a table, whereas a foreign key identifies a
column or set of columns in one (referencing) table that refers to a column or set of column in
another (referenced. table. A table can have only Primary Key but a table can have multiple
foreign keys.
2. Describe referential Integrity.
A. Referential Integrity ensures that relationships between tables in a database remain consistent.
It means that a foreign key in one table must match a primary key in another table, or be null, to
maintain accurate and valid links between related data.
3. List Numeric and Alphanumeric Datatypes in OpenOffice Base.
A. Numeric datatypes are: TinyInt, SmallInt, Integer, BigInt, Decimal, Real, Float, Double and
Boolean.
Alphanumeric Datatypes are: Char(fix), Varchar, Varchar_ignorecase and Longvarchar(Memo)
4. How Entry Required and Default Value properties of a table field in a database are different
from each other?
A. Entry Required – if set to yes then it will be necessary for the user to insert the value in the field
which means that field cannot be left blank.
Default Value – A default value can be set for a field if user don’t provide any value while entering
the values in the table.
5. What is Referential Integrity? Explain its two(any) purposes.
A. Referential Integrity is used to maintain accuracy and consistency of data in a relationship. In
Base, data can be linked between two or more tables with the help of primary key and foreign
key constraints.
Referential integrity helps to avoid:
1. Records can be added to a related table, if there is no associated record available in the primary
key table.
2. The values can be modified in a primary if any dependent records are present in the associated
table(s).
3. Deleting records from a primary key table if there are any matching related records available
in associated table(s).
6. Identify the columns and data types of a table: Airlines. Mention at least four columns with
data type.
A. Columns Data type
Flight No Text
No.of Passengers Integer
Airlines Text
Arrival Time Date/Time
Departure Time Date/Time
Fares Float
7. Differentiate between Primary key and Foreign key.
A. A primary key is a unique value that identifies a row in a table whereas a foreign key identifies a
column or set of columns in one (referencing) table that refers to a column or set of columns in
another (referenced) table. A table can have only one primary Key but a table can have multiple
foreign keys.
8. Differentiate between Flat File and Relational Database
A. Flat File: Data is stored in a single table. Usually suitable for less amount of data.
Relational Database: Data is stored in multiple tables and the tables are linked using a common
field. Relational is suitable for medium to large amount of data.
9. Define the following: Table, Primary Key, Foreign Key
A. Table: A table is a collection of related data held in a table format within a database. It consists
of columns, and rows.
Primary Key A primary key is a unique value that identifies a row in a table. For example, Student
Table contains columns such as Admno, Name, DOB, Address, Phone and Admno can be
considered as Primary Key
Foreign Key: a foreign key is a field or a column that is used to establish a link between two tables.
In simple words you can say that, a foreign key in one table used to point primary key in another
table.
10. What is DDL and DML? Give one example of each.
A. Data Definition Language (DDL): A data definition language or data description language (DDL) is
a standard for commands that define the different structures in a database. DDL statements
create, modify, and remove database objects such as tables, indexes, and users. Example CREATE,
ALTER, and DROP.
Data Manipulation Language (DML): A data manipulation language (DML) is a language that
enables users to access and manipulate data in a database. The goal is to provide efficient human
interaction with the system. For Example Insert, Update, Delete and Select
11. Define the following terms
a. Tuple
b. Foreign Key
c. DBMS
A. Tuple: A row also called a record or tuple represents a single, data item in a table
Foreign Key: The foreign key identifies a column or set of columns in one (referencing) table that
refers to a column or set of columns in another (referenced) table.
DBMS : Database Management System is a software package with computer programs that
controls the creation, maintenance, and use of a database.

Answer the following questions in 50 – 80 words.

1. Explain with example any two commands each of DDL and DML.
A. DDL commands
CREATE: It is used to create an object like table in database.
DROP: It is used to delete database objects.
DML commands
SELECT: It is used to retrieve data from the database Table.
INSERT INTO: It is used to insert a line of new data fields into a Table.
2. Explain the term “Referential Integrity”. Why is it important in a database?
A. Referential Integrity is used to maintain the accuracy and consistency of data in a relationship. In
Base, data can be linked between two or more tables with the help of primary key and foreign
key constrains.
Referential Integrity is important in DBMS as:
• It prevents the entry of duplicate data.
• It prevents one table from pointing to a nonexistent field in another table.
• It prevents consistency between “Partnered” tables.
• It prevents the deletion of a record that contains a value referred to by a foreign key in another
table.
• It prevents the addition of a record to a table that contains a foreign key unless key unless there
is primary key in the linked table.
3. Consider the following Vendor table and write the queries for the following:
Table: DateSheet

i) Write a SQL command to display the records in ascending order by date of exam.
ii) Write a query to display the above date sheet.
iii) Write a query to display the subject name and date of the exam held on ‘Monday’
iv) Write a SQL command to display the date of exam and Sub_Name of Science Subject.
A. i) Select*from Datesheet order by DateofExam
ii) Select*from Datesheet
iii) Select Sub_Name, DateofExam from Datesheet where Days= ‘Monday’
iv) Select Sub_Name, Date of Exam from Datesheet where Sub_Name = ‘Science’
4. Consider the following table: Employee
Employee Table
Emp_id Name Salary Designation
E01 Kajal 78000 Manager
E02 Rahul 50000 Sales Executive
E03 Tarun 55000 Clerk
(a) You are tasked with designing a new employee database for your company. Based on the
given table structure, identify the fields that would be necessary to store key information about
each employee.
(b) As a database administrator, you need to ensure each employee has a unique identifier.
Which field in the table would you choose as the primary key, and why?
(c) During a review of the employee database, you realize there could be another field apart from
the primary key that can uniquely identify a record. Identify the field and justify why it could
serve as an alternate key.
(d) You are integrating the employee table with another table that stores department details.
Explain how you would use the primary key from the employee table & a foreign key in the
department table to establish a relationship between the two tables.
Illustrate with an example.
A. a. Emp_id, Name,Salary, Designation
b. Emp_id
c. Combination of Emp_id and Name
d. Primary Key: Unique identifier for each row in a table, cannot be NULL.
Example:
Emp_id in Employees.
Foreign Key: Links to a primary key in another table, establishing relationships.
Example:
Emp_id in Orders referencing Emp_id in Employees
5. Consider the following table: Sales

1. How many fields and records are there in Sales table?


2. Write SQL commands for the following:
i. Display Sales ID and price of all products whose discount is more than 1000.
ii. Display the details alphabetically by product name.
iii. Display product name and sales price after deducting the discount from the price. Note:
Sales price can be calculated as (price-discount)
A. 1. Four fields and four records are there in table Sales.
2. SQL Commands:
i. select Sale_Id, Price from Sales where Discount > 1000;
ii. select * from Sales order by Prod_Name;
iii. select Prod_Name, Price- Discount from Sales;
6. Your friend owns a chemist shop, he needs to keep records of the medicines with their id’s, date
of purchase, expiry date, price, etc. in a database program. But he does not have any knowledge
about the database. Explain to him the following to get a better understanding of the DBMS
concepts.
1. What is DBMS? Explain in brief.
2. Name any two database programs which can be used to create a table and store the data as
per the requirement.
3. Which field can be set as a Primary Key?
4. Is it possible to make more than one field as a primary key in your table? (Yes/No). Justify
your answer.
A. 1. A database management system is a software package with computer programs that controls
the creation, maintenance, and use of a database. It allows organizations to conveniently develop
databases for various applications.
2. Two databases are: i. Microsoft Access ii. MySQL iii. OpenOffice Base
3. Id field will be suitable for Primary Key.
4. Yes, we can make more than one column as a primary key in a table and it is known as Composite
Primary Key.
7. Consider the table: Teachers
Write SQL commands:
a. To show all the information about IT teachers.
b. To list the details of all the teachers who are getting salary between 20000 to 35000.
c. To display the subject of all the teachers whose age is more than 40 years.
d. To display the list of names of all the teachers in alphabetical order.
A. Select * from Teachers where subject = “COMPUTER”;
b. Select * from teachers where salary >= 20000 and salary <= 35000;
c. Select Subject from Teachers where age > 40;
d. Select * from Teachers order by name
8. What is DBMS? Explain any two advantages of DBMS.
A. A database management system is a software package with computer programs that controls the
creation, maintenance, and use of an integrated collection of data records, files, and other objects.
It allows organizations to conveniently develop databases for various applications.
Advantages:
i) Data integrity: means the data is accurate and consistent in the database. It is very important as
there are multiple databases in a DBMS so it helps to produce the correct result.
ii) Data sharing: In a database, the users can share the data among themselves. Data can be shared
for multiple purposes with the users located at different geographical locations then remote users
can also access the database simultaneously.
9. a) The structure of a table “ITEM” is given below. Suggest suitable data type and size of each
column.
Column name Type Size
Itemno ____________ _____________
Iname ____________ _____________
Price ____________ _____________
Quantity ____________ _____________

b) Consider the following table: ITEM

Item No Iname Price Quantity


11 Soap 40 80
22 Powder 80 30
33 Face Cream 250 25
44 Shampoo 120 100
55 Soap box 20 50
Write queries to

i. Display the total amount of each item. The amount must be calculated as the price multiplied
by quantity for each item.

ii. Display the details of items whose price is less than 50.

A. a. Itemno  integer  10
Iname  varchar  15
Price  decimal  5,2
Quantity  integer  3
b. i. Select price * quantity from item;
ii. Select * from item where price < 50;
10. (a) Write a Query to create a Table with the following structure
Table: Product
Field Datatype
PID Char(4)
Pname Varchar(20)
Description Varchar(40)
Price Decimal
(b) Consider the following Vendor table and write the queries
Table: Vendor
VendorID VName DateofRegistration Location
V001 Mother Diary 20-01-2009 Delhi
V002 Havmor 01-04-2015 Gujarat
V003 Amul 12-05-2012 Kolkata
V004 Kwality Walls 15-10-2013 Mumbai
i. Write a Query to display all records
ii. Write a Query to add a new row with the following details
(„V005‟, „Vadilal‟, „2010-03-20‟, „Pune‟)
iii. Write a query to modify the location of V003 from Kolkata to Gujrat
A. (a) Create table Product (PID Char(4), Pname Varchar(20), Description Varchar(40), Price
Decimal);
(b) (i) Select * from Vendor;
(ii) Insert into Vendor values („V005‟, „Vadilal‟, „2010-03-20‟, „Pune‟);
(iii) Update Vendor Set location= „Gujrat‟ Where location= „Kolkata‟;
11. Write command to create a table named ‘BOOK’ with following fields:
BOOK ID Char(4)
Bname Varchar(15)
Author Varchar(20)
Price Decimal
a. Identify the primary key of the ‘Book’ Table, also mention the suitable reason for choosing
it as a Primary Key
b. Differentiate between
(i) char and varchar datatype
(ii) DDL and DML
A. Create table BOOK (BOOK_ID char(4), Bname varchar(15), Author varchar(20), Price Decimal );
(a) Book_id may be chosen as the Primary key because every book has a unique id that may be
used to identify the book.
(i) Char and Varchar
Char Varchar
Stores exactly the length specified by It Stores up to the specified length.
user in field definition.
Pads with trailing spaces for shorter No padding with extra spaces.
strings.

(ii) DDL and DML


Data Definition Language (DDL) Data Manipulation Language (DML)
A data definition language or data A data manipulation language (DML)
description language (DDL) is a standard is a language that enables users to
for commands that define the different access and manipulate data in a
structures in a database. database.

12. Write the SQL Commands to answer the queries based on Fabric Table

(a) To insert the following record: (“F005”, “Kurta”, “Woollen”,5)


(b) To display only those fabric whose disc is more than 10
(c) To display those records whose type is “Woollen”
(d) To modify the fabric shirt by increasing discount by 10
(e) To delete the record of fabric ‘F003’ from table
A. (a) insert into Fabric values (‘F005’, ‘Kurta’, ‘Woollen’,5);
(b) select * from Fabric where Disc>10;
(c) select * from Fabric where type = ‘Woollen’;
(d) update fabric set Disc =Disc + 10 where Fname = ‘Shirt’;
(e) delete from Fabric where FabricID =‘F003’;

You might also like