UNIT 1: INTRODUCTION TO DBMS

Hello Everyone, Welcome to Rajasthan Polytechnic Blogs.

Subject - Introduction to DBMS CS 4002(Same as CI/IT 4002)
Branch - Computer Science Engineering
Semester - 4th Semester

📍⚡ Important 
▶ Video PDF - Update Soon
👉 WhatsApp Group - Join Now
👉 Telegram Channel - Join Now
📄 Notes in Hindi - Click Here
📄 Notes in English - Click Here
🔥 4th Semester All Subjects Notes - Click Here

Please take a moment to share your Review in Comment Section.

UNIT 1: INTRODUCTION TO DBMS

This chapter gives an introduction to Database Management Systems (DBMS) and covers the following topics:


1.1. Introduction to DBMS 🗃️

A Database Management System (DBMS) is a software that manages databases. It provides an interface between users and the database. In simpler terms, a DBMS helps to store, modify, and extract information from a database efficiently.

Key Points:

  • A database stores data in a structured way.
  • A DBMS provides security, manages user access, and ensures data integrity.
  • Examples of DBMS: MySQL, Oracle, PostgreSQL, SQL Server, MongoDB.

Why DBMS?

  • It makes data easily accessible.
  • Provides a way to store large amounts of data.
  • Handles complex queries, ensuring fast and accurate results.

1.2. Components of DBMS 🧩

A DBMS consists of several key components that work together to manage databases:

  1. Database Engine 🏭: This is the core service that handles data storage, retrieval, and manipulation.
  2. Database Schema 🗂️: Defines the structure of the data (tables, columns, etc.). It is a blueprint of the database.
  3. Query Processor 🖥️: Interprets and executes the queries submitted by users.
  4. Transaction Management 🔄: Ensures that operations are executed correctly, maintaining data consistency.
  5. Storage Manager 🏢: Manages the physical storage of data on disk and ensures it is retrieved efficiently.

Diagram:

+---------------------+ | User Interface | +---------------------+ | +---------------------+ +---------------------+ | Query Processor | ----> | Storage Manager | +---------------------+ +---------------------+ | | +---------------------+ +---------------------+ | Database Engine | <--> | Transaction Manager| +---------------------+ +---------------------+

1.3. Advantages of DBMS 🌟

A DBMS offers several advantages over traditional file-based systems:

  1. Data Redundancy Control 🔄: It reduces data duplication. A single version of data is stored and accessed.
  2. Data Integrity ✅: Ensures that data is accurate and consistent.
  3. Data Security 🔒: Only authorized users can access the data.
  4. Backup and Recovery 🛡️: If a system crashes, DBMS can restore the data from a backup.
  5. Multiple User Access 👥: Multiple users can access and modify data simultaneously.
  6. Data Independence 📂: The structure of the database can be changed without affecting applications.

1.4. Database System vs File System 💾

The Database System and File System are both used to store data, but they differ significantly:

FeatureDatabase System (DBMS)File System
Data ManagementStructured, uses tables, indexes, etc.Flat, no complex structure
Data RedundancyMinimizes redundancy, keeps data consistentHigh redundancy, data is duplicated
ConcurrencySupports multiple users and transactionsLimited support for multiple users
SecurityHigh, with encryption and access controlsBasic, lacks advanced security
Backup/RecoveryAutomated, easy to recover dataRequires manual intervention
ScalabilityHigh, can handle large amounts of dataLimited scalability for large data

Example: Think of a File System as a file cabinet where files are stored in folders, and a Database System as an organized library where books are categorized with specific rules for easy retrieval.


1.5. Database System Concepts and Architecture 🏛️

A database system is structured with 3 Levels of Architecture:

  1. Internal Level (Physical Level) 🔒: How data is stored physically on the disk.
  2. Conceptual Level (Logical Level) 🧠: What data is stored and its relationships.
  3. External Level (View Level) 👀: How users interact with the data (what data is visible to them).

Diagram:

+----------------------------+ | External Level | | (User View, Application) | +----------------------------+ | +----------------------------+ | Conceptual Level | | (Logical Schema, Relations) | +----------------------------+ | +----------------------------+ | Internal Level | | (Physical Storage Details) | +----------------------------+

1.6. Application Architecture of DBMS 🖥️🏗️

In a DBMS, there are different layers for data processing:

  1. Client-Server Architecture: A client requests data from a server. The server handles the database operations and returns results.
  2. Three-Tier Architecture: Divided into:
    • Presentation Layer: User interface (client).
    • Application Layer: Business logic and processing.
    • Data Layer: The DBMS where the actual data is stored.

Diagram:

+----------------------------+ | Presentation Layer | | (Client Interface) | +----------------------------+ | +----------------------------+ | Application Layer | | (Business Logic) | +----------------------------+ | +----------------------------+ | Data Layer | | (DBMS, Database Storage) | +----------------------------+

1.7. Overall Database Structure 🏗️

A Database consists of multiple components like tables, rows, columns, and keys. The main components are:

  1. Table 📝: Data is stored in tables, which are similar to spreadsheets (rows and columns).
  2. Row (Tuple) ➡️: A single record in the table.
  3. Column (Attribute) 📊: A data field in the table.
  4. Primary Key 🔑: A unique identifier for each row in the table.
  5. Foreign Key 🔗: A field in one table that is linked to the primary key in another table.

Diagram:

+----------------------------------+ | Employee Table | +----------------------------------+ | Emp_ID (PK) | Name | Department | +----------------------------------+ | 101 | John | HR | | 102 | Alice | Finance | | 103 | Bob | IT | +----------------------------------+

Conclusion 🌐

  • DBMS is crucial for managing large amounts of data.
  • It provides efficient ways of storing, retrieving, and securing data.
  • The architecture of DBMS ensures that users can interact with data in an organized manner, reducing errors and improving productivity.

With a DBMS, you can ensure data integrity, security, and scalability while supporting multiple users and handling complex queries.

Post a Comment

0 Comments