Databases MCQs (Set-1)

Databases MCQs – Set-1 | 50 questions on relational design, SQL, constraints, transactions, indexing, and database models.

Mixed difficulty · Select one answer and open each explanation to review the concept.

What software manages database storage and queries?

A Database management system
B Operating system shell
C Network interface card
D Text editor

How does a relational database commonly organize records?

A As audio streams
B Tables of rows and columns
C As network packets
D In image layers

What does a row represent in a relational table?

A A database license
B A query condition
C One record
D A table relationship

What does a column describe in a table?

A A whole database backup
B A transaction boundary
C A database user
D An attribute of records

Why assign a primary key to a table?

A Uniquely identify each row
B Compress every stored value
C Sort all rows permanently
D Encrypt every column

What does a foreign key commonly reference?

A A database backup file
B Related table key
C A query’s output format
D A server’s network address

What does a database schema describe?

A Only the latest data values
B The server’s physical location
C Database structure and definitions
D The users’ passwords

Which language is widely used to query relational databases?

A HTML
B CSS
C XML
D SQL

Which SQL command retrieves rows from a table?

A SELECT
B INSERT
C DELETE
D UPDATE

What does a WHERE clause do in a query?

A Sorts results by date
B Filters rows by conditions
C Creates a new database
D Changes a table’s schema

Which clause sorts query results?

A HAVING
B GROUP BY
C ORDER BY
D FROM

Which SQL command adds new rows?

A DELETE
B SELECT
C ALTER
D INSERT

What does UPDATE do in SQL?

A Changes existing rows
B Creates a database user
C Retrieves matching rows
D Removes a table index

Which command removes selected table rows?

A INSERT
B DELETE
C SELECT
D CREATE

Why use a JOIN in a relational query?

A To compress stored data
B To encrypt a table
C Combine rows using related values
D To create a user account

What does an INNER JOIN return?

A Every row from both tables
B Only unmatched rows
C Every left-table row
D Rows with matching join values

How does a LEFT JOIN treat the left table?

A Keeps all its rows
B Keeps only unmatched rows
C Deletes its duplicate rows
D Sorts it alphabetically

What does GROUP BY prepare rows for?

A File compression
B Grouping and aggregation
C User authentication
D Database backup

Which clause filters grouped results?

A WHERE
B ORDER BY
C HAVING
D LIMIT

Which aggregate function counts rows?

A SUM
B AVG
C MAX
D COUNT

In SQL, what does NULL generally represent?

A Missing or unknown value
B The number zero
C An empty table
D A false constraint

How should a query test for NULL values?

A Use equal-to zero
B Use IS NULL
C Use ORDER BY NULL
D Use COUNT NULL

What does a database constraint do?

A Speeds up every query
B Creates an application screen
C Enforces data rules
D Stores database backups

Which constraint prevents duplicate values in a column or set?

A CHECK only
B DEFAULT
C FOREIGN KEY only
D UNIQUE

What does NOT NULL require?

A Required non-null value
B Two table keys
C A query must return rows
D Database uses SQL

What is a composite key made from?

A One database index
B Multiple columns together
C A query and a view
D Several database servers

How is a many-to-many relationship commonly represented?

A By duplicating every database
B With one nullable column
C Using an association table
D By deleting the foreign keys

Why normalize relational tables?

A To increase duplicate data
B To eliminate all keys
C To prevent all joins
D Reduce redundancy and update anomalies

What does first normal form generally require?

A Atomic values in each field
B A single row per database
C No primary keys
D Every column to be numeric

What is a database transaction?

A A table’s display theme
B Logical database work unit
C A network connection type
D A database user role

Which properties are summarized by ACID?

A Access, consistency, indexing, durability
B Accuracy, compression, isolation, deletion
C Atomicity, consistency, isolation, durability
D Authentication, caching, integrity, delivery

What does transaction atomicity mean?

A Queries always run instantly
B Data is always duplicated
C All users see identical screens
D Work happens entirely or not

What does consistency require of a transaction?

A Preserve database rules
B Delete every old row
C Avoid all concurrent work
D Disable foreign keys

What does transaction isolation address?

A How tables are named
B How concurrent transactions interact
C Where backups are stored
D Which columns are visible

What does durability promise after commit?

A Queries become private
B Indexes no longer change
C Committed data persists
D All locks remain forever

Which command confirms a transaction’s changes?

A ROLLBACK
B SAVEPOINT
C EXPLAIN
D COMMIT

What does ROLLBACK do to an uncommitted transaction?

A Undoes its pending changes
B Creates a new index
C Sorts its query results
D Copies rows to another table

What is a database index designed to improve?

A Query searches and lookups
B Every write operation
C Database network security
D The number of stored columns

What does a query planner choose?

A Which users may log in
B How many tables exist
C Execution strategy for query
D A database’s display theme

What is a database view commonly based on?

A A physical network cable
B A backup archive
C A primary key alone
D A stored query definition

How does a materialized view differ from a regular view?

A It stores query results
B It cannot be refreshed
C It contains no columns
D It is always a backup

Which model uses flexible non-relational data structures?

A Relational only
B NoSQL
C SQL-only view
D File allocation table

What does a document database usually store?

A Only numeric indexes
B Rows with fixed columns only
C Structured documents such as JSON
D Only graph edges

Which database model retrieves values using unique keys?

A Graph database
B Relational database
C Time-series database
D Key-value database

What do graph databases emphasize?

A Nodes and relationships
B Tables and fixed columns only
C Rows without links
D Files and directories

What is a data warehouse primarily built to support?

A Rapid keyboard input
B Analytics across collected data
C Operating-system startup
D Network cable testing

Which workload focuses on frequent business transactions?

A OLAP
B Batch rendering
C OLTP
D Image compression

What is database replication?

A Deleting duplicate records
B Combining SQL clauses
C Grouping rows by column
D Maintaining copies across systems

What does database sharding do?

A Distributes data across partitions
B Converts SQL into HTML
C Removes all indexes
D Encrypts only passwords

Why maintain a database backup?

A To increase query complexity
B To restore data after loss
C To replace every transaction
D To remove database constraints

Sources