0% found this document useful (0 votes)
2 views

Introduction to Databases

Uploaded by

patilvilohith20
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Introduction to Databases

Uploaded by

patilvilohith20
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

INTRODUCTION TO DATABASES

Introduction to Databases
1. Database Concepts
• Definition and Purpose of Databases:
o A database is an organized collection of
data, generally stored and accessed
electronically. The primary purpose of a
database is to manage and retrieve data
efficiently, allowing users to store,
update, and query data in a structured
format.
o Databases are essential for managing
large amounts of information, supporting
data integrity, and enabling multi-user
access to data.
• Database vs. File System:
o File System:
▪ A file system manages and organizes
files on a storage medium, like a hard
drive. Data is stored in individual
files, and the file system handles the
location and retrieval of these files.
▪ Limitations include data redundancy,
inconsistency, difficulty in data
retrieval, lack of concurrent access,
and limited security features.
o Database:
▪ A database stores data in a
structured way, often in tables with
relationships between them. It uses a
Database Management System
(DBMS) to manage, query, and
update data.
▪ Advantages include data integrity,
reduced redundancy, support for
complex queries, multi-user access,
and enhanced security.
• Advantages of DBMS:
o Data Integrity: Ensures data accuracy and
consistency through constraints and
validation rules.
o Data Redundancy Reduction: Eliminates
unnecessary duplication of data.
o Data Security: Controls access to data
through authentication and authorization
mechanisms.
o Concurrent Access: Allows multiple users
to access and modify data simultaneously
without conflicts.
o Data Independence: Separates the data
structure from the application, making it
easier to modify the database without
affecting the applications that use it.
2. Database Models
• Hierarchical Model:
o Represents data in a tree-like structure
where each record has a single parent
and potentially multiple children.
o Suitable for applications with a clear
hierarchy, such as organizational charts or
file systems.
• Network Model:
o Similar to the hierarchical model but
allows each record to have multiple
parent and child records, forming a graph
structure.
o More flexible than the hierarchical
model, but more complex to implement
and manage.
• Relational Model:
o Represents data in tables (relations),
where each table consists of rows
(records) and columns (attributes).
o Data in different tables can be linked
through foreign keys.
o Most widely used model due to its
simplicity, flexibility, and support for
powerful query languages like SQL
(Structured Query Language).
3. Database Systems
• Introduction to Database Management
Systems (DBMS):
o A DBMS is software that manages
databases, providing an interface for
users and applications to interact with
the data.
o The DBMS handles data storage,
retrieval, security, and integrity, freeing
developers from low-level data
management tasks.
• Components of a DBMS:
o Database Engine: Handles the storage,
retrieval, and update of data in the
database.
o Database Schema: Defines the structure
of the database, including tables,
relationships, and constraints.
o Query Processor: Interprets and executes
SQL queries, optimizing them for efficient
data retrieval.
o Transaction Manager: Ensures that
database transactions are processed
reliably and adhere to the ACID
properties (Atomicity, Consistency,
Isolation, Durability).
o Concurrency Control: Manages
simultaneous data access to ensure that
transactions are executed without
conflicts.
o Recovery Manager: Provides
mechanisms for data recovery in case of
system failures.
• DBMS Architecture:
o Single-Tier Architecture: The database
and the application reside on the same
system. It's simple but lacks scalability.
o Two-Tier Architecture: The database and
the application are on separate systems.
The application interacts with the DBMS
via an API, such as ODBC or JDBC.
o Three-Tier Architecture: Involves a client,
an application server, and a database
server. This architecture improves
scalability, security, and manageability.

You might also like