0% found this document useful (0 votes)
9 views11 pages

DBMS

The document provides an overview of database management systems (DBMS), covering concepts such as database languages, users, abstraction, architecture, and the relational data model. It explains normalization, functional dependencies, multivalued dependencies, and join dependencies in relational database design. The document serves as a comprehensive guide for understanding the fundamental principles and structures of databases.

Uploaded by

kushagra9e
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views11 pages

DBMS

The document provides an overview of database management systems (DBMS), covering concepts such as database languages, users, abstraction, architecture, and the relational data model. It explains normalization, functional dependencies, multivalued dependencies, and join dependencies in relational database design. The document serves as a comprehensive guide for understanding the fundamental principles and structures of databases.

Uploaded by

kushagra9e
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Module I : : Introduction : 10 Session

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

Here’s a detailed explanation of each topic in your Module I: Introduction to


Databases:

### 1. Concept and Goals of DBMS


- **Definition**: A Database Management System (DBMS) is software that facilitates
the creation, manipulation, and administration of databases. It acts as an
intermediary between users and the database.
- **Goals**:
- **Data Integrity**: Ensuring accuracy and consistency of data over its lifecycle.
- **Data Security**: Protecting data from unauthorized access and breaches.
- **Data Independence**: Abstracting the data storage and structure from the
application logic, allowing changes without affecting applications.
- **Data Redundancy Control**: Minimizing duplication of data across the
database.
- **Efficient Data Access**: Optimizing queries and transactions for quick retrieval
and updates.

### 2. Database Languages


- **Types of Languages**:
- **Data Definition Language (DDL)**: Used to define database structures (e.g.,
CREATE, ALTER, DROP statements).
- **Data Manipulation Language (DML)**: Used for data retrieval and manipulation
(e.g., SELECT, INSERT, UPDATE, DELETE).
- **Data Control Language (DCL)**: Used to control access to data (e.g., GRANT,
REVOKE).
- **Transaction Control Language (TCL)**: Used to manage transactions (e.g.,
COMMIT, ROLLBACK).

### 3. Database Users


- **Types of Users**:
- **Database Administrators (DBAs)**: Responsible for managing the database
system, ensuring security, performance, and integrity.
- **Application Developers**: Create applications that interact with the database,
often using DML and DDL.
- **End-Users**: Individuals who use applications to interact with the database
without needing to know the underlying database structure.

### 4. Database Abstraction


- **Levels of Abstraction**:
- **Physical Level**: How data is physically stored in the database (e.g., files,
indices).
- **Logical Level**: The structure of the database as a whole, including tables and
relationships, without considering how it is physically stored.
- **View Level**: The way users perceive the data. Different users may see
different views based on their needs, which can simplify complex data for non-
technical users.

### 5. Database Architecture


- **Architectural Models**:
- **Single-Tier Architecture**: All components (user interface, database) are on one
layer. Suitable for small applications.
- **Two-Tier Architecture**: Consists of a client tier (user interface) and a server
tier (database). The client sends requests to the server, which processes them.
- **Three-Tier Architecture**: Includes presentation, application logic, and database
tiers, providing a more modular approach. It enhances scalability and security.

### 6. The Relational Data Model and Relational Database Constraints


- **Relational Data Model**: Organizes data into tables (relations) where each row
represents a record and each column represents an attribute.
- **Relational Database Constraints**:
- **Primary Key**: A unique identifier for each record in a table.
- **Foreign Key**: An attribute that creates a link between two tables, enforcing
referential integrity.
- **Unique Constraint**: Ensures that all values in a column are different.
- **Check Constraint**: Validates that data entered meets specific criteria.

### 7. Basic Concepts of ER Model


- **Entity-Relationship (ER) Model**: A conceptual framework used to describe the
data and relationships within a database.
- **Entities**: Objects or things in the database (e.g., Student, Course).
- **Attributes**: Properties of entities (e.g., Student ID, Name).
- **Relationships**: Associations between entities (e.g., Students enroll in
Courses).

### 8. Relationship Sets


- **Definition**: A set of associations among entities. It can be one-to-one, one-to-
many, or many-to-many.
- **One-to-One**: Each entity in A is related to one entity in B and vice versa.
- **One-to-Many**: An entity in A can be associated with multiple entities in B, but
not the other way around.
- **Many-to-Many**: Entities in A can be associated with multiple entities in B and
vice versa.

### 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.

### 11. Design of ER Model


- **Principles of Designing ER Models**:
- **Simplicity**: Keep the design straightforward and intuitive.
- **Completeness**: Ensure all necessary entities and relationships are included.
- **Normalization**: Reduce redundancy and dependency by organizing data into
multiple related tables.
- **Scalability**: Design should allow for future growth and changes.

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:

### 1. The Relational Model


- **Definition**: The relational model is a way of structuring data using relations
(tables). Each relation consists of tuples (rows) and attributes (columns). The model
emphasizes data integrity and independence.
- **Characteristics**:
- Data is organized in tables.
- Each table has a unique name.
- Each column in a table has a unique name and contains data of a specific type.
- Rows are unique, representing individual records.

### 2. The Catalog


- **Definition**: The catalog is a metadata repository that describes the structure of
the database. It contains information about tables, columns, data types, constraints,
and relationships.
- **Components**:
- **Schemas**: Define the structure of the database.
- **Tables**: List all the tables in the database.
- **Columns**: Describe the attributes of each table, including data types and
constraints.

### 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.

### 5. Relational Algebra


- **Definition**: A procedural query language that operates on relations and returns
relations as output. It provides a set of operations to manipulate data.
- **Basic Operations**:
- **Selection (σ)**: Filters rows based on a condition.
- **Projection (π)**: Selects specific columns from a table.

- **Union (∪)**: Combines rows from two tables, removing duplicates.


- **Difference (−)**: Returns rows in one table that are not in another.
- **Cartesian Product (×)**: Combines every row of one table with every row of
another.

### 6. Domain Relational Calculus


- **Definition**: A non-procedural query language that specifies what to retrieve
rather than how to retrieve it. It focuses on the domains of the attributes.
- **Syntax**: Uses logical predicates to express queries. For example, `{a | P(a)}`
means “the set of all a such that P(a) is true.”

### 7. Tuple Relational Calculus


- **Definition**: Similar to domain relational calculus but operates on tuples (rows)
instead of attributes (columns).
- **Syntax**: Uses a similar logical structure, for example, `{t | P(t)}` where `t` is a
tuple and `P(t)` is a predicate that defines the condition.

### 8. Fundamental Operations


- **Core operations in relational algebra and SQL** include:
- **Selection**: Filtering records.
- **Projection**: Selecting specific fields.
- **Join**: Combining records from two or more tables based on related fields.
- **Union**: Merging results from multiple queries.

### 9. Additional Operations


- **More advanced operations** include:
- **Intersection**: Returns common rows from two tables.
- **Difference**: Returns rows from one table not in another.
- **Join Operations**: Different types (inner join, outer join, cross join) to combine
related tables based on conditions.

### 10. SQL Fundamentals


- **Structured Query Language (SQL)**: A standardized language for managing and
manipulating databases.
- **Key Concepts**:
- **DDL (Data Definition Language)**: Commands like CREATE, ALTER, DROP for
defining database structures.
- **DML (Data Manipulation Language)**: Commands like SELECT, INSERT, UPDATE,
DELETE for managing data.
- **DCL (Data Control Language)**: Commands like GRANT and REVOKE for
controlling access.

### 11. Integrity


- **Data Integrity**: Ensures accuracy and consistency of data within the database.
It includes:
- **Entity Integrity**: Ensures each table has a primary key.
- **Referential Integrity**: Ensures that foreign keys correctly reference primary
keys in related tables.
- **Domain Integrity**: Ensures that data entered into a column conforms to its
defined data type.

### 12. Triggers


- **Definition**: Automatic actions that are triggered by specific events in the
database (e.g., insertions, updates, deletions).
- **Usage**: Commonly used for enforcing business rules, maintaining audit trails,
or performing cascading operations.

### 13. Views


- **Definition**: Virtual tables that provide a way to present data from one or more
tables. They do not store data themselves but retrieve data from the underlying
tables.
- **Advantages**: Simplify complex queries, enhance security by restricting access
to certain columns, and present data in a specific format.

### 14. Relational Database


- **Definition**: A type of database that uses the relational model to store data in
tables. Each table is a collection of related data entries and consists of rows and
columns.
- **Characteristics**:
- Uses tables to organize data.
- Supports relationships between tables through keys.
- Enables complex queries through SQL.

### 15. Relational Algebra, Relational & Tuple Calculus


- **Relational Algebra**: A formal system for manipulating relations and formulating
queries.
- **Relational Calculus**: A non-procedural query language that specifies what data
to retrieve based on predicates (conditions).
- **Tuple Calculus**: Focuses on tuples and uses predicate logic to define queries.

These explanations should give you a comprehensive understanding of the


relational model and its components. If you need further details or examples for any
specific topic, feel free to ask!
Module III : Relational Database
Design : 10 Session Topic
Normalization using Functional
Dependency, Multivalued
dependency and Join dependency.
Here’s a detailed explanation of each topic in your Module III: Relational Database Design:

### 1. Normalization using Functional Dependency

- **Definition**: Normalization is the process of organizing data in a database to minimize


redundancy and improve data integrity. It involves decomposing tables into smaller, related
tables without losing data.

- **Functional Dependency (FD)**: A relationship between two attributes, typically between


a primary key and a non-key attribute. It indicates that the value of one attribute (the
determinant) uniquely determines the value of another attribute.

- **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.

### 2. Multivalued Dependency

- **Definition**: A multivalued dependency (MVD) occurs when one attribute in a table


uniquely determines multiple values of another attribute.

- **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.

### 3. Join Dependency

- **Definition**: A join dependency occurs when a relation can be recreated by joining


multiple relations based on their attributes.

- **Notation**: If R is a relation, then R has a join dependency if it can be decomposed into


sub-relations such that the original relation can be obtained by joining these sub-relations.

- **Example**: Consider a relation containing a student’s ID, courses, and professors. If we


can split this relation into separate relations for students and courses, and students and
professors, we can recreate the original relation by joining them.

- **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

- **Normalization** aims to reduce data redundancy and improve data integrity.

- **Functional Dependency** is the cornerstone of determining how to normalize a database.

- **Multivalued Dependency** and **Join Dependency** are important considerations in


higher normal forms (4NF and 5NF), ensuring that relationships between attributes are
maintained without unnecessary redundancy.

If you need further elaboration on any specific topic or examples, feel free to ask!

You might also like