Database MCQs (401-500)
401. The main goal of database security is to:
A) Protect data from unauthorized access and modification
B) Increase redundancy
C) Allow free access to all users
D) None
Answer: A
402. Authentication in a DBMS is used to:
A) Verify user identity
B) Encrypt data
C) Manage tables
D) None
Answer: A
403. Authorization determines:
A) What actions a user can perform
B) The user’s password
C) Database size
D) None
Answer: A
404. A user privilege in SQL defines:
A) Specific permissions to execute actions on database objects
B) The data type
C) The memory limit
D) None
Answer: A
405. GRANT command in SQL is used to:
A) Provide privileges to users
B) Revoke privileges
C) Delete users
D) None
Answer: A
406. REVOKE command is used to:
A) Remove privileges granted to a user
B) Add privileges
C) Delete roles
D) None
Answer: A
407. A role in a DBMS is:
A) A collection of privileges
B) A type of trigger
C) A data type
D) None
Answer: A
408. Encryption in databases ensures:
A) Data confidentiality
B) Data redundancy
C) Indexing
D) None
Answer: A
409. Hashing passwords before storage improves:
A) Security
B) Query speed
C) Redundancy
D) None
Answer: A
410. SQL injection is an attack that:
A) Exploits improper query validation
B) Encrypts user data
C) Increases performance
D) None
Answer: A
411. One method to prevent SQL injection is:
A) Using prepared statements
B) Storing plaintext queries
C) Allowing user concatenation
D) None
Answer: A
412. Database auditing involves:
A) Tracking database operations and user activities
B) Compressing data
C) Optimizing queries
D) None
Answer: A
413. Data integrity ensures:
A) Accuracy and consistency of data
B) Redundant data
C) Data loss
D) None
Answer: A
414. Entity integrity ensures that:
A) Each table has a unique primary key
B) Foreign keys are valid
C) Nulls are allowed in primary key
D) None
Answer: A
415. Referential integrity ensures that:
A) Foreign key values match primary key values
B) Null values are allowed
C) Data can be deleted freely
D) None
Answer: A
416. A constraint in a database is used to:
A) Enforce rules on data
B) Delete records
C) Increase redundancy
D) None
Answer: A
417. NOT NULL constraint ensures:
A) A column cannot have NULL values
B) Unique values only
C) Only numeric values
D) None
Answer: A
418. UNIQUE constraint ensures:
A) All values in a column are distinct
B) Only primary key is unique
C) Data duplication
D) None
Answer: A
419. CHECK constraint is used to:
A) Limit values that can be stored in a column
B) Verify column data type
C) Assign primary key
D) None
Answer: A
420. DEFAULT constraint provides:
A) A value when no explicit value is given
B) Foreign key
C) Auto-index
D) None
Answer: A
421. Transactions in DBMS follow which properties?
A) ACID
B) BASE
C) CRUD
D) None
Answer: A
422. The ‘A’ in ACID stands for:
A) Atomicity
B) Accuracy
C) Accessibility
D) None
Answer: A
423. The ‘C’ in ACID stands for:
A) Consistency
B) Concurrency
C) Constraint
D) None
Answer: A
424. The ‘I’ in ACID stands for:
A) Isolation
B) Integrity
C) Index
D) None
Answer: A
425. The ‘D’ in ACID stands for:
A) Durability
B) Dependency
C) Division
D) None
Answer: A
426. Atomicity ensures:
A) All operations in a transaction occur or none do
B) Multiple users can access data
C) Data is replicated
D) None
Answer: A
427. Consistency ensures:
A) The database remains valid before and after a transaction
B) Data is duplicated
C) Indexes are updated
D) None
Answer: A
428. Isolation ensures:
A) Transactions execute independently without interference
B) Only one transaction occurs
C) Data is encrypted
D) None
Answer: A
429. Durability ensures:
A) Committed transactions are permanent even after failures
B) Temporary storage
C) Data caching
D) None
Answer: A
430. A schedule in DBMS refers to:
A) The sequence of operations from multiple transactions
B) Table schema
C) Data backup
D) None
Answer: A
431. A serial schedule means:
A) Transactions are executed one after another
B) Parallel execution
C) Random interleaving
D) None
Answer: A
432. A non-serial schedule allows:
A) Interleaving of operations from multiple transactions
B) Only one transaction
C) Rollbacks
D) None
Answer: A
433. Concurrency control ensures:
A) Correctness of transactions when multiple users access data
B) Data redundancy
C) Query optimization
D) None
Answer: A
434. The main problem in concurrency is:
A) Lost updates
B) Deadlocks
C) Inconsistent retrievals
D) All of the above
Answer: D
435. A dirty read occurs when:
A) A transaction reads uncommitted data of another transaction
B) Data is missing
C) A table is locked
D) None
Answer: A
436. A lost update happens when:
A) Two transactions update the same data simultaneously
B) Data is not committed
C) Index is deleted
D) None
Answer: A
437. Inconsistent retrieval occurs when:
A) One transaction reads data being modified by another
B) Index not found
C) Lock timeout
D) None
Answer: A
438. Locking is used in DBMS to:
A) Prevent simultaneous conflicting access to data
B) Delete duplicates
C) Speed up queries
D) None
Answer: A
439. Shared lock allows:
A) Multiple transactions to read but not modify data
B) Only one user
C) No access
D) None
Answer: A
440. Exclusive lock allows:
A) Only one transaction to read and write data
B) Shared access
C) No writing
D) None
Answer: A
441. Deadlock occurs when:
A) Two transactions wait indefinitely for each other’s resources
B) Database crashes
C) Data is lost
D) None
Answer: A
442. One method to prevent deadlock is:
A) Timeout mechanism
B) Ignoring locks
C) Using duplicate tables
D) None
Answer: A
443. The Wait-Die scheme prevents:
A) Deadlocks using transaction timestamps
B) Data duplication
C) Cascading aborts
D) None
Answer: A
444. Timestamp ordering ensures:
A) Serializability using timestamps
B) Lock-free access
C) Data replication
D) None
Answer: A
445. Cascading rollback occurs when:
A) Failure of one transaction forces others to roll back
B) Data is read multiple times
C) Table locks
D) None
Answer: A
446. Serializable schedule ensures:
A) Same result as if transactions executed serially
B) Parallel inconsistent execution
C) Data corruption
D) None
Answer: A
447. The two-phase locking (2PL) protocol guarantees:
A) Conflict serializability
B) Deadlock-free operations
C) None of the above
D) Both A and B
Answer: A
448. Growing phase in 2PL allows:
A) Acquiring locks but not releasing them
B) Releasing locks only
C) No locking
D) None
Answer: A
449. Shrinking phase in 2PL allows:
A) Releasing locks but not acquiring new ones
B) Both acquiring and releasing locks
C) Only shared locks
D) None
Answer: A
450. Strict two-phase locking ensures:
A) Locks are released only after commit or abort
B) Locks released anytime
C) No concurrency
D) None
Answer: A
451. The primary goal of database recovery is to:
A) Restore the database to a consistent state after a failure
B) Increase redundancy
C) Delete damaged data
D) None
Answer: A
452. A transaction failure occurs when:
A) A logical error or system error interrupts execution
B) Database shuts down normally
C) A commit completes
D) None
Answer: A
453. A system crash is an example of:
A) Non-transaction failure
B) User error
C) Media recovery
D) None
Answer: A
454. Media failure refers to:
A) Disk crash or damage of storage media
B) Software bug
C) Network failure
D) None
Answer: A
455. Checkpoints are used in recovery to:
A) Reduce the amount of redo and undo work
B) Create indexes
C) Store backups
D) None
Answer: A
456. The log file in a DBMS records:
A) All transactions and their operations
B) Schema details
C) Backups only
D) None
Answer: A
457. In deferred update, changes are written to disk:
A) Only after a transaction commits
B) Immediately after every operation
C) Randomly
D) None
Answer: A
458. In immediate update, changes are written:
A) As soon as the operation executes
B) After transaction commit
C) After recovery
D) None
Answer: A
459. ARIES recovery algorithm is used for:
A) Efficient transaction recovery
B) Query optimization
C) Normalization
D) None
Answer: A
460. ARIES stands for:
A) Algorithm for Recovery and Isolation Exploiting Semantics
B) Automatic Recovery of Indexed Systems
C) Advanced Relational Indexing Engine System
D) None
Answer: A
461. Undo phase in recovery is used to:
A) Roll back uncommitted transactions
B) Reapply committed ones
C) Redo logs
D) None
Answer: A
462. Redo phase in recovery is used to:
A) Reapply committed changes from log
B) Delete logs
C) Roll back
D) None
Answer: A
463. Normalization in databases is done to:
A) Remove redundancy and improve consistency
B) Duplicate data
C) Speed up writes only
D) None
Answer: A
464. The process of combining smaller relations into a larger one is:
A) Denormalization
B) Normalization
C) Aggregation
D) None
Answer: A
465. A functional dependency (FD) is a relationship between:
A) Two attributes in a relation
B) Two tables
C) Two databases
D) None
Answer: A
466. If A → B, then A is called:
A) Determinant
B) Dependent
C) Foreign key
D) None
Answer: A
467. The highest normal form based on functional dependencies is:
A) Boyce-Codd Normal Form (BCNF)
B) 3NF
C) 2NF
D) None
Answer: A
468. A relation is in 1NF if:
A) It has atomic attribute values
B) It has no transitive dependencies
C) It has only primary keys
D) None
Answer: A
469. Partial dependency occurs when:
A) A non-key attribute depends on part of a composite key
B) Two tables share a key
C) Data is duplicated
D) None
Answer: A
470. 2NF eliminates:
A) Partial dependency
B) Transitive dependency
C) Redundant rows
D) None
Answer: A
471. 3NF eliminates:
A) Transitive dependency
B) Partial dependency
C) Both A and B
D) None
Answer: A
472. A table is in BCNF if:
A) Every determinant is a candidate key
B) It has no primary key
C) It contains duplicates
D) None
Answer: A
473. Multivalued dependencies are handled in:
A) Fourth Normal Form (4NF)
B) 3NF
C) 2NF
D) None
Answer: A
474. A table is in 5NF when:
A) It is free from join dependency anomalies
B) It is free from redundancy
C) It has a single key
D) None
Answer: A
475. Decomposition is said to be lossless if:
A) No data is lost after decomposition and join
B) Redundancy increases
C) Keys are dropped
D) None
Answer: A
476. Dependency preservation ensures:
A) Functional dependencies are not lost in decomposition
B) Only foreign keys are kept
C) Primary key remains
D) None
Answer: A
477. The file system stores data as:
A) Individual files with no relationships
B) Structured tables
C) Relational models
D) None
Answer: A
478. A major drawback of file systems compared to DBMS is:
A) Data redundancy and inconsistency
B) Higher security
C) Faster indexing
D) None
Answer: A
479. An object-oriented database stores data as:
A) Objects with attributes and methods
B) Flat records
C) Tables only
D) None
Answer: A
480. OODBMS stands for:
A) Object-Oriented Database Management System
B) Online Object Data Management
C) Ordered Object Database
D) None
Answer: A
481. In an object-oriented database, inheritance means:
A) One class derives attributes and methods from another
B) Data duplication
C) Key sharing
D) None
Answer: A
482. Encapsulation in OODBMS means:
A) Combining data and behavior in a single unit
B) Hiding only methods
C) Exposing all attributes
D) None
Answer: A
483. Object identity in OODBMS is:
A) A unique identifier for each object
B) A foreign key
C) Data duplication
D) None
Answer: A
484. Persistent objects are:
A) Objects that exist beyond program execution
B) Temporary objects
C) Shared variables
D) None
Answer: A
485. A temporal database manages:
A) Time-varying data
B) Location data
C) Image data
D) None
Answer: A
486. Valid time in a temporal database refers to:
A) The time when data is true in the real world
B) The time of data entry
C) Transaction time
D) None
Answer: A
487. Transaction time refers to:
A) The time when data was stored in the database
B) The time data is valid
C) Expiry time
D) None
Answer: A
488. A bitemporal database stores:
A) Both valid time and transaction time
B) Only current data
C) Historical data only
D) None
Answer: A
489. Spatial databases store:
A) Geographical and location-based data
B) Text data
C) Audio files
D) None
Answer: A
490. GIS stands for:
A) Geographic Information System
B) Global Indexed Storage
C) General Integrated Schema
D) None
Answer: A
491. A data warehouse stores:
A) Historical and analytical data
B) Real-time transactions
C) Temporary files
D) None
Answer: A
492. The main purpose of a data warehouse is:
A) Decision making and data analysis
B) Transaction processing
C) Data encryption
D) None
Answer: A
493. OLAP stands for:
A) Online Analytical Processing
B) Offline Application Processing
C) Open Logic Access Platform
D) None
Answer: A
494. OLTP stands for:
A) Online Transaction Processing
B) Offline Transfer Protocol
C) Object-Level Transfer Process
D) None
Answer: A
495. The key difference between OLAP and OLTP is:
A) OLAP is analytical; OLTP is transactional
B) Both are identical
C) OLTP is slower
D) None
Answer: A
496. A data mart is:
A) A subset of a data warehouse
B) A backup
C) A file system
D) None
Answer: A
497. ETL in data warehousing stands for:
A) Extract, Transform, Load
B) Evaluate, Transfer, Link
C) Encode, Test, List
D) None
Answer: A
498. Data mining is the process of:
A) Discovering patterns and insights from large datasets
B) Storing data
C) Encrypting data
D) None
Answer: A
499. A star schema in a data warehouse consists of:
A) Fact and dimension tables
B) Only fact tables
C) Only dimension tables
D) None
Answer: A
500. The snowflake schema is:
A) A normalized version of the star schema
B) A denormalized model
C) A temporary schema
D) None
Answer: A