CS220: Database Systems
Spring 2024
BSDS-1A
Credit Hours: 3+1
Lecture Outline
• Introduction
• Of the class
• Teaching team
• Overview
• Difference between File-based and Database Approach
• Data vs Information
• Information System
• Overview of DBMS
• Database Design
• Types of Databases
2
Course Learning Outcome
Course Learning Outcomes (CLOs):
PLO BT Level*
1. Understand key terms and concepts related to databases, including entities,
1 C-2
attributes, relationships, and normalization.
2. Formulate a given real-world problem by applying appropriate logical
3 C-6
design methods and tools for databases.
3. Investigate and resolve issues related to transaction management,
4 P-3
including identifying and addressing conflicts and inconsistencies in data.
4. Develop a database schema from database requirements. 5 P-3
* BT= Bloom’s Taxonomy, C=Cognitive domain, P=Psychomotor domain, A= Affective domain
Recommended Text/ Reference Books
• Fundamentals of Database Systems,
• By Elmasri & Navathe
• Database System Concepts
• By Abraham Silbershatz, Henery F. Korth, Sudarshan
• Database Systems: Design, Implementation, & Management
• Carlos Coronel/Steven Morris, 13th Edition, ISBN: 9780357687536
4
Lecture Resources & Class Policy
• LMS:
• Course Outline (Will explain structure of the
course and project details soon later)
• Lecture
• Assignment
• Labs/Lab Submission
• CMS:
• Attendance (75% is the minimum requirement to appear in ESE)
• Grading
5
Tentative Grading Criteria
• Lecture (3 Credit Hrs./Week-75%)
• Quizzes: 12%
• Assignments: 10%
• Final Report: 8%
• MSE: 30%
• ESE: 40%
• Lab (3 Hrs./Week-25%)
• In-Lab Work: 70%
• Group Project: 30%
Zero tolerance for plagiarism
6
Course Contents
• Basic Database Concepts
• Relational Data Model
• Relational Algebra
• Structured Query Language (SQL)
• Database Design Theory
• Entity-Relationship Model (ER-Model)
• Relational Database Management Systems (RDBMS)
7
Course Contents (Cont…)
• Functional Dependencies
• Normalization (Normal Forms)
• Transactional Possessing Concepts
• Query Processing and Optimization
• Distributed Databases Management System
• Data Warehousing and Business Intelligence
• Big Data and NoSQL
8
Class Rules (1/2)
• No verbal consultations during the class
• No personal comments
• Do not disturb the class
• If something is not clear, do tell!!
• If you have question, do not hesitate.
• Read the course outline(Uploaded on LMS)
• Course Contents
• Available on LMS
• Will contain limited information only, so
better to consult online and secondary
resources as well.
Class Rules (2/2)
• Plagiarism and Academic Dishonesty are strictly prohibited
• No submission via email
• Late Day Policy
• Total late days: 5
• Can be used for assignments, final report, and project only
• No consolidation among group members
• No swapping/sharing
• Use self tracking during the course
• Final count will be done at the end of the course (by me)
• No penalty for consuming a late day
• Each day consumed beyond the allocated late days -> -2% from overall score
in assignments, Final report, and project; until all reach 0.
Contact
• Fahad.satti@seecs.edu.pk
• Consulting Hours:
• Tuesday (3pm-5pm) or by appointment
Lecture 1
Introduction to Databases and Database Management Systems
12
Top Database Resources
Database Conferences:
1) VLDB 2) KDD 3) ICDE 4) ICDM 5) DASFAA 6) SIGMOD
Research Labs:
1) IBM Almaden Research Lab, 2) AT&T Research Labs, 3) Microsoft
Research Lab, 4) Lucent Technologies.
Database Products:
1) Oracle, 2) IBM DB2, 3) MySQL, 4) Sybase, 5) MS SQL Server, 6) Informix.
13
Database Professionals
• Database implementers
• Build modules that go inside the DBMS
• Database application developers
• Build application that run on top of the DBMS, and are used by end-users to
interact with their data.
• Database Administrators
• Create database schema
• Maintain and tune the DBMS engine
• Maintain and tune the data in the DBMS
• Corporations need them
14
Overview
• Data: Known facts that can be recorded
• Database: Collection of Integrated data
• Typically models a real-world “enterprise”
• DBMS: A software system designed to store, manage, and facilitate
access to databases.
15
Files and Databases – background (1/5)
• Files: A collection of records or documents dealing with one
organization, person, area, or subject. It could either be:
• Computer files
• Manual files (Paper)
• Database: A collection of similar records with relationships
between records.
• Statistical, Business Data
• Difference ???
16
Database (2/5)
• A database is collection of stored operational data used by
application systems of some particular enterprise (C.J. Date)
• Paper Database
• Still contain a large portion of world's knowledge
• File Processing Systems
• Early batch processing of business data
• Database Management Systems (DBMS)
• Will cover in detail
17
File Processing Systems (3/5)
• Collection of application programs that performs services for the
end-users (e.g. Reports)
• Each program defines and maintains its own data
18
File Processing Systems (4/5)
19
File Processing Systems (5/5)
20
Data vs. Information (1/5)
• Data: ?
• Information: ?
• Discuss using Examples !!
21
Data vs. Information (1/5)
• Data: Raw facts/Un-processed information
• But they are building blocks for information
• Information: Data processed to reveal its meaning
• Information is meaningful
• In today’s world, accurate, relevant and timely information is the key to good
decision making
• Good decision making is key to survival in today’s competitive and global
environment
22
Transforming raw data into information (2/5)
23
Transforming raw data into information (3/5)
24
Transforming raw data into information (4/5)
25
Transforming raw data into information (5/5)
26
What is a System (1/5)
A system is a group of elements that are integrated with the
common purpose of achieving objectives
27
Need for information (2/5)
• Businesses require decisions
• Decisions require information
• Nature of information varies with the nature of business and decision
• Planning for business requires information at regular interval
28
What is an information system (IS) (3/5)
• Interrelated components working together to collect, process, store
and disseminate information
• Every information does not go to every body
• ERP, DSS, MIS, OLTP, OLAP
29
Artifacts for IS (4/5)
Web & GUI
Designing/ Modeling
Coding/ Programming
SQL Programming
Database (Data Storage)
30
Attributes of IS (5/5)
• Easy Availability
• Timelines
• Relevant to decision at hand
• Related to current business needs
31
Database Management System (DBMS) (1/6)
Database: Collection of interrelated data
DBMS- Software to access the data
DBMS contains information about a particular enterprise
DBMS provides an environment that is both convenient and
efficient to use.
Database Applications:
Banking: all transactions
Airlines: reservations, schedules
Universities: registration, grades
Sales: customers, products, purchases
Manufacturing: production, inventory, orders, supply chain
Human resources: employee records, salaries, tax deductions
Databases touch all aspects of our lives
32
DBMS (2/6)
DBMS is a software package that enables user to create and maintain
databases. It facilitates:
• Defining a database that involves specifying the data
types, structures, and constraints for the data to be
stored in the database.
• Constructing a database which is the process of storing
the data.
• Manipulating a database such as functions of querying
and sharing the database objects, updating the database,
and generating reports from the data.
• Database and DBMS software together constitute a database system.
33
DBMS – MS SQL Server
34
DBMS – MySQL
35
DBMS – Oracle
36
DBMS (3/6)
• DBMS serves as the intermediary between the user and the database
• The database structure itself is stored as a collection of files, and the only way
to access the data in those files is through the DBMS
37
DBMS (4/6)
• DBMS receives all application requests and translates them into the complex
operations required to fulfill those requests
• DBMS hides much of the database’s internal complexity from the application
programs and users.
38
Advantages of DBMS (5/6)
• Improved data sharing
• Improved data security
• Better data integration.
• Minimized data inconsistency
• Improved data access
• Improved decision making
• Increased end-user productivity
39
Examples DBMS (6/6)
• Oracle
• IBM DB2
• Ingress
• Teradata
• MS SQL Server
• MS Access
• MySQL
40
Database Design (1/6)
• Refers to the activities that focus on the design of the database
structure that will be used to store and manage end-user data
• A database that meets all user requirements does not just happen;
its structure must be designed carefully.
• Even a good DBMS will perform poorly with a badly designed
database.
41
Database Design (2/6)
The process of designing the general structure of the database:
• Logical Design – Deciding on the database schema. Database design
requires that we find a “good” collection of relation schemas.
• Business decision – What attributes should we record in the database?
• Computer Science decision – What relation schemas should we have and
how should the attributes be distributed among the various relation
schemas?
• Physical Design – Deciding on the physical layout of the database
42
Database Design – an example (3/6)
• Consider the data shown below which illustrates the efforts of an
organization to keep records about its employees and their skills.
43
Bad Database Design example (4/6)
• Difficult to produce an alphabetical listing of employees based on
their last names
• How to efficiently count how many possess which skill-set
• Issue due to Skill 1 and Skill 2
• Different names for same skill
• Basic Database Manipulation <> Basic DB Manipulation
• How to add more columns, if an employee acquires another skill
44
Better Database Design (5/6)
45
Database design – another example (6/6)
• Data Redundancy & Design
46
Components of database system
• A database is partitioned into small modules that deal with each of
the responsibilities of overall system.
• The functional components of a database can be broadly divided
into:
• Storage manager
• Query processor
47
Why Storage Manager?
• Database typically require a large amount of storage space.
• Corporate databases ranges in size from hundreds of gigabytes to, for
the largest databases, terabytes of data.
• Since main memory can’t store this much data and is therefore
stored on disks.
48
Why Storage Manager?
• Data moved between disk and main memory as needed.
• Since the movement of data to and from disk is slow relative to the
speed of the CPU.
• It is imperative that database system structure the data so as to
minimize the need to move the data between disk and main
memory.
49
Why Query Processor?
• One of the objective of DBMS is to simplify and facilitate access to
data.
• High level views help to achieve this.
• Users of the system are not burdened unnecessarily with the physical
details of the implementation of the system.
50
Why Query Processor?
• Quick processing of updates and queries is important.
• DBMS is responsible to translate a logical level queries into an
efficient sequence of operations at high level.
51
The Need
52
Types of DBs: NoSQL, Cloud
• SQL DB are structured DBs (DBMS)
• NoSQL database is
• a next-generation DB
• used for big data, mainly retrieval purpose
• horizontally scalable
• Apache Cassandra, Apatchi HBase, Google Bigtable and MongoDB
• Graph, Document, Key-value and Column Database are also known as
NoSQL
• Cloud DBs MS Azure & Amazon AWS
53
Architectures
SQL Databases NoSQL Databases
Relational Column Family Key-Value
Key Value
Key Value
Key Value
Key Value
Analytical (OLAP)
Graph
Document
54
Thank you