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 10 of 11
- A. Dependent on part of the primary key
- B. Dependent on the entire primary key
- C. Independent of the primary key
- D. Independent of any other relation
Explanation: A relation is in Second Normal Form (2NF) if it satisfies two conditions:1. It is already in First Normal Form (1NF), meaning there are no repeating groups and all attributes contain atomic values (indivisible units of data).Every non-key attribute is fully dependent on the entire primary key. This eliminates partial dependencies, where a non-key attribute relies on only a part of the composite primary key
Correct answer: Dependent on the entire primary key- A. Functional
- B. Partial
- C. Associative
- D. Transitive
Explanation: In a relational database, a partial dependency exists when a non-prime attribute (an attribute that is not part of the primary key) is dependent on only a part of the candidate key (a minimal set of attributes that uniquely identifies a row in a table). This can lead to data redundancy and inconsistencies. Second Normal Form (2NF) specifically addresses this issue by eliminating partial dependencies
Correct answer: Partial- A. Functional
- B. Non-functional
- C. Associative
- D. Transitive
Explanation: Transitive dependencies occur when one non-key attribute is dependent on another non-key attribute, which in turn is dependent on the primary key. 3NF aims to eliminate these transitive dependencies to reduce data redundancy and improve data integrity
Correct answer: Transitive- A. Yes, I can write the same information in two different ways
- B. No, I cannot write the same information in two different ways
- C. I cannot write the same information in two different ways
Explanation: The concept of rewriting information in different ways is fundamental to many aspects of communication and data management. Here are two examples of how the information in the image can be written differently:Example 1: Storing the same information in two different ways can be achieved through techniques like homonyms (using words with the same spelling but different meanings) or synonyms (words with similar meanings).Example 2: Another way to achieve this is by data normalization, which removes redundant information and ensures data integrity by storing each piece of data only once
Correct answer: Yes, I can write the same information in two different ways- A. 2
- B. 3
- C. 4
- D. 5
Explanation: Data integrity refers to the accuracy, consistency, and trustworthiness of data in a database or storage system. There are four main types of data integrity that ensure this:1. Entity Integrity: Focuses on the uniqueness and validity of data within a table. It ensures that each row in a table can be uniquely identified using a primary key, and that there are no missing values (NULL) for critical data points.2. Referential Integrity: Governs the relationships between tables in a database. It ensures that foreign keys referencing another table's primary key always point to valid data. This prevents orphaned records and inconsistencies.3. Domain Integrity: Defines the permissible values for each data attribute in a table. It enforces rules and constraints to limit the data entered to a specific format or range. This helps maintain data quality and consistency.4. User-Defined Integrity: Allows users to create custom rules beyond the basic data types and constraints. This caters to specific business requirements and data validation needs
Correct answer: 4- A. Constraints
- B. Consistency Rules
- C. Functional Dependency
- D. All of the above
Explanation: ● Data Integrity: Data integrity refers to the accuracy, completeness, and consistency of data over its entire lifecycle. It ensures that data is reliable and trustworthy for the purposes for which it is intended.● Constraints: Constraints are rules that define the valid values that can be stored in a database column. They help to enforce data integrity by preventing invalid or inconsistent data from being entered.● Consistency Rules: Consistency rules are broader than constraints and can encompass any rule that helps to ensure data integrity. This can include things like referential integrity, which ensures that relationships between tables are maintained, and business rules, which reflect the specific requirements of an organization.● Functional Dependency: A functional dependency exists when a single attribute (determinant) determines another attribute (dependent) in a table. This means that for every value of the determinant attribute, there is a unique corresponding value of the dependent attribute. Functional dependencies are relevant to data integrity because they can help to identify potential anomalies (errors or inconsistencies) in data.In conclusion:● Constraints, consistency rules, and functional dependencies all play a role in maintaining data integrity. Constraints enforce specific data validation rules. Consistency rules encompass a wider range of data quality checks. Functional dependencies help identify potential data anomalies. Because all three contribute to data integrity, the most accurate answer is that data integrity is expressed in terms of all of the above
Correct answer: All of the above- A. Redundancy
- B. Transitive Dependency
- C. Consistency
- D. Relation
Explanation: In a relational database, a transitive dependency occurs when a dependency exists between two attributes indirectly through a third attribute. For example, if attribute A determines attribute B, and attribute B determines attribute C, then there is a transitive dependency between A and C. In conclusion, a transitive dependency is the specific term used to describe a functional dependency between two or more non-key attributes in a relational database. It highlights the indirect relationship between the attributes through a third attribute
Correct answer: Transitive Dependency- A. Get a stable data structure
- B. Increase number of relations
- C. Functional dependency
Explanation: The main goal of normalization is to organize data in a database in a way that reduces redundancy and improves data integrity. This is achieved by following a set of rules that progressively eliminate anomalies (insertion, deletion, and update anomalies) that can lead to inconsistencies and data loss. A stable data structure with minimal redundancy is essential for efficient data manipulation and retrieval
Correct answer: Get a stable data structure- A. Candidate key
- B. Determinant
- C. Foreign key
- D. Primary key
Explanation: In a functional dependency (FD), a determinant is a set of attributes that determines another set of attributes, called the dependent. The arrow in an FD points from the determinant to the dependent
Correct answer: Determinant- A. Insertion
- B. Deletion
- C. Modification
- D. All of the above
Explanation: Redundancy in tables refers to the storing of the same data in multiple places within a database. This can lead to several anomalies, which are inconsistencies in the data that can cause problems. By eliminating redundancy 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 the above- A. Mutually Exclusive
- B. Redundant Information
- C. Homonyms
- D. Determinant
Explanation: Redundant information refers to data that is stored multiple times in a database, even though it can be derived from other stored data. In this case, if a data value of an attribute can be expressed as "yes/no", it can be stored as a Boolean data type (True/False) which takes up less space and reduces the chances of inconsistencies
Correct answer: Redundant Information- A. Referential Integrity
- B. Entity Integrity
- C. Data Integrity
- D. All of the above
Explanation: This constraint ensures that every row in a table can be uniquely identified by its primary key, and that the primary key cannot have a null value. This is because a null primary key would mean that there is no way to identify a specific row in the table
Correct answer: Entity Integrity- A. 2NF
- B. 3NF
- C. 4NF
- D. 5NF
Explanation: Ensures minimal data redundancy by eliminating the dependency of attributes on non-key attributes. This reduces the risk of data anomalies (insertion, deletion, update) that can occur when data is scattered across multiple tables
Correct answer: 3NF- A. Key dependencies
- B. Relation dependencies
- C. View
- D. Database dependencies
Explanation: Relation dependencies is the correct answer. Functional dependencies are a fundamental concept in relational database theory. They define constraints between attributes in a relation (table) to ensure data integrity and minimize redundancy. Relation dependencies are a broader category that encompasses functional dependencies and other types of dependencies that can exist between attributes in a relation
Correct answer: Relation dependencies- A. Functional relation
- B. Attribute dependency
- C. Functional relation constraint
- D. Functional dependency
Explanation: This is the most precise term encompassing the concept of a functional dependency as a rule or restriction applied to a database table
Correct answer: Functional relation constraint- A. TNF
- B. 2NF
- C. 3NF
- D. 4NF
Explanation: 2NF (Second Normal Form) is the correct answer. A table is in 2NF if it adheres to 1NF (all atomic values) and eliminates partial dependencies. A partial dependency occurs when a non-key attribute depends on only a part of the primary key. By removing repeating groups, 2NF ensures data integrity and reduces redundancy
Correct answer: 2NF197. Which of the following is the process of analyzing the dependencies of attributes within entities
- A. Anomalies
- B. Merging relation
- C. Normalization
- D. Redundant information
Explanation: Normalization is a process of organizing data in a database to minimize redundancy and improve data integrity. It involves breaking down tables into smaller, more focused tables that have well-defined relationships with each other. By eliminating redundancy, normalization helps to prevent anomalies (inconsistencies) from occurring in the data
Correct answer: Normalization- A. Referential integrity
- B. Key match rule
- C. Entity key group rule
- D. Foreign/Primary match rule
Explanation: This is a database constraint that ensures that the foreign key value in a child table either references a valid primary key value in the parent table, or is null. It helps to maintain data consistency by preventing orphaned records (child records that reference non-existent parent records).
Correct answer: Referential integrity- A. Homonyms
- B. Aliases
- C. Synonyms
- D. Database objects
Explanation: Aliases is the correct answer. An alias is an alternative name for an attribute or table in a database. It provides a way to refer to the same data using a different label, often for convenience or clarity
Correct answer: Aliases- A. Table must have unique name
- B. A relation must have primary key associated with it
- C. A relation may not have primary key
- D. Should be in zero normalization level
Explanation: A relation must have a primary key associated with it is the correct answer. In relational database theory, a primary key is a minimal set of attributes that uniquely identifies each record in a table. First Normal Form (1NF) is the basic level of database normalization that ensures every attribute value in a column is atomic (cannot be further decomposed). A primary key is a requirement for a relation to be in 1NF
Correct answer: A relation must have primary key associated with it