9 Databases - 19feb2022
9 Databases - 19feb2022
19 February 2022
Notes
1. The numbers, words, images and symbols which do not bear a meaning, when
standing alone are called data.
2. There are 4 major objects in the database namely Forms (For input purposes
can view one record at a time), Tables (where the data is stored), Query (We
can retrieve existing information also we can add new information or update
or delete existing information) and report (only servers as an output of the
information generally from the query or directly from the table).
3. Table columns are known as fields which consists of similar type of data.
4. Collection of records known as file.
5. RDBMS - Relational Data Base Management Systems is the most widely used Data
Base Management System we will focus with RDBMS in the part 2 question. We
study about the relationship between the table of a particular database. We
can form a RDBMS by joining the common fields of the tables.
6. A column (or combination of columns) which enables to identify a record
uniquely is called the primary key.
a. Primary key must be unique (i.e. no duplicates).
b. Primary key is not null (i.e. cannot be empty).
c. There is no necessity that table must have a primary key in a database.
d. Primary key can be any datatype
7. A column (or combination of columns) which enables to identify a record
uniquely of another table is called the foreign key.
a. To be a foreign key it must be a primary key in some other table. As we
have to write the written paper you need to make sure that there is a
primary key with the same name in some other table.
b. Foreign key can have duplicates.
c. There is no necessity that table should have a foreign key in a
database.
d. Foreign key can be any datatype.
8. Primary key from one table and foreign key of another table establish the
relationships between the tables. Relationship could be
a. One to one written as 1:1
b. One to many writen as 1:m
c. Many to one written as m:1
d. Many to many written as m:n (Many to many must be m:n only and never as
m:m as if someone divide both sides by m then it becomes 1:1 which is
one to one which negates the purpose).
9. Popular databases Include
a. Commercial databases
i. Microsoft Access
b. Open and Free databases
i. Openoffice.org Base
ii. Libreoffice Base
iii. MySQL community edition
10. Microsoft Excel, OpenOffice.org Calc, Libre Office Calc are classified as
spreadsheets and not as databases.
11. Care should be taken with the part 2 questions that you need to write the
exact name of the table with the exact number if you write more than what is
required you will not be awarded any marks. If the table name consists of _
then we should write with the _ otherwise you will lose the marks.
12. Unit wise questions can be done online via http://ictmcq.home.blog
Questions
1. An example of a key field in a Table which contains data of patients in a
hospital be OL2007MCQ28
(1) Date of admission (2) Admission number (3) Name (4) Address
11. When is the part of the table in a database that contains one specific type
of data? OL2009MCQ22
1)Query 2)Report 3)Record 4)Field
14. A database includes a table that contains data about students in a school.
Data relating to one student in the table is a OL2010MCQ20
1)field 2)record 3)form 4)query
15. Which of the following can be used as a primary key of a database table in
storing data about students? OL2010MCQ21
1)Date of birth 2)Surname 3)Class 4)Student admission number
20. Which of the following can be used to enter data into a database?
GIT2010MCQ31
1)Chart 2)Form 3)Report 4)Index
21. Which of the following is correct regarding the primary key in a relational
database table? OL2011MCQ19
1)It must be unique 2)It must be numeric data type 3)It can be empty 4)It
must be a text data type
Use the following table containing information about books to answer below 2
questions
ISBN Title Author Edition Publisher Price
Number
23. Which of the following is most suitable as the primary key of the above
table? OL2011MCQ21
1)Title 2)Price 3)ISBN Number 4)Author
25. In a database table, rows are identified as records and columns are
identified as? GIT2011MCQ29
1)Labels 2)Fields 3)Datatypes 4)Cells
26. Which of the following can be used to locate specific records within tables?
GIT2011MCQ30
1)Forms 2)Queries 3)Lists 4)Charts
27. Which of the following data type is most suitable to hold the National
Identity Card number (e.g. 123456780V) in a database table? GIT2011MCQ31
1)Text 2)Number 3)Currency 4)Data/Time
28. Which of the following database types is widely used in the computer
applications? AL2011MCQ07
1)Flat file 2)Hierarchical 3)Network 4)Relational 5)Object Oriented
30. How many fields are used to store data in the given table segment?
OL2012MCQ22
1)2 2)3 3)4 4)6
31. What is the most suitable data type for "Student_number"? OL2012MCQ23
1)Currency 2)Date/Time 3)Number 4)Text
32. Which of the following is correct regarding the 'primary key' of a database
table? OL2012MCQ24
1)Primary key can be empty 2)Primary key must be of numeric data type
3)Primary key must be of text data type 4)Primary key must be unique
35. "A ……………………..is any field or combination of field in a database table that
uniquely identifies each record". Which of the following word(s) best fits
to fill the in the given blank of the above statement? GIT2012MCQ30
1)Cell 2)Primary Key 3)Logical Key 4)Query
38. Which of the following is most suitable as a primary key for a database
table used for storing data about books in a library? OL2013MCQ05
1)book number 2)publisher 3)surname of author 4)book title
39. All data about one computer part in the table is called a OL2013MCQ22
1)field 2)key 3)query 4)record
41. A database includes a table that contains data about students in a school. A
………………………in the table holds data related to one student. GIT2013MCQ29
Which of the following terms is suitable to fill the blank in the above
statement?
1)field 2)record 3)form 4)query
47. A database table contains data about sports items available for sale in a
shop. Available sports items are cricket bats, tennis balls, volley balls,
net balls and Tennis rackets. Data about one sport item in the table is a
OL2014MCQ16
1)field 2)foreign key 3)form 4)record
50. Which of the following is the most suitable field for the primary key of a
database table used for storing data about students in a school?GIT2014MCQ16
1)class 2)date of birth 3)student admission number 4)surname
Consider the following database table to answer below three questions. This
table shows the data about items currently available in a sports good shop.
Item_Num Item_Name Quantity Unit_Price
Below 3 questions are based on the following database. The tables show data
about books available for sale in a bookshop and the book publishers:
54. What is the most suitable data type for the Unit_Price in Book
Table?OL2015MCQ25
1)Currency 2)Data 3)Number 4)Text
55. Which of the following is most suitable as the primary key for the Book
table? OL2015MCQ26
1) Book_ID 2)Book_Name 3)Quantity 4)Unit_Price
56. Which of the following field names is an example for foreign key?
OL2015MCQ27
1)Book_Name in Book Table 2)Book_ID in Book_publisher Table
3)Publ_Phone in Publisher Table 4)Pubisher_Name in Publisher Table
Consider the following database table to answer the below 3 questions. The
table shows data about items available for sale at a school canteen.
58. What is the most suitable data type for 'Unit_Price'? GIT2015MCQ12
1)Boolean 2)Currency 3)Number 4)Text
60. Which of the following fields is most suitable as the primary key?
GIT2015MCQ14
1)Product_ID 2)Quantity 3)Supplier_ID 4)Unit_Price
62. Which of the following is the most suitable field to be selected as the
primary key for the Taxi table? OL2016MCQ12
1)Taxi_No 2)Rate_Type 3)Driver_name 4)Driver_City
63. Which of the following fields is an example for a foreign key in the
database? OL2016MCQ13
1)Taxi_No in Taxi Table 2)Rate_Type in Taxi Table 3)Rate_Type in Rate
Table 4)Driver_City in Taxi Table
64. How many fields and records available in the Rate Table, respectively?
OL2016MCQ14
1)2 and 2 2)2 and 3 3)3 and 2 4)3 and 3
Below 4 Questions are based on the following database tables that are used
to store student subject marks.
70. What would be the most suitable field as the primary key for the student
Table? OL2017MCQ20
(l) Student_No (2) DoB (3) Name (4) Class
71. What would be an example for a foreign key in the database? OL2017MCQ21
(l) Sub_Code in Subject Table (2) Sub_Code in Marks Table
(3) Marks in Marks Table (4) DoB in Student Table
72. How many marks did Kapila obtain for English? OL2017MCQ22
(1) 65 (2) 70 (3) 80 (4)85
75. The company uses the Mobile_Phone_No as the primary key at present. Which of
the following reasons will make it unsuitable as the primary key?
GIT2017MCQ33
A - Two employees may share the same mobile phone number.
B - A new employee may not use a mobile phone.
C - Some employees may change their mobile phone numbers often.
1)A and B only 2)A and C only 3)B and C only 4)All A, B and C
76. Which of the following fields is useful to calculate the service period of
an employee? GIT2017MCQ34
1) Basic_Salary 2)Date_Of_Birth 3)Date_Joined 4)Mobile_Phone_No
Below 2 Questions are based on the following 𝐛𝐨𝐨𝐤𝐬 𝐭𝐚𝐛𝐥𝐞 used to keep records
of book in the library:
79. Consider the following two tables named 𝐌𝐚𝐫𝐤𝐬 and 𝐒𝐮𝐛𝐣𝐞𝐜𝐭𝐬:
Table: Book (Contains the details of books and whether each book is reserved
or not.)
Book_ID Title Reserved
84. A student gets the library membership and reserves a book. What table need
to be updated for this purpose? OL2019MCQ24
1)Book table and Reservation table
2)Book table and Student table
3)Reservation table and Student table
4)Book table, Reservation table and Student table
Below 3 Questions are based on the following database tables that are used
to store data about authors, books and the books written by authors
87. Who is author of the book titled "Mathematics with Fun" OL2020MCQ21
1)Anil Ratnayake 2)Indika Serasinghe 3)Sharaf Khan 4)Lalith Wijenayake
Answers
1. Admission number
2. Text
3. Query
4. Record
5. Database Management Software
6. Descending
7. key field
8. Fields
9. relational database
10. lengthy txt
11. Field
12. Records
13. OpenOffice.org Base
14. Record
15. Student admission number
16. B and C only
17. Record
18. Wizard
19. a, b and c
20. Form
21. It must be unique
22. 4, 6
23. ISBN Number
24. A and B only
25. Fields
26. Queries
27. Text
28. Relational
29. 4 - Records
30. 3 - Fields
31. Text
32. Primary key must be unique
33. Queries can be used to locate specific records within tables
34. Text