Database Management System: CSMI14
Database Management System: CSMI14
Tuesday : 2 to 2.50 PM
Wednesday : 3 to 3.50 PM
Thursday : 2 to 2.50 PM
2
Course Plan – July 2020 Session
%
S. No. Mode of Assessment Week/Date Duration
Weightage
2nd week of October
1 Assessment I 1 hour 20
2020
4th week of October
2 Assessment II 1 hour 20
2020
Last week of September
3 Assignment - 10
2020
2nd week of November
4 Project - 20
2020
4th week of November
CPA Compensation Assessment* 1 hour 20
2020
As per academic
5 Final Assessment * 2 hours 30
schedule
3
Course Overview
Syllabus No. of Hours
Unit – I : Introduction: Purpose of Database System -– Views of data – Data Models – Database 8
Languages - Database System Architecture – components of DBMS –Entity–Relationship model (E-
R model ) – E-R Diagram notation, Examples.
Unit – II : Relational Model: Relational Data Model - Concept of relations, schema-instance 8
distinction, keys, integrity rules, relational algebra operators, SQL: data definition, data
manipulation, aggregate function, Null Values, nested sub queries, Joined relations. Work with
MySQL Workbench.
Unit – III : Database Design: Dependencies and Normal forms, dependency theory - functional 7
dependencies, Armstrong's axioms for FD's, closure of a set of FD's, minimal covers, definitions of
1NF, 2NF, 3NF and BCNF 4NF, and 5NF, decompositions and desirable properties of them.
Unit – IV : Transaction management: ACID properties, serializability and concurrency control, 7
Lock based concurrency control (2PL, Deadlocks), database recovery management.
Unit – V : Implementation Techniques: Overview of Physical Storage Media – Magnetic Disks – 8
RAID – Tertiary storage – Organization of Records in Files – Indexing and Hashing–Ordered
Indices - primary, secondary index structures –Static Hashing – Dynamic Hashing.
4
Text Books
• A. Silberschatz, Henry F. Korth, and S. Sudharshan, “Database System Concepts”, 5th Ed,
Tata McGraw Hill, 2006.
• C. J. Date, A. Kannan and S. Swamynathan, “An Introduction to Database Systems”, 8thed,
Pearson Education, 2006.
References Books
• RamezElmasri and Shamkant B. Navathe, “Fundamentals of Database Systems”, Fourth
Edition, Pearson/Addisionwesley, 2007
• Raghu Ramakrishnan, “Database Management Systems”, Third Edition, McGraw Hill, 2003
• S. K. Singh, “Database Systems Concepts, Design and Applications”, First Edition, Pearson
Education, 2006
5
Unit – I : Introduction – 8 Hours
6
• Database = Collection of data
• contains information that are common to most enterprises or also information that is
specific to the category of the enterprise
7
Database-management system (DBMS)
8
• online bookstore - accessing data stored in a database
• When you enter an order online - your order is stored in a database
• bank Web site - bank balance and transaction information is retrieved from the bank’s
database system.
• When you access a Web site, information about you may be retrieved from a database to
select which advertisements you should see.
9
Database-System Applications
• Enterprise Information
◦ Accounting: For payments, receipts, account balances, assets and other accounting
information.
◦ Human resources: For information about employees, salaries, payroll taxes, and for generation
of paychecks.
◦ Manufacturing: For management of the supply chain and for tracking production of items in
factories, inventories of items in warehouses and stores, and orders for items.
◦ Online retailers: For sales data noted above plus online order tracking, generation of
recommendation lists, and maintenance of online product evaluations.
10
• Banking and Finance
◦ Banking: For customer information, accounts, loans, and banking transactions.
◦ Credit card transactions: For purchases on credit cards and generation of monthly statements.
◦ Finance: For storing information about holdings, sales, and purchases; also for storing real-
time market data to enable online trading by customers and automated trading by the firm.
• Telecommunication: For keeping records of calls made, generating monthly bills, maintaining
balances on prepaid calling cards, and storing information about the communication networks.
11
Purpose of Database System
• Earlier days: kept the information on a computer by storing it in operating system files.
• File-processing system:
• System stores permanent records in various files
• Needs different application programs to extract records from, and add records to, the
appropriate files.
• It is supported by a conventional operating system.
12
• System has a number of application programs that allow users to manipulate the
information:
13
Disadvantages of file-processing system
• Data redundancy and inconsistency
• Difficulty in accessing data
• Data isolation
• Integrity problems
• Atomicity problems
• Concurrent-access anomalies
• Security problems
14
1. Data redundancy and inconsistency
• Different programmers create the files and application programs over a long period
• Ex: if a student has a double major, the address and telephone number of that student appear
in both department files
• This redundancy leads to higher storage and access cost.
• Data inconsistency : Various copies of the same data may no longer agree.
• Ex: student changes address - reflected in one department records but not elsewhere.
15
2. Difficulty in accessing data
• Need to find out the names of all students who live within a particular postal-code area.
• Either obtain the list of all students and extract the needed information manually
• Needs to trim that list to include only those students who have taken at least 60 credit hours.
16
3. Data isolation & Integrity problems
• Data isolation: Data are scattered in various files in different formats, writing new application
programs to retrieve the appropriate data is difficult.
• Integrity problems: Data values stored in the database must satisfy certain types of
consistency constraints.
• University maintains an account for each department, and records the balance amount.
• Requirement : Account balance of a department may never fall below zero.
• Enforce these constraints by adding appropriate code in the various application programs.
• Gets complicated :
• when new constraints are added
• when constraints involve several data items from different files.
17
4. Atomicity problems
• A computer system, like any other device, is subject to failure.
• In many applications, it is crucial that, if a failure occurs, the data be restored to the
consistent state that existed prior to the failure.
• Consider a program to transfer $500 from the account A to account B.
• If a system failure occurs during the program execution, results in inconsistent database state
• It is possible that the $500 was removed from the balance of account A
• But was not credited to the balance of account A
• It is essential to database consistency that either both the credit and debit occur, or that
neither occur : the funds transfer must be atomic—it must happen in its entirety or not at all.
• It is difficult to ensure atomicity in a conventional file-processing system.
18
5. Concurrent-access anomalies
• For the sake of overall performance of the system and faster response, many systems allow
multiple users to update the data simultaneously and may result in inconsistent data.
• Ex: account with a balance of $10,000. Two people debit at the same time $500 and $100.
• Suppose that the programs executing on behalf of each withdrawal read the old balance,
reduce that value by the amount being withdrawn, and write the result back.
• They may both read the value $10,000, and write back $9500 and $9900, respectively.
• Account balance may contain either $9500 or $9900, rather than the correct value of $9400.
• Solution : System must maintain some form of supervision.
• But supervision is difficult to provide because data may be accessed by many different
application programs that have not been coordinated previously.
19
6. Security problems
• Not every user of the database system should be able to access all the data.
• For example, in a university, payroll personnel need to see only that part of the database
that has financial information.
• They do not need access to information about academic records.
• But, since application programs are added to the file-processing system in an ad hoc
manner, enforcing such security constraints is difficult.
20
Companies DBMS
Oracle MySQL
IBM DB2
Microsoft MSSQL
• Machine learning
• Neural Networks
• Big Data Analytics
• Artificial Intelligence
• Computer Vision
• Internet of Things
• Hacking
• Block chain
• Cloud computing
• Natural Language Processing
• Deep learning
21
• Assignment Topic (10 marks)
Learn/Predict
• What is the need for you to study DBMS?
DBMS
• Are there any standard DBMS available? Discuss on it.
22
1. Project : Download MySQL workbench and explore it
2. Grading - No prerequisite subjects
3. Book download – Prefer book
23
Thank You
24