Free Databases MCQs with Answers
210 Databases MCQs from Computer Science and IT, each with the correct answer and a written explanation of why it is correct. Free and unlimited, with no account needed.
Databases cover tables, records, fields, keys and relationships, together with database management systems and relational database design. The subject includes primary and foreign keys, normalization, SQL commands such as SELECT, INSERT, UPDATE and DELETE, queries, forms and reports, while distinguishing a database from a spreadsheet used for simple tabular data.
Last updated
210 questions · page 11 of 11
- A. Insertion
- B. Modification
- C. Deletion of an entity cash attribute must have
- D. All of them
Explanation: A transitive dependency occurs in a database table when the value of one attribute indirectly determines the value of another attribute, through a chain of relationships involving two or more other attributes. This redundancy can lead to several data anomalies, which are inconsistencies in the data that can cause problems. By eliminating transitive dependencies and following the principles of database normalization, you can reduce or eliminate these anomalies and improve the integrity and consistency of your data
Correct answer: All of them- A. Only one value
- B. More than one value
- C. No repeating groups
- D. Both (a) & (c)
Explanation: In a relational database, an entity represents a real-world object or concept (e.g., customer, product). An attribute is a characteristic of that entity (e.g., customer name, product price). The concept of a single entity occurrence refers to a specific instance of that entity (e.g., a particular customer or product). For data integrity and clarity within a table, each attribute within a single entity occurrence should ideally have only one value. This principle avoids ambiguity and simplifies data retrieval
Correct answer: Only one value- A. Only one
- B. Where it don't belong
- C. Where it belongs
- D. When it originates
Explanation: Where it belongs is the most likely answer. This refers to the process of data normalization in relational databases. When encountering reporting groups (repeating data within a table), the reporting attribute (the attribute that identifies the group) needs to be moved to a separate table along with a foreign key that references the original table. This eliminates data redundancy and improves data integrity
Correct answer: Where it belongs- A. The primary key consists of only one attribute
- B. Non-key attribute exists in the relation
- C. Every non-key attribute is functionally dependent on the full set of primary key attributes
- D. All of these
- E. None of these
Explanation: Second normal form (2NF) is a level of database normalization that ensures a relation eliminates partial dependencies. A relation is in 2NF if it satisfies the following conditions:It is in first normal form (1NF), meaning there are no repeating groups of values and all attribute values are atomic (indivisible).Every non-key attribute is fully functionally dependent on the primary key. This means that the value of a non-key attribute can be uniquely determined by the value of the primary key, without relying on any other non-key attribute.
Correct answer: Every non-key attribute is functionally dependent on the full set of primary key attributes- A. Insertion anomaly
- B. Deletion anomaly
- C. Modification anomaly
- D. Updating anomaly
Explanation: A modification anomaly occurs when modifying a single record requires changes to multiple records in a database. In this scenario, a student's monthly fee change requires updating multiple records where the student is enrolled in different courses. This can lead to inconsistencies and errors if the updates are not done correctly across all records. This is a general term for any anomaly that occurs when updating data. Modification anomaly is a specific type of update anomaly
Correct answer: Modification anomaly- A. No primary key attribute can be null
- B. Each entity must have a primary key
- C. Primary key must have only one attribute
Explanation: The entity integrity rule ensures that every table in a relational database has a primary key, and that the primary key cannot contain null values. This is important because the primary key is used to uniquely identify each row in the table. If a primary key could be null, then there would be no way to guarantee that each row was unique. In simpler terms, the entity integrity rule makes sure that every record in a database table has a unique identifier that can't be blank. This helps to ensure that the data in the database is accurate and consistent.
Correct answer: Each entity must have a primary key- A. A → C
- B. B → C
- C. (A, B) is a composite determinant
- D. C is a determinant
Explanation: This is the correct answer. A composite determinant means that both A and B together determine C uniquely. In other words, if you know the values of A and B, you can uniquely determine the value of C
Correct answer: (A, B) is a composite determinant- A. split the relation into two relations, each with a single theme
- B. change the theme
- C. create a new theme
- D. add a composite key
Explanation: Multivalued dependencies (MVDs) occur in a relational database schema when a determinant attribute (or set of attributes) determines multiple, independent non-key attributes. This can lead to data redundancy and inconsistencies. Splitting the relation into two relations, each with a single theme that addresses a specific dependency, eliminates the MVD and improves data integrity
Correct answer: split the relation into two relations, each with a single theme- A. always
- B. commonly
- C. seldom
- D. never
Explanation: Multivalued dependencies (MVDs) are a type of dependency that can occur in relational databases. An MVD says that a certain set of attributes (determinant) determines another set of attributes (dependent). In simpler terms, if you know the value of one set of attributes, you can always know the value of another set of attributes. However, MVDs can lead to data redundancy and anomalies. For example, imagine a table that stores information about courses and the students enrolled in those courses. If there is an MVD that says "CourseID determines StudentID", then this means that a student can only be enrolled in one course. But what if a student can enroll in multiple courses? In this case, the table would need to be duplicated for each course that a student is enrolled in, which would lead to data redundancy. To avoid these problems, database designers try to eliminate MVDs whenever possible. This can be done by decomposing the table into smaller tables that are in a higher normal form
Correct answer: commonly- A. Transitive dependency
- B. Full functional dependency
- C. Partial dependency
- D. Prime functional dependency
Explanation: A partial dependency is exactly what the question describes. It is a dependency where a set of attributes, that is not a candidate key, determines another attribute (or set of attributes). In other words, some, but not all, of the attributes needed to uniquely identify a record determine another attribut
Correct answer: Partial dependency