DBMS
DBMS
Topic
Concept and goals of DBMS, Database Languages, Database Users, Database
Abstraction. Database architecture, The Relational Data Model and Relational
Database Constraints, Basic Concepts of ER Model, Relationship sets, Keys,
Mapping, Design of ER Model
### 9. Keys
- **Types of Keys**:
- **Primary Key**: A unique attribute or a combination of attributes that identifies
a record.
- **Foreign Key**: An attribute that links two tables together, referring to the
primary key of another table.
- **Composite Key**: A primary key that consists of two or more attributes.
- **Candidate Key**: Attributes that can uniquely identify a record, from which the
primary key is selected.
### 10. Mapping
- **Mapping ER Diagrams to Relational Schema**: The process of converting the ER
model into a relational schema involves defining tables, primary keys, foreign keys,
and relationships.
- **Entities** become tables.
- **Attributes** become columns in tables.
- **Relationships** are implemented through foreign keys.
These detailed explanations should help you grasp the fundamental concepts of
databases. If you need further elaboration on any specific topic or examples, feel
free to ask!
Module II: Relational Model : 15
Session Topic
The relational model , The catalog, Types, Keys, Relational algebra, Domain
relational calculus, Tuple relational calculus , Fundamental operations, Additional
operations, SQL fundamentals, Integrity , Triggers , Views ,Relational database,
Relational Algebra, Relational & Tuple Calculus
Here’s a detailed explanation of each topic in your Module II: Relational Model:
### 3. Types
- **Data Types**: Each column in a table has a defined data type that specifies the
kind of data it can hold. Common data types include:
- **Integer**: Whole numbers.
- **Float**: Decimal numbers.
- **String**: Textual data.
- **Date/Time**: Date and time values.
- **Boolean**: True or false values.
### 4. Keys
- **Definition**: Keys are attributes or combinations of attributes that uniquely
identify records in a table.
- **Types of Keys**:
- **Primary Key**: Uniquely identifies each record in a table.
- **Foreign Key**: A primary key from another table that creates a relationship
between the two tables.
- **Composite Key**: A key composed of two or more attributes.
- **Candidate Key**: An attribute that can uniquely identify records, from which a
primary key is chosen.
- **Notation**: If A and B are attributes, we write \(A \rightarrow B\) to indicate that B is
functionally dependent on A.
- **Normalization Forms**:
- **First Normal Form (1NF)**: Ensures that each column contains atomic (indivisible)
values and each entry in a column is of the same data type.
- **Second Normal Form (2NF)**: Achieved when a table is in 1NF and all non-key attributes
are fully functionally dependent on the primary key. It eliminates partial dependencies.
- **Third Normal Form (3NF)**: Achieved when a table is in 2NF and all attributes are
functionally dependent only on the primary key, eliminating transitive dependencies.
- **Notation**: If A and B are attributes, we write \(A \twoheadrightarrow B\) to indicate that
A determines a set of values for B, independent of other attributes.
- **Example**: Consider a table with a student having multiple phone numbers and multiple
email addresses. Here, a student’s ID determines multiple phone numbers, creating a
multivalued dependency.
- **Normalization with MVD**: To eliminate MVDs, the table should be decomposed into
separate tables where each table contains a single multivalued dependency. This leads to
**Fourth Normal Form (4NF)**, which states that a relation is in 4NF if it is in Boyce-Codd
Normal Form (BCNF) and has no non-trivial multivalued dependencies.
- **Normalization with Join Dependency**: A table is in **Fifth Normal Form (5NF)** (or
Project-Join Normal Form) if it is in 4NF and does not contain join dependencies that are not
implied by its candidate keys. This means that every join dependency in the table must be a
consequence of the table's keys.
### Summary
If you need further elaboration on any specific topic or examples, feel free to ask!