0% found this document useful (0 votes)
18 views4 pages

Database Engineering Q&A: Keys & Design

The document is a question bank on database engineering covering key concepts such as types of keys, file-based systems, data abstraction levels, database system purposes, and the role of a Database Administrator. It also includes topics on database design, E-R models, normalization, and anomalies. Additionally, it discusses functional dependencies and their importance in maintaining database consistency.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views4 pages

Database Engineering Q&A: Keys & Design

The document is a question bank on database engineering covering key concepts such as types of keys, file-based systems, data abstraction levels, database system purposes, and the role of a Database Administrator. It also includes topics on database design, E-R models, normalization, and anomalies. Additionally, it discusses functional dependencies and their importance in maintaining database consistency.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Database Engineering - Question Bank with Answers

Unit 1: Introduction to Databases

1. List & explain the different types of keys.


- Primary Key: Uniquely identifies a record in a table.
- Candidate Key: A set of attributes that can uniquely identify a record.
- Super Key: A superset of a candidate key.
- Foreign Key: Refers to a primary key in another table.
- Composite Key: A combination of two or more columns used as a key.

2. What is a File-Based System? List out its limitations.


- A file-based system stores data in separate files without a central database.
- Limitations:
- Data redundancy: Same data is stored in multiple places.
- Lack of consistency: No single control over data updates.
- Difficult data retrieval: Searching is inefficient.
- No concurrent access: Multiple users cannot access files simultaneously.

3. Explain the levels of data abstraction and differentiate schema & instance.
- Physical Level: How data is physically stored.
- Logical Level: Structure and relationships of data.
- View Level: Different ways data is viewed by users.
- Schema: Defines the database structure.
- Instance: The actual data present in the database.

4. What is the purpose of a database system?


- Stores, manages, and retrieves data efficiently.
- Eliminates redundancy and maintains data integrity.

5. Functions of a Database Administrator (DBA).


- Database design, security, performance monitoring, backup & recovery.
6. What is Relational Algebra? Discuss its operations.
- A formal system for database queries.
- Operations: Selection, Projection, Union, Cartesian Product, Join.

7. Discuss different types of keys with examples.


- Primary Key: Ensures uniqueness (e.g., Student_ID in Student table).
- Candidate Key: Possible choices for the primary key.
- Super Key: A set including a candidate key.
- Foreign Key: References another table.

Unit 2: Database Design (E-R Model & Normalization)

1. Draw ER Diagrams for Bank, Insurance, and University databases.


- Bank: Customer, Account, Loan.
- Insurance: Policyholder, Agent, Policy.
- University: Student, Course, Professor.

2. Define Normalization & discuss 1NF.


- Normalization: Organizes data to reduce redundancy.
- 1NF (First Normal Form): Removes repeating groups and ensures atomic values.

3. Explain Reduction of ER Diagram to Relational Schema.


- Convert entities into tables.
- Convert relationships using foreign keys.

4. Notations Used in ER Diagrams.


- Rectangle: Entity.
- Oval: Attribute.
- Diamond: Relationship.
- Line: Connection between entities and relationships.

5. Types of Attributes in a Database.


- Simple: Single atomic value.
- Composite: Divided into sub-parts.
- Derived: Computed from another attribute.
- Multivalued: Can have multiple values.

6. Mapping Cardinalities in ER Diagrams.


- One-to-One (1:1): One entity related to one other.
- One-to-Many (1:M): One entity relates to multiple.
- Many-to-Many (M:N): Multiple entities relate to multiple.

7. 2NF, 3NF & BCNF with Examples.


- 2NF: Removes partial dependency.
- 3NF: Removes transitive dependency.
- BCNF: Stronger version of 3NF.

8. What is Anomaly? Explain Insertion, Deletion & Update Anomalies.


- Insertion Anomaly: Cannot insert data without unnecessary fields.
- Deletion Anomaly: Deleting a record removes other important data.
- Update Anomaly: Changing data requires multiple updates.

9. Explain Armstrong's Axioms.


- Rules used to derive functional dependencies.

10. State & Describe Participation Constraints.


- Total Participation: All entities participate in the relationship.
- Partial Participation: Some entities may not participate.

11. What are Functional Dependencies? How do they relate to Normalization?


- A functional dependency shows the relationship between attributes.
- Helps in decomposing tables during normalization.

12. How does Normalization Improve Database Consistency?


- Eliminates redundancy.
- Maintains data integrity and consistency.

Common questions

Powered by AI

Mapping cardinalities define the relationship constraints between entities and affect the design of relational schemas by determining how tables are related to each other. A one-to-one (1:1) relationship might be implemented by merging tables or using a foreign key referencing a primary key in another table. A one-to-many (1:M) relationship typically involves a foreign key in the 'many' table pointing to the primary key of the 'one' table. Many-to-many (M:N) relationships require an additional join table that contains foreign keys from each of the tables in the relationship, thus structurally affecting how data relationships are manifested in the schema .

A composite key consists of two or more attributes that, together, uniquely identify a record in a table. Unlike a primary key, which is usually a single attribute, composite keys are used when no single attribute can uniquely identify the rows in a table. For example, in an OrderItems table that tracks which items belong to which order, the combination of OrderID and ItemID can serve as a composite key to ensure each row is uniquely identifiable, reflecting that specific item in a specific order .

Different types of keys serve crucial roles in maintaining data integrity and facilitating efficient queries. Primary keys uniquely identify records, preventing duplicates and maintaining order. Candidate keys, as potential primary keys, help ensure flexibility in choosing optimal keys for different operations. Super keys are used in defining scope for unique identification across larger attribute sets. Foreign keys maintain referential integrity by linking related tables, ensuring related data remains consistent. Composite keys enable unique identification when single attributes aren't sufficient. Together, these keys facilitate streamlined querying by establishing strict rules and frameworks for data relationships and constraints .

Schema defines the structure of the database, outlining how data is organized and how relationships between data are managed at the logical level. An instance, on the other hand, refers to the specific set of data stored in the database at a particular moment, representing the actual data that conforms to the schema. The schema is static, remaining unchanged as it defines the blueprint of the database, while instances are dynamic, changing as data is added, modified, or deleted .

Normalization improves data consistency and integrity by organizing data into tables in such a way that reduces redundancy and dependency. It eliminates duplicate data and ensures that data dependencies make sense, which helps maintain consistency across rows in the tables. With proper normalization, such as 3NF or BCNF, anomalies such as insertion, update, and deletion anomalies are minimized, leading to a more robust database structure where changes in data do not create inconsistencies .

A Database Administrator (DBA) is responsible for database design, ensuring the database's security, monitoring its performance, and managing backup and recovery procedures. The DBA ensures that data is stored, retrieved, and updated efficiently and that the integrity and availability of data are maintained. This also involves installing and updating database management software, configuring hardware and software, and implementing disaster recovery strategies .

Armstrong's Axioms provide a set of inference rules used to derive all possible functional dependencies in a database. These rules are significant because they help in determining how data elements relate to each other, guiding the normalization process. By applying Reflexivity, Augmentation, and Transitivity rules, one can develop a complete set of functional dependencies from a given set, which is crucial for ensuring that a database schema is well-organized and free of redundancy, thus increasing the database's reliability and efficiency .

Insertion anomalies occur when certain attributes cannot be inserted into a database without the presence of other attributes. Deletion anomalies happen when the deletion of an unwanted piece of data also results in the loss of crucial information. Update anomalies arise when a change in data requires multiple updates to avoid inconsistencies. Normalization addresses these issues by organizing data in such a way that reduces redundancy and dependency. By applying normalization forms like 2NF, 3NF, and BCNF, data anomalies are minimized, leading to more stable and reliable database structures .

File-based systems store data in separate files, which leads to several limitations: data redundancy, as the same data might be stored in multiple places; lack of consistency, since there is no central control over data updates; inefficient data retrieval, as searching through files can be cumbersome; and the inability to allow concurrent access, meaning multiple users cannot access files simultaneously, which is an efficiency drawback compared to database systems .

The process of reducing an ER diagram to a relational schema involves converting entities to tables, representing attributes as table columns, and using foreign keys to represent relationships. The purpose of this reduction is to translate a high-level conceptual data model into a format that can be implemented within a database management system. Relationships such as one-to-many or many-to-many are converted using foreign keys or join tables, enabling the depiction of real-world entities and their relations as database tables that facilitate data manipulation and query execution .

You might also like