DBMS and SQL MCQ | BPSC TRE Computer Science MCQ

DBMS and SQL concept mcq computer science helpful for all competitive exams, entrance exams.tech blogs and creative digital ideas.

 DBMS and SQL MCQ for BPSC TRE Computer Science

DBMS and SQL concept mcq computer science helpful for all competitive exams, entrance exams.tech blogs and creative digital ideas.

DBMS and SQL concept mcq computer science helpful for all competitive exams, entrance exams and it industry preparation from scratch.

1. The collection of related data is called:

A. Database
B. Data warehouse
C. Metadata
D. File system

Answer: A. Database

2. DBMS stands for:

A. Data Base Managing System
B. Data Base Management System
C. Database Management Software
D. Data Backup Management System

Answer: B. Data Base Management System
DBMS is software that allows users to define, create, maintain and control access to the database.

3. Which of the following is NOT a function of DBMS?

A. Data redundancy control
B. Data security
C. Data integrity
D. Data compilation

Answer: D. Data compilation

DBMS handles storage, security, and integrity of data. Compilation is related to programming languages.

4. A database designed for analytical processing is called:

A. OLTP
B. OLAP
C. Data mining
D. Transaction processing

Answer: B. OLAP
OLAP (Online Analytical Processing) is used for data analysis and reporting.

5. Which language is used to interact with relational databases?

A. SQL
B. HTML
C. XML
D. Python

Answer: A. SQL
SQL (Structured Query Language) is used to create, retrieve, update, and delete data.

6. The three schema architecture was proposed by:

A. IBM
B. ANSI/SPARC
C. Oracle
D. Microsoft

Answer: B. ANSI/SPARC
The ANSI-SPARC architecture defines three levels: External level, Conceptual level,Internal level.

7. Which level describes how data is stored physically?

A. External level
B. Conceptual level
C. Internal level
D. Logical level

Answer: C. Internal level
Internal level deals with physical storage structure.

8. Which level describes the entire database structure?

A. External
B. Conceptual
C. Physical
D. Logical

Answer: B. Conceptual
Conceptual schema represents overall logical structure of database.

9. Which data model uses tables?

A. Hierarchical model
B. Network model
C. Relational model
D. Object model

Answer: C. Relational model

10. In relational model, table is called:

A. Tuple
B. Relation
C. Attribute
D. Domain

Answer: B. Relation
Tuple - Row
Attribute - Column
Domain Allowed - values

11. Which model represents data in tree structure?

A. Network model
B. Relational model
C. Hierarchical model
D. Object model

Answer: C. Hierarchical model
Hierarchical model organizes data in parent-child tree structure.

12. A key that uniquely identifies each record is called:

A. Primary key
B. Foreign key
C. Secondary key
D. Super key

Answer: A. Primary Key

13. A set of attributes that uniquely identifies a tuple is called:

A. Primary key
B. Super key
C. Candidate key
D. Alternate key

Answer: B. Super key

14. A candidate key not selected as primary key is called:

A. Foreign key
B. Secondary key
C. Alternate key
D. Composite key

Answer: C. Alternate key

15. A key made of multiple attributes is:

A. Composite key
B. Primary key
C. Foreign key
D. Secondary key

Answer: A. Composite key

16. A foreign key is used to:

A. Identify record uniquely
B. Link two tables
C. Delete table
D. Create table

Answer: B. Link two tables

17. Ability to change physical storage without affecting schema is called:

A. Logical independence
B. Physical independence
C. Data abstraction
D. Schema independence

Answer: B. Physical Data Independence

18. Changing conceptual schema without affecting external schema is:

A. Logical independence
B. Physical independence
C. Schema independence
D. Data abstraction

Answer: A. Logical Data Independence

19. Who manages database system?

A. Programmer
B. Database Administrator
C. Data analyst
D. Network engineer

Answer: B. Database Administrator

20. A person who designs database structure is:

A. DBA
B. Database designer
C. End user
D. Operator

Answer: B. Database designer

21. Which of the following constraint ignores NULL value?

A. UNIQUE
B. FOREIGN
C. CHECK
D. All of above

Answer: B. FOREIGN

22. Which constraint allows NULL values but prevents duplicate entries?

A. PRIMARY KEY
B. UNIQUE
C. FOREIGN KEY
D. CHECK

Answer: B. UNIQUE

23. Which is the correct difference between Primary key and Foreign key?

A. A table can have multiple primary key and single foreign key
B. A primary key cannot ignore NULL value but Foreign key can
C. A Primary key can have duplicate data but foreign key does not
D. None of the above

Answer: B. A primary key cannot ignore NULL value but Foreign key can

24. Which one of the following refers to copies of the same data in multiple places?

A. Data Repository
B. Data Inconsistency
C. Data Mining
D. Data Redundancy

Answer: D. Data Redundancy

25. In a relational table, the number of attributes (columns) is known as:

A. Degree
B. Cardinality
C. Tuple
D. Domain

Answer: A. Degree

26. Consider attributes ID, CITY and NAME. Which can be a primary key?

A. NAME
B. ID
C. CITY
D. CITY, ID

Answer: B. ID

27. Which of the following is considered as DBMS?

A. Access
B. Oracle
C. SQL Server
D. All of these

Answer: D. All of these

28. If degree of relation is 4 that means relation have

A. 4 tuples
B. 4 attributes
C. 4 state
D. 4 relations

Answer: B. 4 attributes

29. Relational model was developed by

A. E. F. Codd
B. Richard Stallman
C. Guido Van Rossum
D. John Von Neumann

Answer: A. E. F. Codd

30. In a student table, which field is most appropriate to uniquely identify each record?

A. Name
B. Class
C. Admission number
D. Age

Answer: C. Admission number

31. A DBMS is generally categorized as:

A. System software
B. Application software
C. Programming software
D. Utility software

Answer: B. Application software

32. Copies of the same data occupying memory at multiple places is called

A. Data Repository
B. Data Inconsistency
C. Data Mining
D. Data Redundancy

Answer: D. Data Redundancy

33. The term “Data” refers to

A. Electronic presentation of information
B. Basic information
C. Raw facts and figures
D. Both (a) and (c)

Answer: C. Raw facts and figures

34. In a relational database table, a row is also called a:

A.  Attribute
B. Tuple
C. Domain
D. Column

Answer: B. Tuple

35. Which key is used to link two tables together?

A. Candidate key
B. Primary key
C. Foreign key
D. Alternate key

Answer: C. Foreign key

36. Which system was commonly used for data storage before DBMS became popular?

A. Cloud storage
B. File system
C. Spreadsheet system
D. Operating system

Answer: B. File system

37. Which benefit is provided by DBMS?

A. Reduced redundancy
B. Improved data consistency
C. Data sharing
D. All of the above

Answer: D. All of the above

38. A structured collection of related data is known as:

A. Table
B. Database
C. Query
D. Attribute

Answer: B. Database

39. Which key ensures that each record in a table is unique and cannot contain NULL values?

A. Foreign key
B. Candidate key
C. Primary key
D. Alternate key

Answer: C. Primary key

40. Which of the following is an example of a real-world DBMS application?

A. Banking systems
B. Airline reservation systems
C. Online shopping platforms
D. All of the above

Answer: D. All of the above

41. A request sent to the database to retrieve or manipulate data is called a:

A. Query
B. Transaction
C. Record
D. Relation

Answer: A. Query

42. Operation to get common tuples from two tables

A. Minus
B. Union
C. Cartesian Product
D. Intersection

Answer: D. Intersection

43. In which case NULL cannot be assigned to ROLLNO?

A. When ROLLNO is zero
B. When ROLLNO is not known
C. When ROLLNO is not available
D. When ROLLNO is not applicable

Answer: A. When ROLLNO is zero

43.A. Foreign key in PROJECT ASSIGNED table

A. Reg_id
B. Proj_no
C. Both
D. None

Answer: A. Reg_id

44. Alternate key in STUDENT table

A. Rollno
B. Reg_id
C. Class
D. Name

Answer: A. Rollno

45. To retrieve sale details of a particular customer

A. Customer, ccode
B. Sale, ccode
C. Customer and Sale, ccode
D. Customer and Sale, saleid

Answer: C. Customer and Sale, ccode

46. Number of tuples in a relation is called

A. Entity
B. Column
C. Cardinality
D. None of the above

Answer: C. Cardinality

47. In a relation, attribute refers to

A. Entity
B. Row
C. Column
D. Both (b) and (c)

Answer: C. Column

48. ______ is used to represent relationship between tables

A. Primary key
B. Foreign key
C. Unique key
D. Candidate key

Answer: B. Foreign key

49. Collection of logically related records are called

A. Information
B. Relation
C. Database
D. Tuple

Answer: B. Relation

50. Database schema refers to

A. Table name and fields
B. Relationship among tables
C. Data stored in tables
D. (a) and (b)

Answer: D. (a) and (b)

51. When database schema is defined, database state is

A. 0
B. 1
C. Null
D. Equal to degree

Answer: A. 0

52. In RDBMS, R represents

A. Record
B. Relation
C. Relational
D. Referential

Answer: C. Relational

53. In a relation tuple represents a

A. Single cell
B. Single row
C. Single column
D. None

Answer: B. Single row

54. Which property is NOT observed in RDBMS?

a. Sequence of attributes is immaterial
b. Tuples can be duplicated
c. Attribute cannot have many values in one tuple
d. NULL represents unknown values

Answer: B. Tuples can be duplicated

55. A tuple is a unique entity whereas attribute values can be duplicated

A. True
B. False
C. Depends upon type of record
D. Depends upon database key

Answer: A. True

56. Which is a valid file system to store records?

A. Access
B. MySQL
C. CSV files
D. All of above

Answer: C. CSV files

👉 SQL mcq for computer science

57. Which SQL command is used to create a table?

A. CREATE
B. INSERT
C. UPDATE
D. SELECT

Answer: A. CREATE
CREATE is a DDL command used to define database structures.

58. Which SQL command is used to remove a table from database?

A. DELETE
B. DROP
C. REMOVE
D. CLEAR

Answer: B. DROP
DROP permanently removes database objects.

59. Which command is used to add data into a table?

A. INSERT
B. UPDATE
C. ADD
D. CREATE

Answer: A. INSERT

60. Which SQL clause is used to filter records?

A. WHERE
B. ORDER BY
C. GROUP BY
D. HAVING

Answer: A. WHERE

61. Which command modifies existing records?

A. ALTER
B. UPDATE
C. MODIFY
D. CHANGE

Answer: B. UPDATE

62. Which join returns all matching rows from both tables?

A. INNER JOIN
B. OUTER JOIN
C. CROSS JOIN
D. SELF JOIN

Answer: A.

63. Which join returns all records from left table?

A. RIGHT JOIN
B. LEFT JOIN
C. FULL JOIN
D. CROSS JOIN

Answer: B.

64. Which SQL keyword removes duplicate rows?

A. UNIQUE
B. DISTINCT
C. REMOVE
D. DELETE

Answer: B.

65. Which clause groups rows with same values?

A. GROUP BY
B. ORDER BY
C. SORT BY
D. PARTITION

Answer: A.

66. Which clause filters grouped records?

A. WHERE
B. HAVING
C. GROUP BY
D. ORDER BY

Answer: B.

67. Which command modifies table structure?

A. UPDATE
B. ALTER
C. MODIFY
D. CHANGE

Answer: B.

68. Which SQL function counts rows?

A. SUM
B. COUNT
C. TOTAL
D. NUMBER

Answer: B.

69. Which function returns average value?

A. MEAN
B. AVG
C. AVERAGE
D. SUM

Answer: B.

70. Which join produces Cartesian product?

A. CROSS JOIN
B. INNER JOIN
C. LEFT JOIN
D. RIGHT JOIN

Answer: A.

71. Which SQL statement retrieves data?

A. FETCH
B. SELECT
C. GET
D. RETRIEVE

Answer: B.

72. Normalization was introduced by:

A. Edgar F. Codd
B. Charles Bachman
C. Jim Gray
D. Larry Ellison

Answer: A.

73. Normalization reduces:

A. Redundancy
B. Security
C. Speed
D. Storage

Answer: A.

74. First Normal Form removes:

A. Multivalued attributes
B. Functional dependency
C. Transitive dependency
D. Partial dependency

Answer: A.

75. Second Normal Form removes:

A. Partial dependency
B. Transitive dependency
C. Multivalued dependency
D. Join dependency

Answer: A.

76. Third Normal Form removes:

A. Partial dependency
B. Transitive dependency
C. Multivalued dependency
D. Join dependency

Answer: B.

77. BCNF is stronger version of:

A. 1NF
B. 2NF
C. 3NF
D. 4NF

Answer: C.

78. Normalization improves:

A. Data integrity
B. Data redundancy
C. Data duplication
D. Data inconsistency

Answer: A.

79. Normalization is mainly applied to:

A. Relational databases
B. Network databases
C. Hierarchical databases
D. File systems

Answer: A.

80. Which normal form deals with multivalued dependency?

A. 2NF
B. 3NF
C. 4NF
D. BCNF

Answer: C.

81. Join dependency is handled in:

A. 4NF
B. 5NF
C. 3NF
D. BCNF

Answer: B.

82. ER model was proposed by:

A. Peter Chen
B. Edgar Codd
C. Charles Bachman
D. Jim Gray

Answer: A.

83. Rectangle represents:

A. Attribute
B. Entity
C. Relationship
D. Key

Answer: B.

84. Primary key attribute is:

A. Underlined
B. Bold
C. Italic
D. Double

Answer: A.

85. Weak entity is represented by:

A. Double rectangle
B. Double oval
C. Diamond
D. Triangle

Answer: A.

86. Relationship between entities is represented by:

A. Diamond
B. Rectangle
C. Oval
D. Line

Answer: A.

87. Degree of relationship refers to:

A. Number of attributes
B. Number of entities involved
C. Number of tables
D. Number of rows

Answer: B.

88. ACID stands for:

A. Atomicity Consistency Isolation Durability
B. Accuracy Consistency Integrity Durability
C. Atomic Consistency Integrity Data
D. Atomic Control Isolation Data

Answer: A.

89. Atomicity means:

A. Transaction executes completely or not at all
B. Data is always correct
C. Data is isolated
D. Data is durable

Answer: A.

90. Consistency ensures:

A. Database moves from one valid state to another
B. Data is stored permanently
C. Data is isolated
D. Transaction is atomic

Answer: A.

91. Isolation means:

A. Transactions do not interfere with each other
B. Data is permanent
C. Data is redundant
D. Data is duplicated

Answer: A.

92. Durability ensures:

A. Data persists after commit
B. Data is temporary
C. Data is duplicated
D. Data is isolated

Answer: A.

93. Concurrency control ensures:

A. Data consistency in multi-user environment
B. Data redundancy
C. Data duplication
D. Data compression

Answer: A.

94. Problem caused by concurrent transactions:

A. Lost update
B. Deadlock
C. Dirty read
D. All of the above

Answer: D.

95. Deadlock occurs when:

A. Two transactions wait for each other
B. Transaction commits
C. Transaction rolls back
D. Transaction ends

Answer: A.

96. Two-phase locking protocol ensures:

A. Serializability
B. Redundancy
C. Security
D. Integrity

Answer: A.

97. Shared lock allows:

A. Multiple reads
B. Multiple writes
C. Delete operation
D. Update operation

Answer: A.

98. Indexing improves:

A. Query performance
B. Data redundancy
C. Data inconsistency
D. Data duplication

Answer: A.

99. Primary index is based on:

A. Primary key
B. Foreign key
C. Secondary key
D. Composite key

Answer: A.

100. Dense index contains:

A. Index record for every search key value
B. Some search keys
C. Only primary keys
D. Only foreign keys

Answer: A.

101. Sparse index contains:

A. Index entries for some records
B. All records
C. All keys
D. Only duplicates

Answer: A.

102. Hashing technique is used for:

A. Fast data retrieval
B. Data deletion
C. Data normalization
D. Data compression

Answer: A.

103. A table can have ___ foreign keys.

A. 1
B. 2
C. Many
D. Depends on RDBMS

Answer: C.

104. In which of the following cases DML is not executed?

A. When new record is added
B. When existing record is modified
C. When existing attribute is modified
D. When records are deleted

Answer: C.

105. Which is the correct difference between Primary key and Foreign key?

A. A table can have multiple primary key and single foreign key
B. A primary key cannot ignore NULL value but Foreign key can
C. A Primary key can have duplicate data but foreign key does not
D. None of the above

Answer: B.

106. In SQL FROM clause is used to:

A. Define source table name while retrieving records
B. Define column name while retrieving records
C. Define criteria while retrieving records
D. Define values while inserting records

Answer: A.

107. Which of the following is not an SQL aggregate function?

A. AVG
B. MAX
C. COUNT
D. All are aggregate function

Answer: D.

108. Which of the following is not true about DDL?

A. The retrieval of information stored in database
B. The creation of schema object in database
C. The deletion of schema object
D. All are not true

Answer: A.

109. DELETE FROM Book WHERE Price <= 2514;
         This statement is a:

A. DDL
B. DML
C. DCL
D. None

Answer: B.

110. Display all records of emp in descending order of ename and ascending order of dept.

A. SELECT * FROM emp ORDER BY ename, dept DESC;
B. SELECT * FROM emp ORDER BY ename, ORDER BY dept DESC;
C. SELECT * FROM emp ORDER BY ename DESC, dept;
D. SELECT * FROM emp WHERE ORDER BY ename, dept DESC;

Answer: C.

111. Which of the following is not an SQL constraint?

A. IS NULL
B. Primary Key
C. Default
D. Check

Answer: A.

112. Write SQL command to add a new column DOB.

A. Alter table student modify DOB date;
B. Alter table student add DOB date;
C. Alter table student create DOB date;
D. Alter table student new DOB date;

Answer: B.

113. List different games offered by school.

A. Select Game from Student;
B. Select Unique(Game) from Student;
C. Select Distinct(Game) from Student;
D. Select Game from student where Distinct(Game);

Answer: C.

114. Display books with price between 150 and 200 and qty not null.

A. Price between 150 Or 200
B. Price between 150 And 200 Or qty NOT NULL
C. Price between 150 Or 200 And qty NOT NULL
D. Price between 150 And 200 And qty IS NOT NULL

Answer: D.

115. Value stored in VARCHAR(20) = “Keshav”
        Value stored in CHAR(20) = “Meenakshi”
        Characters occupied:

A. 20,6
B. 6,20
C. 9,6
D. 6,9

Answer: B.

116. SELECT DISTINCT Brand FROM Product;

What does it do?

A. Gives all tuples
B. Shows unique brand values
C. Shows repeated values
D. None

Answer: B.

About the author

Raushan Kumar
Welcome to Rau's Editz. Hi, I am Raushan Kumar a digital creator focused on AI image generation, trending templates, and technology blogs. We share the latest AI tools, creative trends and digital ideas to help creators grow, stay updated, and c…

Post a Comment