Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Database Management System

Munawar, PhD

Session 01

Intro to DBMS

www.esaunggul.ac.id
Syllabus
Before Mid Exam After Mid Exam
1 Introduction to Database 8 More SQL Data Definition
2 Relational & Relational Algebra 9 SQL Select
3 Relational Model 10 More SQL Select
4 Entity Relationship Diagram (ERD) 11 Yet More SQL Select
5 Normalization to 3NF 12 Missing Information
6 BCNF Normalization to 5NF 13 Trigger
7 SQL Data Definition 14 Review & Case Study

www.esaunggul.ac.id
Assessment

• 50 % Group (2 students) Assignment


Designing database for real business
• 20 % Mid Test
• 30 % Final Test

www.esaunggul.ac.id
Group Assignment

o Analyze and design a DBMS for a real business


o Group can be 2 students (maximum)
o Assignment #1 will be marked 40%
o Assignment #2 will be marked 60%

www.esaunggul.ac.id
Assignment #1

o Assignment due – Mid Exam


o Describe your real case more detail in word. You can
use SRS (software requirement specification) to
support your description
o Complete your document with ERD till to 3rd Normal
Form

www.esaunggul.ac.id
Assignmet #2

o Assignment due – Final Exam


o Modify your assignment #1 based on your findings
after learning more in DBMS
o Complete your final assignment with the following
criteria:
– Description of your case study in detail
– ERD till 3rd Normal Form
– DDL, DML with at least 3 month of transactions and 10 raw of data
for data master
– Complete your sql file with store procedure, view and trigger to
generate report in order to show detail transactions based on
certain date (from – up to) and based on selected item(s)

www.esaunggul.ac.id
References

• ‘Database Systems: A practical approach to design,


implementation and management’ by Connolly and
Begg
• `A first course in database systems’ by Ullman and
Widom
• Other text book : ‘Database Systems’ by CJ Date

www.esaunggul.ac.id
Learning Outcome

o Student will be able to understand the


conceptual design of database
o Student will be able to describe the important
of good database design
o Student will be able to apply database design
for a real business

www.esaunggul.ac.id
Why Study Databases?

• Databases are useful o Databases in CS


– Many computing – Databases are a ‘core
applications deal with topic’ in computer
large amounts of science
information – Basic concepts and skills
– Database systems give with database systems
a set of tools for are part of the skill set
storing, searching and you will be assumed to
managing this have as a CS graduate
information

www.esaunggul.ac.id
What is a Database?

o “A set of information held in a computer”


Oxford English Dictionary
o “One or more large structured sets of
persistent data, usually associated with
software to update and query the data”
Free On-Line Dictionary of Computing
o “A collection of data arranged for ease and
speed of search and retrieval”
Dictionary.com

www.esaunggul.ac.id
Databases

o Web indexes o Train timetables


o Library catalogues o Airline bookings
o Medical records o Credit card details
o Bank accounts o Student records
o Stock control o Customer histories
o Personnel systems o Stock market prices
o Product catalogues o Discussion boards
o Telephone directories o and so on…

www.esaunggul.ac.id
Database Systems

A database system o Database systems


consists of allow users to
– Data (the database) – Store
– Software – Update
– Hardware – Retrieve
– Users – Organise
We focus mainly on the – Protect
software their data.

www.esaunggul.ac.id
Database Users

o End users o Database Administrator


– Use the database system to (DBA)
achieve some goal – Designs & manages the
o Application developers database system
– Write software to allow end o Database systems
users to interface with the programmer
database system – Writes the database
software itself

www.esaunggul.ac.id
Database Management Systems

• A database is a o Examples:
collection of – Oracle
information – DB2 (IBM)
• A database – MS SQL Server
management system – MS Access
(DBMS) is the – Ingres
software than controls – PostgreSQL
that information – MySQL

www.esaunggul.ac.id
What the DBMS does

• Provides users with o DBMS provides


– Data definition – Persistence
language (DDL) – Concurrency
– Data manipulation – Integrity
language (DML) – Security
– Data control language – Data independence
(DCL)
o Data Dictionary
• Often these are all
– Describes the database
the same language itself

www.esaunggul.ac.id
Data Dictionary - Metadata

• The dictionary or catalog o The dictionary holds


stores information about – Descriptions of database
the database itself objects (tables, users, rules,
views, indexes,…)
• This is data about data or
– Information about who is
‘metadata’ using which data (locks)
• Almost every aspect of – Schemas and mappings
the DBMS uses the
dictionary

www.esaunggul.ac.id
File Based Systems

o File based systems o Problems:


– Data is stored in files – No standards
– Each file has a specific – Data duplication
format – Data dependence
– Programs that use – No way to generate ad
these files depend on hoc queries
knowledge about that – No provision for
format security, recovery,
concurrency, etc.

www.esaunggul.ac.id
Relational Systems

o Problems with early o Then, in 1970,


databases E. F. Codd wrote “A
– Navigating the records Relational Model of
requires complex Data for Large
programs Shared Databanks”
– There is minimal data and introduced the
independence
relational model
– No theoretical
foundations

www.esaunggul.ac.id
Relational Systems

o Information is stored o The relational model


as tuples or records in covers 3 areas:
relations or tables o Data structure
o There is a sound o Data integrity
mathematical theory o Data manipulation
of relations o More details in the
o Most modern DBMS next lecture…
are based on the
relational model

www.esaunggul.ac.id
ANSI/SPARC Architecture

o ANSI - American A three-level architecture


National Standards – Internal level: For
Institute systems designers
o SPARC - Standards – Conceptual level: For
Planning and database designers and
Requirements administrators
Committee – External level: For
database users
o 1975 - proposed a
framework for DBs

www.esaunggul.ac.id
Internal Level

o Deals with physical Internal Schema


storage of data RECORD EMP
LENGTH=44
– Structure of records on
HEADER: BYTE(5)
disk - files, pages,
OFFSET=0
blocks
NAME: BYTE(25)
– Indexes and ordering OFFSET=5
of records SALARY: FULLWORD
– Used by database OFFSET=30
system programmers DEPT: BYTE(10)
OFFSET=34

www.esaunggul.ac.id
Conceptual Level

o Deals with the o Conceptual Schema


organisation of the data CREATE TABLE
as a whole Employee (
– Abstractions are used to Name
remove unnecessary details VARCHAR(25),
of the internal level Salary REAL,
– Used by DBAs and Dept_Name
application programmers
VARCHAR(10))

www.esaunggul.ac.id
External Level

o Provides a view of the o External Schemas


database tailored to a Payroll:
user String Name
– Parts of the data may double Salary
be hidden
– Data is presented in a Personnel:
useful form
char *Name
– Used by end users and
char *Department
application
programmers

www.esaunggul.ac.id
Mappings

• Mappings translate • Physical data


information from one independence
level to the next – Changes to internal
– External/Conceptual level shouldn’t affect
– Conceptual/Internal conceptual level

• These mappings • Logical data


provide data independence
independence – Conceptual level
changes shouldn’t
affect external levels

www.esaunggul.ac.id
ANSI/SPARC Architecture

User 1 User 2 User 3

External External
External Schemas
View 1 View 2

External/Conceptual Mappings
Conceptual DBA
Conceptual Schema View

Conceptual/Internal Mapping

Internal Schema Stored


Data

www.esaunggul.ac.id
This Lecture in Exams

Describe the three levels of the ANSI/SPARC model. You


should include information about what each level is for,
which users might be interested in which levels, and how the
levels relate to one another.

www.esaunggul.ac.id
Next Lecture
• The Relational Model
– Relational data structure
– Relational data integrity
– Relational data manipulation
• For more information
– Connolly and Begg chapters 3 and 4
– Ullman and Widom (2 ed.) Chapter 3.1, 5.1
– E.F. Codd’s paper

www.esaunggul.ac.id
Thank You…

www.esaunggul.ac.id

You might also like