Docsity

Database Management Systems: Transactions, Indexing, and SQL, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download Database Management Systems: Transactions, Indexing, and SQL and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

Database Management

Systems(CS23332)

II YEAR- III SEMESTER

SYLLABUS UNIT-I DATABASE SYSTEMS AND SQL QUERY 9 Introduction – Purpose of Database Systems - View of Data –Database Architecture -Database Schema – Keys – Codd’s Rule –RDBMS- SQL: Data Definition – Domain types – Structure of SQL Queries - Modifications of the database –Set Operations–Aggregate Functions– Null Values- SQL Nested Sub q ueries –Complex Queries–Views – Joined relations. UNIT-II PL/SQL,DATAMODEL AND QUERYPROCESSING 9 PL/SQL:Functions,Procedures,Triggers,Cursors–DynamicSQL–RelationalAlgebra-TupleRelationalcalculus- Domain Relational Calculus–Entity Relationship Model–Constraints-Entity Relationship Diagram-Design Issues of ER Model – Extended ERFeatures –Mapping ER Model to Relational Model– Query Processing –Heuristics for Query Optimization. UNIT-III NORMAL FORMS AND INDEXING 9 Motivation for Normal Forms – Functional dependencies – Armstrong’s Axioms for Functional Dependencies – Closure for a set of Functional Dependencies – Definitions of 1NF-2NF-3NF and BCNF – Multi valued Dependency 4NF - Joint Dependency- 5NF-File Organization-Indexing B+ tree - B-Tree

UNIT-IV TRANSACTIONS 9 Transaction Concepts – ACID Properties – Schedules – Serializability – Transaction support in SQL – Need for Concurrency – Concurrency control –Two Phase Locking- Timestamp – Multi version – Validation and Snapshot isolation– Multiple Granularity l ocking –Deadlock Handling–Recovery Concepts –Recovery based on deferred and immediate update – Shadow paging – ARIES Algorithm UNIT-V NOSQL DATABASE 9 No SQL Database vs.SQL Databases – CAP Theorem –Migrating from RDBMS to No SQL – Mongo DB – CRUD Operations– Mongo DB Sharding – MongoDB Replication – Web Application Development using MongoDB with Python and Java.

Unit 1

Introduction to Database Management Systems

Introduction to Data , Information,

Meta Data

Data: -Raw facts and figures that can be recorded. Information: Meaningful (processed) data is known as information. Meta Data : Data that describe the properties of other data is Know as Metadata. Actually, Metadata keeps the information of other data

Example-

10,971, Data Chennai Population in 2020 Information

File Processing System(Traditional Approach)

In the traditional file-based approach, many organization

exclusively used file processing systems to store and

manage data.

In this file processing system, each unit or department

in an organization has its own set of separate files and the records are grouped based on their categories.

The data in one file may not relate to the data in any other file.

File Processing Data Weakness

Data redundancy- Data redundancy occur when the same data items are stored in multiple files due to each unit or department in an organization has its own sperate files in the file processing system. For example, the Student contract file and the Student file store the same students’ names and addresses.

Wastes resources - Duplicating data in this way is a waste of storage space and people’s time. This is because file maintenance tasks require people to spend time in updating or deleting multiple files that contain the same data whenever the data is modified. It also Increases the chance of errors. If a student changes his or her telephone numbers,

for example, the school must update the student contract file. If no change is made in all the files where the data stored, then inconsistencies among the files exist.

Introduction to Database Approach

Definition: Database, Database system

Database:

It is a collection of interrelated data.

These can be stored in the form of tables.

A database can be of any size and varying complexity.

A database may be generated and manipulated manually or

it may be computerized.

Example: Customer database consists the fields as cname, cno, and ccity

Purpose of Data base System

Reduced Data Redundancy – Most data or records are stored in only one file, which will greatly reduce duplicate data that might lead to confusion and mishandling.

Improved Data Integrity – When users modify data in the database, they can directly make changes to one file instead of multiple files. Therefore, the mismatch in different copies of same data will not occur. This database approach increases the quality and data’s integrity by reducing the possibility of causing inconsistencies.

Shared Data – The data in a database is shared among by multiple users who have access to the system. Organizations that use databases typically have security settings to define who can access, add, modify, and delete the data in a database.

Purpose of Data Base System

Easier Access – The database approach allows nontechnical users to access, maintain and even develop smaller database without professional assistance.

Reduced Development Time – It often is easier and faster to develop programs that use the database approach.

Views of Data

DATA ABSTRACTION Hide irrelevant data Provide an abstract view of the data. Developers hide irrelevant data from the user and provide them the relevant data. Based on this system will also work efficiently.

In DBMS, data abstraction is performed in layers which means there are levels of data abstraction

Views of Data

“Schema” and “Instance” are key ideas in a database management system (DBMS) that help organize and manage data. Instances An Instance is the state of an operational database with data at any given time. It contains a snapshot of the database. The instances can be changed by certain CRUD operations, such as like addition, and deletion of data. It may be noted that any search query will not make any kind of changes in the instances. Example: Let’s say a table teacher in our database whose name is School, suppose the table has 50 records so the instance of the database has 50 records for now and tomorrow we are going to add another fifty records so tomorrow the instance has a total of 100 records. This is called an instance

Views of Data

Example: Let’s say a table teacher in our database named school, the teacher table requires the name, dob, and doj in their table so we design a structure as: Teacher table name: String doj: date dob: date

DATA BASE SYSTEM ARCHITECTURE