Olete.in
Articles
Mock Tests
🧪 Source (programming language) MCQ Quiz Hub
Database - Programming Language (MCQ) questions set 2
Choose a topic to test your knowledge and improve your Source (programming language) skills
1. What is degree 0 isolation?
Transaction does not read dirty data from other transactions.
Transaction does not commit any writes until it completes all its writes
Transactions do not dirty data read by a transaction before the transaction commits.
A transaction does not overwrite data updated by another user or process.
2. Which command helps to display schema of a table?
DESCRIBE
DISPLAY
DESC
SHOW
3. What is the highest level in a hierarchy of data organization?
Data Record
Data File
Database
None of the above
4. Which of the following is used to define the schema of each database hosted in the DBMS?
ER diagram
UML
Database model
Both b and c above
5. Which of the following has a relationship between / among themselves as a functional dependency?
Rows
Relations
Attributes
Tables
6. What type of form says “ Each column type is unique ” ?
1NF
2NF
4NF
BCNF
7. Which among the following comprises of a complete record of all activities responsible in affecting the database contents for a specific duration?
Transaction log
Data manipulation language
Query language
Report writer
8. What is 5NF?
The database should be in 3NF and all tables can have only one primary key.
There should be no cyclic dependencies in a composite key.
All attributes within the entity should depend solely on the entity's unique identifier.
Tables cannot have multi - valued dependencies on a Primary Key.
9. Which is an essential characteristic of a normal form where every determinant in a table must be a candidate key?
First
Second
Boyce - Codd
Fifth
10. What are the Report Generators used for?
Retrieve information from files
Answer queries
Both A & B
None of these
11. What is durability?
When an update occurs to a database, either all or none of the update becomes available to anyone
The transactions have been committed and will survive permanently
It determines how the transaction integrity will be visible to the other users and systems
All of the above
12. Which type of lock does a record or page get locked immediately?
Pessimistic locking
Optimistic locking
both (a) and (b)
None of these
13. Which SQL keyword is used to remove the duplication of rows from the result set?
DELETE
SELECT
DISTINCT
UNIQUE
14. Issuing which type of savepoint will cause the named savepoint to be discarded? (Database)
TRUNCATE SAVEPOINT
DELETE SAVEPOINT
DISCARD SAVEPOINT
RELEASE SAVEPOINT
15. What is an audit trial? (Database)
Used for making backup copies
The recorded history of operations performed on a file
Used for retrieving the lost information
All of the above
16. What is truncating a table?
Data alone deleted, Performs an automatic commit
Data alone deleted, Doesn’t perform automatic commit
Table structure + Data are deleted
Table structure alone deleted, Performs an automatic commit
17. A ROLLBACK statement will also release any existing savepoints that may not be in use.
True
False
Error
Can't say
18. What type of relationship does a hierarchical schema help to establish between the items of a database?
top-to-bottom relationship
bottom-to-top relationship
one-to-many relationship
many-to-one
19. What do you mean by atomicity?
When an update occurs to a database, either all or none of the update becomes available to anyone
It determines how the transaction integrity will be visible to the other users and systems
The transactions have been committed and will survive permanently
All of the above
20. Which is the concurrency control protocol that ensure both conflict serializability and freedom from deadlock? (Database)
Time stamp ordering
2 - phase locking
both (a) and (b)
Neither A nor B
21. Which type of clustering index is defined on the fields?
Non-key and non-ordering
Non-key and ordering
Key and non-ordering
Key and Ordering
22. Which of the following may lead to an irrecoverable error in a database system?
A transaction reads a data item after it is written by an uncommitted transaction
A transaction reads a data item after it is written by a committed transaction
A transaction reads a data item after it is read by an uncommitted transaction
A transaction writes a data item after it is read by an uncommitted transaction
23. Which of the following statement is / are not true about normal forms? (Database)
Any relation with two attributes is in BCNF
BCNF is stricter than 3NF
Lossless, dependency - preserving decomposition into 3NF is always possible
Lossless, dependency - preserving decomposition into BCNF is always possible
24. What is the maximum possible size of the file in the index allocation scheme of blocks to a file depend on? (Database)
The size of the blocks and the size of the address of the blocks
The number of blocks used for the index, the size of the blocks and the size of the address of the blocks
The number of blocks used for the index and the size of the blocks
None of the above
25. The functional dependencies for the relational schema student performance (name, courseNo, rollno, grade) is given below : name, courseNo -> grade rollno, courseNo -> grade name -> rollno rollno-> name What is the highest normal form of this relational schema?
3NF
4NF
BCNF
2NF
26. Which normal relational database design the form that is considered adequate?
3NF
5NF
2NF
4NF
27. Which one of the following statements is / are true about SQL?
SQL permits attribute names to be repeated in the same relation
If there are no indexes on the relations then an SQL query will not work
Duplicates are automatically eliminated by an SQL query
None of the above
28. Consider an SQL query SELECT A.Id FROM A WHERE A.Age> All (SELECT B.Age FROM B WHERE B.name = ‘Anay’) The result of this query contains
1 tuple
2 tuples
3 tuples
4 tuples
29. Database: A condition that led to the development of database was
A demand for more data to support information needs
An increase in the amount of data handled by organizations
The poliferation of data files
All of the above
30. Database: Which of the following fields in a student file can be used as a primary key?
class
Social Security Number
GPA
Major
31. Database: Which is the make given to the database management system which is able to handle full text data, image data, audio and video?
full media
graphics media
multimedia
hypertext
32. Database: Which is not a function of aggregate function?
Count
Avg
Create
Max
33. Database: In second normal form ______________________
A composite attributes is converted to individual attributes.
Non key attributes are functional dependent on key attributes.
The non key attributes functionally dependent on not a part of key attributes.
All the above.
34. Primitive operations common to all record management system include ? (Database)
Print
Sort
Look up
All of the above
35. An unnormalized relation contains values ?
Atomic
Non - Atomic
Classified
None of these
36. A trigger is ?
A statement that enables to start any DBMS b.
A statement that is executed by the user when debugging an application program
A condition the system tests for the validity of the database user
A statement that is executed automatically by the system as a side effect of modification to the database
37. Which of the following database object does not physically exist? (Database)
Base table
Index
View
None of the above
38. What are the important criteria for designing tables?
Meaningful grouping of attribute
No redundancy
No inapplicable attribute
All of the above
39. Databases: The view of total database content is _____
Conceptual view.
Internal view
External view
Physical View.
40. Which is the major data structure used in RDBMS?
Trees
Stacks
Graph
Array
41. Which of the following forms is considered as adequate for normal relational database design?
1NF
5NF
4 NF
3NF
42. Why are B+ trees preferred over binary trees in databases?
Disk capacities are greater than memory capacities
Disk access is much slower than memory access
Disk data transfer rates are much less than memory data transfer rates
Disks are more reliable than memory
43. State the concurrency protocols which ensure both conflict serializability and freedom from deadlock 1. 2-phase locking 2. Time-stamp ordering
1 only
2 only
Both 1 and 2
Neither 1 nor 2
44. The language used in application programs to request data from the DBMS is referred to as the
DML
DDL
VDL
SDL
Submit