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

DBMS_01

A Database Management System (DBMS) is software that facilitates the creation, management, and manipulation of databases, ensuring data organization, consistency, security, and accessibility. Unlike file systems, which manage unstructured data without enforcing relationships, DBMSs offer structured data storage, advanced querying capabilities, and robust data integrity and security features. SQL is the standard language for managing relational databases, encompassing commands for defining, manipulating, and controlling data.

Uploaded by

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

DBMS_01

A Database Management System (DBMS) is software that facilitates the creation, management, and manipulation of databases, ensuring data organization, consistency, security, and accessibility. Unlike file systems, which manage unstructured data without enforcing relationships, DBMSs offer structured data storage, advanced querying capabilities, and robust data integrity and security features. SQL is the standard language for managing relational databases, encompassing commands for defining, manipulating, and controlling data.

Uploaded by

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

LAB 01

Introduction to DBMS (Database Management System)


A Database Management System (DBMS) is software that allows users to create, manage, and
manipulate databases. It serves as an interface between users and the databases, ensuring that data is
organized, consistent, secure, and easily accessible. DBMSs support key operations like defining,
manipulating, and securing data, along with enforcing transaction controls. The system maintains
ACID properties (Atomicity, Consistency, Isolation, and Durability) to ensure reliable transaction
processing.
There are several types of DBMSs, each designed for specific use cases:
• Relational DBMS (RDBMS): Organizes data in tables (e.g., MySQL, PostgreSQL).
• Object-Oriented DBMS: Combines object-oriented programming and database capabilities.
• Network DBMS: Uses a network structure to represent data relationships.
• Hierarchical DBMS: Organizes data in a tree-like structure.
File System vs DBMS
Both file systems and DBMSs manage and organize data, but their approaches differ in several
important ways.
File System:
A file system manages the storage of files on a physical medium like hard drives or SSDs. Data is
stored in files, which are typically unstructured, and the organization is basic without any built-in
method for enforcing relationships between files. Users must rely on external programs for accessing
and manipulating the data.
DBMS:
A DBMS provides a structured way to store and manage data. Data is organized in tables with defined
relationships, and users can interact with it using high-level query languages like SQL. DBMSs also
include advanced features like data integrity enforcement, concurrent access control, and backup
mechanisms.
Key Differences:

Aspect File System DBMS

Data Storage Stores data in files without structure Stores data in structured tables

Requires custom programs for


Data Retrieval SQL provides efficient querying tools
retrieval

Data Integrity No built-in integrity constraints Ensures data integrity with constraints

Advanced security with user access


Data Security Limited security, typically at file level
control

Concurrency Limited support for concurrent Manages concurrent data access


Control access effectively
Aspect File System DBMS

Backup and
Manual backup procedures Automated backup and recovery
Recovery

SQL (Structured Query Language)


SQL is a standard language used for managing and manipulating relational databases. It allows users
to define, query, and manage data in a consistent way across different database systems. MySQL, an
RDBMS, implements SQL to enable efficient database management.
SQL commands are categorized into four main types:
1. Data Definition Language (DDL): Used for defining and modifying the structure of database
objects like tables.
o CREATE: Creates new objects like tables.
o ALTER: Modifies existing objects.
o DROP: Deletes objects.
o TRUNCATE: Removes data from a table but keeps the structure.
2. Data Manipulation Language (DML): Used to manage the data within the database.
o INSERT: Adds new records.
o UPDATE: Modifies existing records.
o DELETE: Removes records.
3. Data Control Language (DCL): Manages permissions and access control.
o GRANT: Provides privileges to users.
o REVOKE: Removes privileges from users.
4. Transaction Control Language (TCL): Manages database transactions.
o COMMIT: Saves changes made during a transaction.
o ROLLBACK: Reverts changes made during a transaction.
o SAVEPOINT: Sets a point within a transaction to which you can roll back.
SQL Data Types
SQL defines several data types to handle various kinds of data. These types ensure that the data is
stored correctly and efficiently, depending on its characteristics.
1. Numeric Data Types:
o INT: Stores whole numbers.
o FLOAT/REAL: Stores approximate floating-point numbers.
o DECIMAL(NUMERIC): Stores exact numeric values with specified precision and scale.
2. Character String Data Types:
o CHAR(n): A fixed-length string of characters.
o VARCHAR(n): A variable-length string with a maximum length.
3. Binary Data Types:
o BINARY(n): Fixed-length binary data.
4. Date and Time Data Types:
o DATE: Stores date values (e.g., birthdates, event dates).
o TIME: Stores time values (e.g., meeting times).
o DATETIME/TIMESTAMP: Stores both date and time.
5. Boolean Data Type:
o BOOLEAN: Stores logical values (TRUE/FALSE).

You might also like