1What is the primary function of a Database Management System (DBMS)?
A.To replace the operating system of a computer
B.To manage the storage, retrieval, and modification of data
C.To hide data from users to ensure security
D.To exclusively process mathematical calculations
Correct Answer: To manage the storage, retrieval, and modification of data
Explanation:
A DBMS is system software for creating and managing databases. It provides users and programmers with a systematic way to create, retrieve, update, and manage data.
Incorrect! Try again.
2In the context of the Relational Model, what is a relation equivalent to?
A.A Row
B.A Key
C.A Column
D.A Table
Correct Answer: A Table
Explanation:
In relational database terminology, a relation is a set of tuples (rows) that corresponds to a table in standard database usage.
Incorrect! Try again.
3Which of the following refers to a single row in a relational table?
A.Domain
B.Attribute
C.Schema
D.Tuple
Correct Answer: Tuple
Explanation:
A tuple represents a single row or record in a database table, containing a set of values corresponding to the table's attributes.
Incorrect! Try again.
4What does the term Attribute represent in a database table?
A.A specific column defining a property of the entity
B.A row of data
C.The total number of records
D.The connection between two tables
Correct Answer: A specific column defining a property of the entity
Explanation:
An attribute is a column in a table. It represents a specific property or characteristic of the entity (table) being described.
Incorrect! Try again.
5Which SQL command is used to retrieve data from a database?
A.FETCH
B.OPEN
C.GET
D.SELECT
Correct Answer: SELECT
Explanation:
The SELECT statement is the primary Data Manipulation Language (DML) command used to select/retrieve data from a database.
Incorrect! Try again.
6Which of the following is considered a Data Definition Language (DDL) command?
A.SELECT
B.INSERT
C.UPDATE
D.CREATE
Correct Answer: CREATE
Explanation:
DDL commands deal with defining the database schema. CREATE is used to create new database objects like tables. INSERT, UPDATE, and SELECT are DML commands.
Incorrect! Try again.
7In a relational table, what does the cardinality refer to?
A.The number of rows (tuples)
B.The number of columns
C.The number of keys
D.The distinct values in a column
Correct Answer: The number of rows (tuples)
Explanation:
Cardinality refers to the number of tuples (rows) in a relation, while Degree refers to the number of attributes (columns).
Incorrect! Try again.
8What is a Primary Key?
A.A key that accepts null values
B.A key used only for sorting
C.Any column with numeric data
D.A minimal set of attributes that uniquely identifies a tuple
Correct Answer: A minimal set of attributes that uniquely identifies a tuple
Explanation:
A Primary Key is a specific choice of a minimal candidate key that uniquely identifies every record in a table and cannot contain NULL values.
Incorrect! Try again.
9Which concept allows a relation to reference another relation, establishing a link between them?
A.Super Key
B.Alternate Key
C.Primary Key
D.Foreign Key
Correct Answer: Foreign Key
Explanation:
A Foreign Key is a field (or collection of fields) in one table that refers to the Primary Key in another table, thereby establishing a relationship between the two tables.
Incorrect! Try again.
10If a table contains the data: , which integrity constraint is violated if column 1 is the Primary Key?
A.Key Integrity
B.Entity Integrity
C.Referential Integrity
D.Domain Integrity
Correct Answer: Entity Integrity
Explanation:
Entity Integrity (specifically the uniqueness property of a Primary Key) is violated because the Primary Key must be unique, and the value is repeated.
Incorrect! Try again.
11Which of the following commands is used to modify existing records in a table?
A.UPDATE
B.CHANGE
C.ALTER
D.MODIFY
Correct Answer: UPDATE
Explanation:
UPDATE is a DML command used to modify the existing data records in a table. ALTER is a DDL command used to change the table structure.
Incorrect! Try again.
12What is the result of a DELETE command without a WHERE clause?
A.It deletes the first row only
B.It deletes all rows in the table
C.It deletes the table structure
D.It throws a syntax error
Correct Answer: It deletes all rows in the table
Explanation:
If the WHERE clause is omitted in a DELETE statement, the database assumes the operation applies to all records, thus emptying the table (though the structure remains).
Incorrect! Try again.
13The set of all possible values that an attribute can take is called its:
A.Range
B.Set
C.Tuple
D.Domain
Correct Answer: Domain
Explanation:
A Domain is the set of atomic values that are permitted for an attribute. For example, a domain for 'Age' might be integers between 0 and 120.
Incorrect! Try again.
14Which of the following keys can act as a Primary Key?
A.Partial Key
B.Secondary Key
C.Foreign Key
D.Candidate Key
Correct Answer: Candidate Key
Explanation:
A Candidate Key is a super key with no redundant attributes. From the set of candidate keys, one is selected to act as the Primary Key.
Incorrect! Try again.
15What is a Super Key?
A.A key that is always an integer
B.A key containing only one attribute
C.A key defined in multiple tables
D.A set of one or more attributes that uniquely identifies a tuple
Correct Answer: A set of one or more attributes that uniquely identifies a tuple
Explanation:
A Super Key is a set of attributes within a table whose values can uniquely identify a tuple. A Candidate Key is a minimal Super Key.
Incorrect! Try again.
16Which SQL clause is used to filter records?
A.WHERE
B.FROM
C.GROUP BY
D.ORDER BY
Correct Answer: WHERE
Explanation:
The WHERE clause is used to extract only those records that fulfill a specified condition.
Incorrect! Try again.
17What is Normalization in DBMS?
A.The process of creating backup copies of data
B.The process of encrypting data
C.The process of increasing data duplication for faster access
D.The process of organizing data to reduce redundancy and improve data integrity
Correct Answer: The process of organizing data to reduce redundancy and improve data integrity
Explanation:
Normalization involves decomposing tables to minimize data redundancy and avoid update, insertion, and deletion anomalies.
Incorrect! Try again.
18First Normal Form (1NF) requires that:
A.All attributes contain atomic values
B.There are no transitive dependencies
C.Every determinant is a candidate key
D.There are no partial dependencies
Correct Answer: All attributes contain atomic values
Explanation:
1NF dictates that a table must not contain repeating groups or arrays; every column must hold atomic (indivisible) values.
Incorrect! Try again.
19Given a relation with Primary Key , if depends on (), and depends on (), which normal form is violated?
A.BCNF
B.3NF
C.2NF
D.1NF
Correct Answer: 3NF
Explanation:
This represents a Transitive Dependency (). 3NF requires the removal of transitive dependencies (non-prime attributes depending on other non-prime attributes).
Incorrect! Try again.
20Second Normal Form (2NF) is relevant only when:
A.The table has a composite primary key
B.The table has no primary key
C.The table is in 3NF
D.The table has a single-attribute primary key
Correct Answer: The table has a composite primary key
Explanation:
2NF deals with Partial Dependency, which occurs when a non-prime attribute depends on only part of a composite primary key. If the key has only one attribute, partial dependency is impossible.
Incorrect! Try again.
21A table is in BCNF (Boyce-Codd Normal Form) if:
A.It is in 1NF
B.For every non-trivial functional dependency , is a super key
C.There are no foreign keys
D.It contains no null values
Correct Answer: For every non-trivial functional dependency , is a super key
Explanation:
BCNF is a stricter version of 3NF. It requires that for any dependency , the determinant must be a Super Key.
Incorrect! Try again.
22Which of the following is an example of an Update Anomaly?
A.Updating a value in one record leaves inconsistent data in duplicates
B.Deleting a record unintentionally removes other data
C.Unable to insert data because a primary key is missing
D.Data is encrypted and cannot be read
Correct Answer: Updating a value in one record leaves inconsistent data in duplicates
Explanation:
An Update Anomaly occurs when data redundancy prevents an update from being applied to all instances of the data, resulting in inconsistent data.
Incorrect! Try again.
23What is a Transaction in DBMS?
A.A type of database key
B.The connection between the client and server
C.A logical unit of work that must be processed reliably
D.A single SQL command
Correct Answer: A logical unit of work that must be processed reliably
Explanation:
A Transaction is a sequence of one or more database operations that form a single logical unit of work, which must be either entirely completed or entirely rejected.
Incorrect! Try again.
24Which property ensures that a transaction is an 'all-or-nothing' operation?
A.Atomicity
B.Durability
C.Consistency
D.Isolation
Correct Answer: Atomicity
Explanation:
Atomicity guarantees that all operations within the transaction are reflected in the database, or none are. It prevents partial updates.
Incorrect! Try again.
25The Consistency property in ACID ensures that:
A.System failures do not lose data
B.Deadlocks never occur
C.Transactions are executed in isolation
D.The database moves from one valid state to another valid state
Correct Answer: The database moves from one valid state to another valid state
Explanation:
Consistency ensures that a transaction brings the database from one valid state to another, maintaining all defined integrity constraints.
Incorrect! Try again.
26What does Isolation imply in transaction management?
A.Transactions are atomic
B.Transactions occurring concurrently do not interfere with each other
C.Transactions are saved permanently
D.Transactions are processed sequentially only
Correct Answer: Transactions occurring concurrently do not interfere with each other
Explanation:
Isolation ensures that the intermediate state of a transaction is invisible to other transactions. Concurrent transactions execute as if they were running serially.
Incorrect! Try again.
27The Durability property ensures that:
A.Transactions are fast
B.Data is never deleted
C.Once a transaction commits, its changes survive system failures
D.Users cannot access the database during maintenance
Correct Answer: Once a transaction commits, its changes survive system failures
Explanation:
Durability guarantees that once a transaction has been committed, it will remain so, even in the event of power loss, crashes, or errors.
Incorrect! Try again.
28Which SQL command saves the changes made by a transaction permanently?
A.ROLLBACK
B.SAVEPOINT
C.GRANT
D.COMMIT
Correct Answer: COMMIT
Explanation:
The COMMIT command is used to save all changes made during the current transaction to the database permanently.
Incorrect! Try again.
29Which SQL command reverts the database to the state before the transaction began?
A.ROLLBACK
B.UNDO
C.RETURN
D.BACKUP
Correct Answer: ROLLBACK
Explanation:
ROLLBACK undoes transactions that have not yet been saved to the database.
Incorrect! Try again.
30Which state does a transaction enter after the final statement has been executed but before the commit?
A.Active
B.Failed
C.Partially Committed
D.Aborted
Correct Answer: Partially Committed
Explanation:
A transaction is Partially Committed after the final statement has been executed. It becomes Committed only after a successful check ensures the changes can be permanently saved.
Incorrect! Try again.
31What is a Deadlock in DBMS?
A.A situation where two or more transactions are waiting for each other to release locks
B.When a transaction fails due to a syntax error
C.A situation where two or more transactions act effectively as a single unit
D.When the database runs out of storage
Correct Answer: A situation where two or more transactions are waiting for each other to release locks
Explanation:
A Deadlock occurs when two or more transactions are blocked forever because each is holding a resource that the other needs.
Incorrect! Try again.
32In the context of database keys, what is a Composite Key?
A.A key containing letters and numbers
B.A foreign key that is also a primary key
C.A key that references multiple tables
D.A key composed of two or more attributes
Correct Answer: A key composed of two or more attributes
Explanation:
A Composite Key is a primary key (or candidate key) that consists of two or more columns (attributes) to uniquely identify a record.
Incorrect! Try again.
33What is the degree of a relation with schema ?
A.Variable
B.4
C.3
D.Infinite
Correct Answer: 4
Explanation:
The Degree of a relation is the number of attributes (columns) it contains. Here, there are 4 attributes: Name, ID, Age, and Dept.
Incorrect! Try again.
34Which of the following creates a Virtual Table based on the result-set of an SQL statement?
A.TABLE
B.INDEX
C.VIEW
D.TRIGGER
Correct Answer: VIEW
Explanation:
A View is a virtual table based on the result-set of an SQL statement. It contains rows and columns just like a real table but does not store data physically.
Incorrect! Try again.
35Which operator is used to search for a specified pattern in a column?
A.LIKE
B.EXISTS
C.BETWEEN
D.IN
Correct Answer: LIKE
Explanation:
The LIKE operator is used in a WHERE clause to search for a specified pattern in a column, often using wildcards like % or _.
Incorrect! Try again.
36In functional dependency notation , what is called?
A.Tuple
B.Dependent
C.Determinant
D.Relation
Correct Answer: Determinant
Explanation:
In the dependency , is the Determinant (the attribute that determines the value) and is the Dependent.
Incorrect! Try again.
37Data Independence in DBMS refers to:
A.Independence of data from the database administrator
B.The ability to modify the schema at one level without affecting the schema at the next higher level
C.The ability of data to correct itself
D.The data being stored on a separate server
Correct Answer: The ability to modify the schema at one level without affecting the schema at the next higher level
Explanation:
Data independence (Logical and Physical) allows changes to the internal structure or conceptual structure without breaking the views or applications built on top of them.
Incorrect! Try again.
38Which aggregate function returns the total number of rows that match a specified criterion?
A.SUM()
B.AVG()
C.COUNT()
D.MAX()
Correct Answer: COUNT()
Explanation:
COUNT() is an aggregate function that returns the number of rows that match a specified criterion.
Incorrect! Try again.
39Which of the following indicates a Transitive Dependency?
A. and (where is not a candidate key)
B. where is the Primary Key
C.
D.
Correct Answer: and (where is not a candidate key)
Explanation:
Transitive dependency occurs when a non-key attribute determines another non-key attribute ().
Incorrect! Try again.
40The Two-Phase Locking (2PL) protocol is used for:
A.Normalizing tables
B.Authenticating users
C.Creating backups
D.Concurrency Control
Correct Answer: Concurrency Control
Explanation:
2PL is a concurrency control method that guarantees serializability by requiring transactions to acquire all locks (Growing phase) before releasing any locks (Shrinking phase).
Incorrect! Try again.
41Which SQL constraint ensures that all values in a column are different?
A.CHECK
B.UNIQUE
C.DEFAULT
D.NOT NULL
Correct Answer: UNIQUE
Explanation:
The UNIQUE constraint ensures that all values in a column are distinct.
Incorrect! Try again.
42In SQL, what is the default sorting order of the ORDER BY clause?
A.Random
B.Ascending (ASC)
C.Descending (DESC)
D.Input Order
Correct Answer: Ascending (ASC)
Explanation:
By default, the ORDER BY keyword sorts the records in ascending order.
Incorrect! Try again.
43What is a Foreign Key constraint violation?
A.Leaving a primary key field null
B.Inserting a value in a foreign key column that does not match a primary key in the referenced table
C.Creating a table with the same name as an existing table
D.Inserting a row with a primary key that already exists
Correct Answer: Inserting a value in a foreign key column that does not match a primary key in the referenced table
Explanation:
Referential integrity requires that a Foreign Key value must either match a Primary Key value in the referenced table or be NULL. If it doesn't match, it is a violation.
Incorrect! Try again.
44Which of the following is NOT a type of database key?
A.Candidate Key
B.Major Key
C.Primary Key
D.Alternate Key
Correct Answer: Major Key
Explanation:
Major Key is not a standard term in Relational Database Management Systems. Standard keys include Primary, Candidate, Foreign, Alternate, and Super keys.
Incorrect! Try again.
45Lossless Join Decomposition ensures that:
A.The tables cannot be joined
B.Redundancy is increased
C.The join operation is faster
D.No data is lost when tables are joined back together
Correct Answer: No data is lost when tables are joined back together
Explanation:
When decomposing a table for normalization, Lossless Join ensures that the natural join of the decomposed tables results in the original table without creating spurious tuples.
Incorrect! Try again.
46In the context of DBMS, what is an Instance?
A.The collection of information stored in the database at a particular moment
B.The overall design of the database
C.The software used to run the database
D.The data type of a column
Correct Answer: The collection of information stored in the database at a particular moment
Explanation:
The Schema is the design/structure, while the Instance is the actual data (snapshot) present in the database at a specific point in time.
Incorrect! Try again.
47Which SQL keyword is used to remove duplicate rows from a result set?
A.DISTINCT
B.SEPARATE
C.UNIQUE
D.DIFFERENT
Correct Answer: DISTINCT
Explanation:
The SELECT DISTINCT statement is used to return only distinct (different) values.
Incorrect! Try again.
48What is the purpose of the GROUP BY statement in SQL?
A.To group rows that have the same values in specified columns
B.To sort the result set
C.To join two tables
D.To filter rows based on a condition
Correct Answer: To group rows that have the same values in specified columns
Explanation:
GROUP BY is used with aggregate functions (COUNT, MAX, MIN, SUM, AVG) to group the result-set by one or more columns.
Incorrect! Try again.
49Which concurrency problem occurs when a transaction reads a value that is being updated by another uncommitted transaction?
A.Phantom Read
B.Lost Update
C.Dirty Read
D.Unrepeatable Read
Correct Answer: Dirty Read
Explanation:
A Dirty Read occurs when a transaction reads data that has been modified by another transaction that has not yet committed.
Incorrect! Try again.
50What is the relation between Candidate Keys and Primary Keys?
A.They are always identical
B.Candidate Keys are a subset of Primary Keys
C.They are mutually exclusive
D.Primary Keys are a subset of Candidate Keys
Correct Answer: Primary Keys are a subset of Candidate Keys
Explanation:
A table can have multiple Candidate Keys (minimal super keys). One of these candidate keys is chosen to be the Primary Key.