Notes on Database Management System
Database Concepts
- Data: Raw facts, figures, and information used for various purposes, organized into three main types:
- Structured Data: Organized and formatted (e.g., spreadsheets, relational databases).
- Semi-Structured Data: Some organization but not rigidly formatted (e.g., XML files).
- Unstructured Data: Lacks specific format (e.g., text documents, images).
Database and DBMS
Database: Collection of data for rapid search and retrieval.
Represents aspects of the real world, logically structured for specific purposes.
Database Management System (DBMS): Software that allows users to create, maintain, and manipulate databases.
Functions:
- Defining: Specify data types and structures.
- Constructing: Store data on a storage medium.
- Manipulating: Querying and updating data, generating reports.
Advantages of Using DBMS
- Data Redundancy Control: Minimizes duplicate data, saving space and ensuring consistency.
- Data Integrity: Rules and constraints maintain data accuracy over time.
- Data Security: Features like user authentication and encryption protect data access.
- Data Consistency: Centralized data ensures updates are consistent system-wide.
- Data Sharing: Allows multiple users to access data simultaneously.
- Backup and Recovery: Automated systems protect against data loss.
- Data Independence: Changes in the schema do not affect application programs.
- Query Language Support: Users can interact with data using SQL without extensive programming.
- Scalability: Handles growing amounts of data efficiently.
- Concurrent Access: Multiple users can access data safely through mechanisms like locking.
- Improved Performance: Through indexing and query optimization.
- Complex Data Structures: Supports multimedia and complex data types
- Reduced Development Time: Provides tools for faster application development.
- Wide Applicability: Useful in various industries (banking, healthcare, etc.).
Characteristics of DBMS
- ACID Properties: Atomicity, Consistency, Isolation, Durability.
- Multiple User Access: Supports concurrent user connections.
- Backup and Recovery Systems: Protect data integrity and recover from failures.
- Query Language Support: Tools provided for easy data manipulation (e.g., SQL).
Components of Database System Environment
- Hardware: Physical equipment like servers and storage devices.
- Software: DBMS software for managing data.
- Data: The actual information being managed.
- Procedures: Guidelines for data management.
- Database Design: Structure represented by tables and relationships.
- Database Models: Frameworks for organizing and representing data (e.g., relational model).
- Users: Different types based on interaction (end-users, administrators, developers).
- Security and Access Control: Protocols to limit data access.
- Query Processor: Optimizes user queries.
- Transaction Management: Ensures data integrity during operations.
- Storage Management: Handles data storage logistics.
- Backup and Recovery Procedures: Methods for data restoration.
- Concurrency Control: Manages simultaneous user access.
DBMS Architecture
- 1-Tier Architecture: Direct access to the database; minimal user interface.
- 2-Tier Architecture: Client-server model; clients interact directly with servers using APIs.
- 3-Tier Architecture: Has an application server between client and database, isolating users.
Data Independence
- Logical Data Independence: Changing the conceptual schema does not affect the external schema.
- Physical Data Independence: Changes in internal schema do not affect the conceptual schema.
Database Languages
- Data Definition Language (DDL): Commands for defining database structures.
- Data Manipulation Language (DML): Operations for data retrieval and updates.
- Data Control Language (DCL): Controls permissions using statements like GRANT and REVOKE.
Applications of Database
- Railway Reservation Systems: Manage reservations and train statuses.
- Library Management Systems: Maintain records of books.
- Banking: Store transactions and client data.
- Education Sector: Manage student assessments and records.
- E-Commerce: Facilitate online shopping transactions.
- Telecommunications: Manage call records and billing information.
Disadvantages of DBMS
- Increased Costs: Maintenance and training can be expensive.
- Management Complexity: Need for skilled personnel and technology integration.
- Maintenance and Updates: Frequent updates required for security and efficiency.
- Overhead Costs: General DBMS features may not be needed for simple applications.