0% found this document useful (0 votes)
17 views35 pages

DE-Module 1

The document provides an overview of file processing systems and database management systems (DBMS), detailing their characteristics, advantages, and disadvantages. It explains the architecture of DBMS, including 1-tier, 2-tier, and 3-tier designs, as well as the three-schema architecture that separates data storage from user interaction. Additionally, it discusses various data models, including hierarchical and network models, highlighting their structures and relationships.

Uploaded by

Sivangi Tripathy
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)
17 views35 pages

DE-Module 1

The document provides an overview of file processing systems and database management systems (DBMS), detailing their characteristics, advantages, and disadvantages. It explains the architecture of DBMS, including 1-tier, 2-tier, and 3-tier designs, as well as the three-schema architecture that separates data storage from user interaction. Additionally, it discusses various data models, including hierarchical and network models, highlighting their structures and relationships.

Uploaded by

Sivangi Tripathy
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

21-01-2025

Module-I Overview

THREE SCHEMA EER FEATURES


FILE PROCESSING Topic ARCHITECTURE Topic
SYSTEM

2 3 4 5
1

DATABASE Topic DATA MODELS Topic


Topic MANAGEMENT
SYSTEM

File System
• An early attempt to computerize the manual filing system.

• Method of storing and organizing computer files and the data to make it easy
to find and access.

• Use storage devices like:


Primary Storage
Secondary Storage
Tertiary Storage

1
21-01-2025

File processing system


These represent different software
applications or programs that need
to access, process, or generate data.

The file system is a mechanism for


storing, organizing, and accessing
files on a storage medium (such as a
hard drive, SSD, etc.).

These are files that are used by the


applications. Each file likely represents
some form of stored data, such as a text
file, CSV file, database file, or configuration
file.
Figure: example of how applications and file
systems interact with each other

Example of File processing system


Interface

The file system acts as


the intermediary layer
that manages the files
and ensures that each
application can access
the files it needs.

2
21-01-2025

Characteristics of File Processing System


1. It is a group of files storing data of an organization.
In a File Processing System, data is stored in multiple individual files. Each
file serves as a data repository for a specific department or function within
the organization.
Example: A company might have separate files for employee records,
customer details, and sales transactions.

2. Each file is independent from one another.


Files are not interrelated, meaning there are no direct connections or
relationships between them.
This independence can lead to data redundancy and inconsistencies since
the same data might exist in multiple files without synchronization.

Characteristics of File Processing System


3. Each file is called a flat file.
A flat file is a simple, plain text or binary file containing data in a structured
or tabular format.
These files are typically used for storing data in rows and columns without
any relational links between the records.

4. Each file contains and processes information for one specific function
like accounting or inventory.
Files are designed to meet the needs of specific tasks or departments.
Example:
A file for inventory might contain details about products, stock levels, and suppliers.
A file for accounting might store transaction records and financial statements.

3
21-01-2025

Characteristics of File Processing System


5. Files are designed using application programs written in programming
languages such as COBOL, C, C++, etc.
Developers create custom programs to process and manage these files.
Example:
A program written in COBOL might be used to generate payroll reports from an
employee file.
Another program in C might handle customer orders from a sales file.
The logic for file management (e.g., reading, writing, and updating data) is
embedded directly in the application code.

Advantages of File Processing System

1. Simplicity: Easy to implement and manage for small applications.


2. Low Cost: Can be implemented with basic file management tools provided by the
operating system.
3. Customizability: Developers have direct control over how data is stored, accessed,
and processed.
4. Performance for Small Data Sets: Performs well when managing small amounts
of data or when processing sequential files.
5. No Need for Specialized Software: Data is stored as plain files, which can be read
by various programs like text editors or spreadsheets.

4
21-01-2025

Disadvantages of File Processing System


1.Data Redundancy and Inconsistency:
• Duplicate data may exist in multiple files, leading to redundancy.
• Updates to one file may not propagate to others, causing inconsistencies.
2.Lack of Data Integrity:
• No centralized mechanism to enforce data integrity rules (e.g., constraints on data
validity).
3.Limited Scalability:
• Becomes inefficient as the volume of data grows due to lack of indexing and search
optimization.
4.Difficulty in Data Sharing:
• File-based systems are not designed for multi-user environments, leading to
potential conflicts and limited data accessibility.

Disadvantages of File Processing System


5.Security Concerns:
• File systems lack built-in security features, making data vulnerable to unauthorized
access.
6.No Standardized Query Language:
• Unlike databases, there is no structured query language (like SQL) for retrieving and
manipulating data.
7.Data Dependence:
• Applications are tightly coupled with the data structure of files. Changes to the file
structure may require modifying the application code.
8.Lack of Backup and Recovery Mechanisms:
• File systems do not have built-in mechanisms for automatic backups or recovery in case
of failure.
9.Concurrency Issues:
• File systems struggle with simultaneous access by multiple users, leading to potential
conflicts or data corruption.

5
21-01-2025

Why Databases?

• Scientists (biologists) have to manage huge quantities of data


• Results of experiments
• References to relevant publications

• Those data need to be stored in a consistent way, shared and analyzed

• Which are the experiments on a cellular biology done at my lab in 2009?

• Which are the publications of my group?


• Databases are a possible solution to this issue

Basic Definitions
 Data:
 Known facts that can be recorded and have an implicit meaning.

6
21-01-2025

 Database:

 A database is an organized collection of data, so that it can be easily accessed and


managed.

 Database Management System (DBMS):

 Collection of inter-related data and set of programs to access those data.


 Helps to store and retrieve database information in a convenient and efficient manner.

 Database System:

 The DBMS software together with the data itself. Sometimes, the applications are also
included.
 DB + DBMS = DBS

7
21-01-2025

Metadata: Data about data

Data dictionary: A Data Dictionary is a collection of names, definitions, and attributes about data
elements that are being used or captured in a database.

8
21-01-2025

Simplified Database System Environment

Functions of DBMS
• Define a particular database in terms of its data types, structures, and constraints

• Manipulating the database

• Protection or Security measures to prevent unauthorized access

• Processing and Sharing by a set of concurrent users and application programs – yet,
keeping all data valid and consistent

• Presentation and Visualization of data

• Maintaining the database and associated programs over the lifetime of the database
application

9
21-01-2025

Example of a simple database Example of a simplified database


catalog

Figure: A database that stores student and course information and their catalog

Advantages of Database System


1. Reduced Data Redundancy: Data is stored centrally in a database, eliminating the need for duplicate data across
multiple files.
Saves storage space and ensures updates to data are consistent across all applications.
Example: A customer’s details are stored in a single table instead of duplicating them in billing and shipping systems.

2. Improved Data Consistency: Centralized control ensures that all users see the same data, reducing errors caused by
inconsistent updates.
Keeps the system reliable by avoiding mismatches in data.
Example: Updating a product's price in the database reflects the same price across all departments.

3. Enhanced Data Security: Databases provide mechanisms like authentication, role-based access control, and
encryption to safeguard data.
Prevents unauthorized access and protects sensitive information.
Example: Only HR personnel can access employee salary details.

10
21-01-2025

Advantages of Database System (Cont.)


4. Better Data Integration: Combines data from various sources into a unified structure, allowing better
management and analysis.
Helps organizations maintain a single source of truth across departments.
Example: Sales and inventory data are integrated, enabling real-time tracking of stock availability.

5. Improved Data Access and Querying: Databases use SQL (Structured Query Language) to retrieve and
manipulate data efficiently.
Allows quick and complex queries without requiring advanced coding skills.
Example: A query can instantly retrieve all sales records for a specific month.

6. Data Backup and Recovery: Database systems have built-in tools to back up data and restore it in case of
failures.
Ensures critical data is not lost due to hardware crashes or human errors.
Example: Automatic nightly backups protect against accidental deletions.

Advantages of Database System


7. Multi-User Access: Multiple users can access and work on the database simultaneously without conflicts.
Improves collaboration and ensures real-time updates for all users.
Example: Several employees can update an inventory system without overwriting each other's changes.

8. Scalability: Database systems can handle increasing amounts of data and users as the organization grows.
Ensures consistent performance, even under high workloads.
Example: A database for a small e-commerce site can scale up to support millions of users.

9. Improved Decision-Making: Databases allow real-time data analysis and generate accurate reports.
Provides actionable insights that support better strategic decisions.
Example: A dashboard showing current sales trends helps management forecast future demand.

11
21-01-2025

Advantages of Database System


10. Data Independence: Applications are decoupled from the database structure, allowing changes to the
database without affecting application logic.
Makes the system easier to maintain and adapt to changing requirements.
Example: Adding a new field to a database table doesn’t require rewriting the entire application code.

11. Reduced Development Time: Features like indexing, constraints, and relationships reduce the need for custom
code.
Speeds up the development and deployment of applications.
Example: Built-in indexing allows quick data retrieval without additional coding.

12. Support for Complex Transactions: Databases ensure data integrity during multi-step operations like
financial transactions.
Prevents data loss or corruption if an operation is interrupted.
Example: A bank transfer ensures that either both debit and credit operations complete successfully or neither does.

DBMS Architecture
In DBMS architecture, in RDBMS, the database and its components are
stored on disk and managed by the RDBMS software, which provides
facilities for adding, updating, and deleting data, as well as searching and
retrieving data based on specific conditions.

12
21-01-2025

DBMS Architecture (Contd.)


1-Tier Architecture
The simplest form of DBMS architecture is the 1-tier DBMS design, where
all DBMS components reside on a single server or platform, allowing direct
access to the database by end users.

DBMS Architecture (Contd.)


2-Tier Architecture
• It refers to a client-server architecture where
the user interface and the application logic
are separated into two separate
components.
• The client component is typically the user
interface and the server component is
responsible for handling the data and
business logic.
• In this architecture, the client component
communicates directly with the server
component to request data and perform
actions.

13
21-01-2025

DBMS Architecture
3-Tier Architecture
• Another layer exists between the client and server in
the 3-Tier architecture. The client cannot communicate
directly with the server with this design.

• On the client side, the program communicates with an


application server, which then communicates with the
database system.

• Beyond the application server, the end-user has no


knowledge of the database’s existence. Aside from the
application, the database has no knowledge of any
other users.

Three Schema Architecture of


DBMS
It is a framework that separates the database system into three levels:
1. Internal Schema ,
2. Conceptual Schema , and
3. External Schema .

This architecture was proposed to achieve data abstraction and independence between
the physical storage of data and how it is accessed by users.

14
21-01-2025

Three Schema Architecture of


DBMS (Cont.) View in table format

Interface Designer  View Level (User Views (Custom


for each user or application))

Database Designer  Logical Level (Logical


Database Structure)

Database Administrator  Physical Level (Physical


Storage Details)

Information are
stored in file format

1. Internal Schema (Physical Level)


The lowest level of the architecture that deals with the physical storage of data in the database.
Specifies how data is stored on the storage medium (e.g., disk, SSD) and manages file
structures, indexes, and access paths.

Focus:
- File organization and data storage formats.
- Data compression and encryption mechanisms.
- Performance optimization for data retrieval and storage.

Example: Storing customer data in binary format using B-trees for indexing.

15
21-01-2025

2. Conceptual Schema (Logical Level)


The middle level of the architecture that represents the entire database structure logically,
independent of physical storage.
Provides a unified view of the database, defining what data is stored and the relationships
among them.

Focus:
- Entity types, attributes, and relationships.
- Constraints such as primary keys and foreign keys.
- Logical data independence.

Example: A table for customers with columns like `CustomerID`, `Name`, and `Address`, linked
to an orders table through `CustomerID`.

3. External Schema (View Level)


The highest level of the architecture, which provides customized views of the database for end-
users or applications.
Allows users to interact with data in a way that is meaningful to them, hiding irrelevant details.

Focus:
- User-specific views of data.
- Data security by restricting access to certain parts of the database.
- Simplified interaction with complex data.

Example:
- A finance department sees only `CustomerID` and `OutstandingBalance`.
- A marketing team sees only `Name` and `Email`.

16
21-01-2025

Key Benefits of the Three Schema


Architecture
1. Data Abstraction: Users do not need to understand how data is
physically stored or manipulated.

2. Data Independence: It refers characteristic of being able to


modify the schema at one level of the database system without
altering the schema at the next higher level.
 Logical Independence: Changes in the logical schema (e.g., adding
new fields) do not affect external views.
 Physical Independence: Changes in storage details do not affect
the logical schema or user views.

3. Enhanced Security: External schema allows restricting data


access to authorized users.

4. Modularity: Each level can be designed and modified


independently.

Data Model
 Data Models Serve as the foundation for organizing and structuring
data within a database.

 A data model represents the structure of the database and defines how
data is stored, accessed, and manipulated.

 It acts as a blueprint that helps in designing, understanding, and


implementing databases efficiently.

Data + Relationship + Semantics + Constraints

17
21-01-2025

Types of Data Model

• Entity- • Semi- • Hierarchical


Relationshi structured Model
• Relational • Object- • Network
p Model Data Model
Model Based Data Model
Model

1. Hierarchical Model

• Organize data into a tree-like structure or , similar to a computer file


system.
• Data is organized into a series of levels or layers (each layer
representing a particular type of data).
• The data is stored as records, which are linked together through
parent-child relationships.
• Each record has only one parent, except for the root record.
• Child records can have multiple parents, but they are typically
organized in a way that ensures a strict hierarchy is maintained.

18
21-01-2025

Example of Hierarchical Model

2. Network Model

• Data is organized into a graph-like structure, where each record


can have multiple parent or child records, forming a network of
relationships.
• Records are organized into sets called "types," which are similar
to tables in the relational model.
• Each type can have multiple records, and each record can have
multiple "owners" and "members."
• Owners are the parent records that own or connect to the child
records (members) through "sets" that define the relationships
between records.

19
21-01-2025

Example of Network Model

3. Relational Model
• Organizes data into tables, with each table representing a specific
entity or relationship between entities.
• Data is organized into rows and columns, with each row
representing a unique record or instance of the entity, and each
column representing a specific attribute or characteristic of the
entity.
• Relationships between entities are represented using foreign
keys, which link records in different tables based on a common
attribute.

20
21-01-2025

Example of Relational Model

4. Entity-Relationship Model
 E-R data model or E-R model

 Collection of basic objects called entities and its relationship.

 An entity is a real world things or object

 Widely used in database design

21
21-01-2025

5. Object-Based Model
• The data is in form of objects,
which are instances of a certain
class with each having its own
methods and attributes.

• Objects can inherit attributes


and methods from parent
objects, allowing for the
hierarchical organization of the
data.

6. Semi structured Data Model


• Used for flexible representation of
data without requiring a strict schema
or predefined structure.
• Data is organized into a hierarchy of
nodes and edges, with each node
representing a specific entity or
element and each edge representing a
relationship between nodes.
• Semi-structured data often takes the
form of documents, such as HTML,
XML, or JSON files, which contain data
organized into a hierarchical structure.

22
21-01-2025

Key
• Key of a Relation:

• Each row has a value of a data item (or set of items) that uniquely
identifies that row in the table

• Called the key

• In the STUDENT table, SSN is the key

• Sometimes row-ids or sequential numbers are assigned as keys to


identify the rows in a table
• Called artificial key or surrogate key

Schema
The Schema (or description) of a Relation:

• Denoted by R(A1, A2, .....An)


• R is the name of the relation
• The attributes of the relation are A1, A2, ..., An

Example:
CUSTOMER (Cust-id, Cust-name, Address, Phone#)
• CUSTOMER is the relation name
• Defined over the four attributes: Cust-id, Cust-name, Address, Phone#

• Each attribute has a domain or a set of valid values.


• For example, the domain of Cust-id is 6 digit numbers.

23
21-01-2025

Definition Summary

Informal Terms Formal Terms

Table Relation
Column Header Attribute
All possible Column Domain
Values
Row Tuple
Table Definition Schema of a Relation

Entity Relationship Model (ER-Model)

 Provides the graphical or conceptual


view of the database design

 Describes data as a set of entities,


attributes, and relationships

 Defines the structure of a database


with the help of a diagram called as
ER-Diagram

24
21-01-2025

Symbols for Representation

Main Components of ER-Model

25
21-01-2025

Main Components of ER-Model


(Entity)
Entity
An Entity may be an object with a physical existence – a particular
person, car, house, or employee – or it may be an object with a
conceptual existence – a company, a job, or a university course.

Entity Set
An Entity is an object of Entity Type and a set of all entities is called
an entity set.

Example:
E1 is an entity having Entity Type Student and the set of all students is
called Entity Set.

Main Components of ER-Model


(Entity)
Strong Entity
• It has a key Attribute.
• Does not depend on other Entity in the Schema.
• It has a primary key.
• Represented by a rectangle.

Weak Entity
• key attributes can’t be defined.

Dependent= Weak Entity Type and Employee = Identifying Entity type for Dependent, which means it
is Strong Entity Type .

26
21-01-2025

Main Components of ER-Model


(Entity)

NOTE:
• A weak entity type is represented by a Double Rectangle.
• The participation of weak entity types is always total.
• The relationship between the weak entity type and its identifying strong entity type is
called identifying relationship and it is represented by a double diamond.

Main Components of ER-Model


(Attributes)
Attributes are the properties that define the entity type.

Types of Attributes:
1. Key Attribute
2. Composite Attribute
3. Multivalued Attribute
4. Derived Attribute

27
21-01-2025

Main Components of ER-Model


(Attributes)
1. Key Attribute: Which uniquely identifies each entity in the entity set

2. Composite Attribute: Composed of many other attributes.

Main Components of ER-Model


(Attributes)
3. Multivalued Attribute: Consisting of more than one value for a given entity.

4. Derived Attribute: Derived from other attributes of the entity type

28
21-01-2025

Main Components of ER-Model


(Relationship Type and Relationship Set)
A Relationship Type represents the association between entity types.

Represented by a diamond and connecting the entities with lines.

A set of relationships of the same type is known as a relationship set.

Degree of a Relationship Set


The number of different entity sets participating in a relationship set is called the degree of
a relationship set.

Types
1. Unary Relationship
2. Binary Relationship
3. Ternary Relationship
4. N-ary Relationship

29
21-01-2025

Mapping Cardinalities

Cardinality defines the number of entities in one entity set, which can be associated
with the number of entities of other set via relationship set.

Types:
 One-to-one
 One-to-many
 Many-to-one
 Many-to-many

One-to-One Relationship One-to-Many Relationship

30
21-01-2025

Many-to-One Relationship Many-to-Many Relationship

Participation Constraints

Specifies the number of instances of an entity that are participating in the


relationship type

There are two types of Participation constraint:

Total participation
Partial participation

31
21-01-2025

Total Participation Partial Participation

EER Features
• EER is a high-level data model that incorporates the extensions to the original ER
model.

• In addition to ER model concepts EER(Enhanced Entity–Relationship) includes:

1. Subclasses and Super classes.


2. Specialization and Generalization.
3. Category or union type.
4. Aggregation.

32
21-01-2025

Subclasses and Super class


• Super class is an entity that can be divided into further subtype.

• For example − consider Shape super class.

Generalization
• Generalization is a process of generalizing an entity which contains generalized
attributes or properties of generalized entities.

33
21-01-2025

Specialization
• Specialization is a process where a higher-level entity is specialized into two or
more lower-level entities based on their characteristics.

Category or Union
• Relationship of one sub class with more than one super class.

• Owner is the subset of two super class: Vehicle and House.

34
21-01-2025

Aggregation
• Specialization is an abstraction where a relationship with its corresponding entities
is aggregated into a higher-level entity.

35

You might also like