0% found this document useful (0 votes)
33 views21 pages

CS30007 - Database Systems For Data Science-1

The document outlines the importance of database systems in data science, highlighting their role in managing data through various stages from collection to visualization. It discusses the ACID properties—Atomicity, Consistency, Isolation, and Durability—that ensure reliable transaction processing. Additionally, it touches on data models, specifically the relational model, and the use of SQL for database manipulation.

Uploaded by

Manjish Pal
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)
33 views21 pages

CS30007 - Database Systems For Data Science-1

The document outlines the importance of database systems in data science, highlighting their role in managing data through various stages from collection to visualization. It discusses the ACID properties—Atomicity, Consistency, Isolation, and Durability—that ensure reliable transaction processing. Additionally, it touches on data models, specifically the relational model, and the use of SQL for database manipulation.

Uploaded by

Manjish Pal
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
You are on page 1/ 21

Database Systems for Data Science

(CS30007):
Introduction to Database Systems for
Data Science
Level: 300
Credit: 2
Domain: Data Science
Instructor: Manjish Pal
Why Databases Matter in Data Science ?

● Data is foundational to all stages of data science

● Raw data → Clean data → Insights → Action

● DBs offer scalability, query efficiency, integrity

● Pipeline (Data Collection → Storage → Analysis → Visualization)


Database Applications - Examples
Database Application - Examples
Purpose of Database Systems
Purpose of Database Systems
ACID Properties of Databases

ATOMICITY
Definition: All parts of a transaction are treated as a single unit
that either fully happens or does not happen at all.
● If one part of a transaction fails, the entire transaction is rolled
back.

● No partial transactions are ever saved in the database.

Example:
Transferring ₹1000 from Account A to Account B. Either both the
debit from A and credit to B happen, or neither does.
ACID Properties of Databases
CONSISTENCY

Definition: A transaction takes the database from one valid state to


another, maintaining all predefined rules and constraints.

● Constraints like primary keys, foreign keys, and unique values are
always enforced.

● The database cannot be left in an invalid state.

Example:
If a transaction inserts a duplicate primary key, it must be rejected,
ensuring consistency of data rules.
ACID Properties of Databases
ISOLATION
● Definition: Transactions are isolated from one another and execute
independently.

○ Intermediate states of a transaction are invisible to other transactions.

○ Prevents issues like dirty reads, non-repeatable reads, and phantom reads.

● Example:
Two users booking the last movie ticket at the same time will not both succeed
— isolation ensures only one booking is confirmed.
ACID Properties of Databases
DURABILITY
Definition: Once a transaction is committed, its changes are
permanent—even if the system crashes afterward.

● Data is written to non-volatile storage (like disk).

● Ensures recovery from failure without data loss.

Example:
After a successful bank transaction, even if the server crashes
immediately, the transaction remains recorded.
Data Models
Relational Model
A Sample Relational Database
View of Data
Instances and Schemas
Data Definition Language (DDL)
Data Manipulation Language (DML)
Data Manipulation Language
SQL (Structured Query Language)
Database Access from Application Program
Database Design and Database Engine

You might also like