SlideShare a Scribd company logo
1
Introduction
DATABASE SYSTEM
putu.sundika@gmail.com

References : Database System Concepts (Abraham Silberschatz, Henry F. Korth, S. Sudarshan)
Database-System Applications
Enterprise Information
• Sales: For customer, product, and purchase information.
• Accounting: For payments, receipts, account balances, assets and other accounting
  information.
• Human resources: For information about employees, salaries, payroll taxes, and benefits, and
  for generation of paychecks.
• Manufacturing: For management of the supply chain and for tracking pro-duction 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



                                                                                                 3
Database-System Applications
Banking and Finance
• Banking: customer information, accounts, loans, and banking transactions.
• Finance: For storing information about holdings, sales, and purchases of financial instruments
  such as stocks and bonds; also for storing real-time market data to enable online trading by
  customers and automated trading by the firm.
Universities: For student information, course registrations, and grades (inaddition to standard
enterprise information such as human resources and accounting)
Airlines: For reservations and schedule first to use databases in a geographica
Telecommunication: For keeping recordbills, maintaining balances on prepaid about the
communication networks.
Telecommunications: For keeping records of calls made, generating monthly bills, maintaining
balances on prepaid calling cards, and storing information about the communication networks

                                                                                                   4
Database on almost everyone’s life today




    PAST
    few direct
                     TODAY
                     most contact
    contact to DB    directly

                                           5
Database (past)
               • Add new students, instructors, and courses
               • Register students for courses and generate class rosters
               • Assign grades to students, compute grade point averages (GPA), and
                 generate transcripts
               • Create a new major
               • etc

  1960’s
Universities


                                                                                6
Disadvantages of File-Processing System
• Data redundancy and inconsistency
• Difficulty in accessing data
• Data isolation
• Integrity problems
• Atomicity problems
• Concurrent-access anomalies
• Security problems




                                           7
Data redundancy and inconsistency
Different programmers  different files and application different structures and the programs
in several programming languages  the same information may be duplicated in several places
(files).
For example : A student has a double major (music and mathematics). The address and
telephone number of that student may appear in a file that consists of student records of
students in the Music department and in a file that consists of student records of students in the
Mathematics department.
 This redundancy leads to higher storage and access cost.
 It may lead to data inconsistency  a changed student address may be reflected in the Music
  department records but not elsewhere in the system.




                                                                                                     8
Difficulty in accessing data
“Find out the names of all students who live within a particular postal-code area “
Because no application program on hand to meet it, then :
1.   either obtain the list of all students and extract the needed information manually or
2.   ask a programmer to write the necessary application program.




                                                                                             9
Data isolation
Because data are scattered in various files, and files may be in different formats, writing new
application programs to retrieve the appropriate data is difficult




                                                                                                  10
Integrity problems
The data values stored in the database must satisfy certain types of consistency constraints.
Suppose the university maintains an account for each department, and records the balance
amount in each account. Suppose also that the university requires that the account balance of a
department may never fall below zero. Developers enforce these constraints in the system by
adding appropriate code in the various application pro-grams. However, when new constraints
are added, it is difficult to change the programs to enforce them. The problem is compounded
when constraints involve several data items from different files.




                                                                                                  11
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 balance of department A to the account
balance of department B. If a system failure occurs during the execution of the program, it is
possible that the $500 was removed from the balance of department A but was not credited to
the balance of department B, resulting in an inconsistent database state. Clearly, it is essential to
database consistency that either both the credit and debit occur, or that neither occur.
That is, 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.




                                                                                                       12
Concurrent-access anomalies
Interaction of concurrent updates is possible and may result in inconsistent data.
Example : department A, with an account balance of $10,000. If two department clerks debit the
account balance (by say $500 and $100, respectively) of department A at almost exactly the
same time, the result of the concurrent executions may leave the budget in an incorrect (or
inconsistent) state.
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. If the two programs run
concurrently, they may both read the value $10,000, and write back $9500 and $9900,
respectively. Depending on which one writes the value last, the account balance of department A
may contain either $9500 or $9900, rather than the correct value of $9400.




                                                                                              13
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.




                                                                                                  14
View of Data
A major purpose of a database system is to provide users with an abstract view of the data.
That is, the system hides certain details of how the data are stored and maintained.




                                 Level of Data Abstractions

                                                                                              15
Level Data of Abstraction
type instructor=record
         ID:char(5);
         name:char(20);
         deptname:char(20);
         salary:numeric(8,2);
end;
another examples :
• Department  deptname:type, building:type, budget:type
• Course  coursed:type, title:type, deptname:type, credits:type
• Student  id:type,name:type,deptname:type, totcred:type




                                                                   16
Database Language
• Data-Definition Language (DDL)  to specify the database schema
• Data-Manipulation Language (DML)  is a language that enables users to access or
  manipulate data as organized by the appropriate data model
In practice, the data-definition and data-manipulation languages are not two separate
languages; instead they simply form parts of a single database language, such as the widely used
SQL language
Data Models : a collection of conceptual tools for describing data, data relationships, data
semantics, and consistency constraints. A data model provides a way to describe the design of a
database at the physical, logical, and view levels.
Database Schema : overall design of the database  variable declarations




                                                                                                  17
Data-Manipulation Language (DML)
• Retrieval of information stored in the database
• Insertion of new information into the database
• Deletion of information from the database
• Modification of information stored in the database


 Procedural DMLs require a user to specify what data are needed and how to get those data.
 Declarative DMLs (also referred to as non procedural DMLs) require a user to specify what
  data are needed without specifying how to get those data.




                                                                                              18
Data-Definition Language (DDL)
 Data Storage and Definition language  database schema
Data stored in database must satisfy certain consistency constraint , ex: minus is disallowed for grade,
birth of date must less than 2000 etc


 Domain Constraints  possible values  integer types, character types, date/time types
 Referential Integrity  ensure that a value that appears in one relation
 Assertions  validation  database (domain dan referential integrity  special form of assertion)
 Authorization  read authorization, which allows reading, but not modification, of data. Insert
  authorization, which allows insertion of new data, but not modification of existing data. Update
  authorization, which allows modification, but not deletion, of data; and delete authorization,
  which allows deletion of data.




                                                                                                           19
Sample of Relational Databases




                                 20
SQL




      21
TUGAS KELOMPOK
 Rangkum materi hari ini dengan menggunakan kalimat sendiri
 (untuk setiap kelompok) Buatlah tabel-tabel yang menurut Anda kemungkinan digunakan pada :
   1.    Facebook
   2.    Google Plus
   3.    Gmail
   4.    Yahoo Mail
   5.    Blogspot.com
   6.    Wordpress.com
   7.    Google Earth
   8.    Google Drive
   9.    DropBox
   10.   Youtube.com
   11.   Kaskus.com




                                                                                               22

More Related Content

What's hot

Data base management systems ppt
Data base management systems pptData base management systems ppt
Data base management systems ppt
suthi
 
Database Basics Theory
Database Basics TheoryDatabase Basics Theory
Database Basics Theory
sunmitraeducation
 
Database Project Airport management System
Database Project Airport management SystemDatabase Project Airport management System
Database Project Airport management System
Fahad Chishti
 
Dbms Lecture Notes
Dbms Lecture NotesDbms Lecture Notes
Dbms Lecture Notes
dM Technologies
 
Introduction to database & sql
Introduction to database & sqlIntroduction to database & sql
Introduction to database & sql
zahid6
 
Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)
Naman Joshi
 
Database Concepts and Components
Database Concepts and ComponentsDatabase Concepts and Components
Database Concepts and Components
RIAH ENCARNACION
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
Free Open Source Software Technology Lab
 
DBMS Practical File
DBMS Practical FileDBMS Practical File
DBMS Practical File
Dushmanta Nath
 
Mi0034 –database management systems
Mi0034 –database management systemsMi0034 –database management systems
Mi0034 –database management systemssmumbahelp
 
Bank mangement system
Bank mangement systemBank mangement system
Bank mangement system
FaisalGhffar
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
Archit Saxena
 
Oracle
OracleOracle
Oracle
argusacademy
 
RDMS AND SQL
RDMS AND SQLRDMS AND SQL
RDMS AND SQL
milanmehta7
 
Introduction To DBMS
Introduction To DBMSIntroduction To DBMS
Introduction To DBMS
rafat_mentor
 
Database Lecture Notes
Database Lecture NotesDatabase Lecture Notes
Database Lecture Notes
FellowBuddy.com
 

What's hot (20)

Data base management systems ppt
Data base management systems pptData base management systems ppt
Data base management systems ppt
 
Database Basics Theory
Database Basics TheoryDatabase Basics Theory
Database Basics Theory
 
Database Project Airport management System
Database Project Airport management SystemDatabase Project Airport management System
Database Project Airport management System
 
D B M S Animate
D B M S AnimateD B M S Animate
D B M S Animate
 
Dbms Lecture Notes
Dbms Lecture NotesDbms Lecture Notes
Dbms Lecture Notes
 
Introduction to database & sql
Introduction to database & sqlIntroduction to database & sql
Introduction to database & sql
 
Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)
 
Database Concepts and Components
Database Concepts and ComponentsDatabase Concepts and Components
Database Concepts and Components
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
 
Dbms
DbmsDbms
Dbms
 
DBMS Practical File
DBMS Practical FileDBMS Practical File
DBMS Practical File
 
Mi0034 –database management systems
Mi0034 –database management systemsMi0034 –database management systems
Mi0034 –database management systems
 
Bank mangement system
Bank mangement systemBank mangement system
Bank mangement system
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Oracle
OracleOracle
Oracle
 
RDMS AND SQL
RDMS AND SQLRDMS AND SQL
RDMS AND SQL
 
Introduction To DBMS
Introduction To DBMSIntroduction To DBMS
Introduction To DBMS
 
Database Lecture Notes
Database Lecture NotesDatabase Lecture Notes
Database Lecture Notes
 
Chapter2
Chapter2Chapter2
Chapter2
 
Unit 02 dbms
Unit 02 dbmsUnit 02 dbms
Unit 02 dbms
 

Viewers also liked

Introduction to the relational model
Introduction to the relational modelIntroduction to the relational model
Introduction to the relational model
Putu Sundika
 
Bourne preview day2012-ppt (1)
Bourne preview day2012-ppt (1)Bourne preview day2012-ppt (1)
Bourne preview day2012-ppt (1)drumdon
 
ユーザーリサーチを用いた デザインコンセプト創造に関する研究 デザインジャンプ法(DJ 法)の提案
ユーザーリサーチを用いた デザインコンセプト創造に関する研究 デザインジャンプ法(DJ 法)の提案 ユーザーリサーチを用いた デザインコンセプト創造に関する研究 デザインジャンプ法(DJ 法)の提案
ユーザーリサーチを用いた デザインコンセプト創造に関する研究 デザインジャンプ法(DJ 法)の提案
Yuhei Hirose
 
«Создаем интернет-магазин – что, где, как и почем?»
 «Создаем интернет-магазин – что, где, как и почем?» «Создаем интернет-магазин – что, где, как и почем?»
«Создаем интернет-магазин – что, где, как и почем?»
NetCat
 
неРЕЗЮМЕ
неРЕЗЮМЕнеРЕЗЮМЕ
неРЕЗЮМЕ
k_anastasia
 
Colombo Performance Test Meetup - 2016 April
Colombo Performance Test Meetup - 2016 AprilColombo Performance Test Meetup - 2016 April
Colombo Performance Test Meetup - 2016 April
nmadusanka
 
Title here
Title hereTitle here
Title here
iasf
 
Michelle's Portfolio
Michelle's PortfolioMichelle's Portfolio
Michelle's Portfoliomich811
 
Как продать родину?
Как продать родину? Как продать родину?
Как продать родину?
NetCat
 
Title here
Title hereTitle here
Title here
iasf
 
Tai lieutonghop.com --xay-dung_phan_mem_quan_ly_tuyen_sinh_dai_hoc_tai_chuc
Tai lieutonghop.com --xay-dung_phan_mem_quan_ly_tuyen_sinh_dai_hoc_tai_chucTai lieutonghop.com --xay-dung_phan_mem_quan_ly_tuyen_sinh_dai_hoc_tai_chuc
Tai lieutonghop.com --xay-dung_phan_mem_quan_ly_tuyen_sinh_dai_hoc_tai_chucconankiz
 
неРЕЗЮМЕ
неРЕЗЮМЕнеРЕЗЮМЕ
неРЕЗЮМЕ
k_anastasia
 
Enterprise 20/20 Volume 1
Enterprise 20/20 Volume 1Enterprise 20/20 Volume 1
Enterprise 20/20 Volume 1
Nicole Walker
 
Presentazione freeman team
Presentazione freeman teamPresentazione freeman team
Presentazione freeman team
MARKETERs club
 
OneR vs Naive Bayes vs Decision Tree
OneR vs Naive Bayes vs Decision TreeOneR vs Naive Bayes vs Decision Tree
OneR vs Naive Bayes vs Decision Tree
Putu Sundika
 
Klasterisasi Menggunakan k-Means
Klasterisasi Menggunakan k-MeansKlasterisasi Menggunakan k-Means
Klasterisasi Menggunakan k-Means
Putu Sundika
 
Developing Sustainable Conservation Finance Strategies for Coral Reef Restora...
Developing Sustainable Conservation Finance Strategies for Coral Reef Restora...Developing Sustainable Conservation Finance Strategies for Coral Reef Restora...
Developing Sustainable Conservation Finance Strategies for Coral Reef Restora...bwhowell1
 
C45 sample case
C45 sample caseC45 sample case
C45 sample case
Putu Sundika
 

Viewers also liked (20)

Introduction to the relational model
Introduction to the relational modelIntroduction to the relational model
Introduction to the relational model
 
Bourne preview day2012-ppt (1)
Bourne preview day2012-ppt (1)Bourne preview day2012-ppt (1)
Bourne preview day2012-ppt (1)
 
ユーザーリサーチを用いた デザインコンセプト創造に関する研究 デザインジャンプ法(DJ 法)の提案
ユーザーリサーチを用いた デザインコンセプト創造に関する研究 デザインジャンプ法(DJ 法)の提案 ユーザーリサーチを用いた デザインコンセプト創造に関する研究 デザインジャンプ法(DJ 法)の提案
ユーザーリサーチを用いた デザインコンセプト創造に関する研究 デザインジャンプ法(DJ 法)の提案
 
«Создаем интернет-магазин – что, где, как и почем?»
 «Создаем интернет-магазин – что, где, как и почем?» «Создаем интернет-магазин – что, где, как и почем?»
«Создаем интернет-магазин – что, где, как и почем?»
 
неРЕЗЮМЕ
неРЕЗЮМЕнеРЕЗЮМЕ
неРЕЗЮМЕ
 
Colombo Performance Test Meetup - 2016 April
Colombo Performance Test Meetup - 2016 AprilColombo Performance Test Meetup - 2016 April
Colombo Performance Test Meetup - 2016 April
 
Title here
Title hereTitle here
Title here
 
Michelle's Portfolio
Michelle's PortfolioMichelle's Portfolio
Michelle's Portfolio
 
Как продать родину?
Как продать родину? Как продать родину?
Как продать родину?
 
лекция нтс 1
лекция нтс 1лекция нтс 1
лекция нтс 1
 
презентациядцп 1
презентациядцп 1презентациядцп 1
презентациядцп 1
 
Title here
Title hereTitle here
Title here
 
Tai lieutonghop.com --xay-dung_phan_mem_quan_ly_tuyen_sinh_dai_hoc_tai_chuc
Tai lieutonghop.com --xay-dung_phan_mem_quan_ly_tuyen_sinh_dai_hoc_tai_chucTai lieutonghop.com --xay-dung_phan_mem_quan_ly_tuyen_sinh_dai_hoc_tai_chuc
Tai lieutonghop.com --xay-dung_phan_mem_quan_ly_tuyen_sinh_dai_hoc_tai_chuc
 
неРЕЗЮМЕ
неРЕЗЮМЕнеРЕЗЮМЕ
неРЕЗЮМЕ
 
Enterprise 20/20 Volume 1
Enterprise 20/20 Volume 1Enterprise 20/20 Volume 1
Enterprise 20/20 Volume 1
 
Presentazione freeman team
Presentazione freeman teamPresentazione freeman team
Presentazione freeman team
 
OneR vs Naive Bayes vs Decision Tree
OneR vs Naive Bayes vs Decision TreeOneR vs Naive Bayes vs Decision Tree
OneR vs Naive Bayes vs Decision Tree
 
Klasterisasi Menggunakan k-Means
Klasterisasi Menggunakan k-MeansKlasterisasi Menggunakan k-Means
Klasterisasi Menggunakan k-Means
 
Developing Sustainable Conservation Finance Strategies for Coral Reef Restora...
Developing Sustainable Conservation Finance Strategies for Coral Reef Restora...Developing Sustainable Conservation Finance Strategies for Coral Reef Restora...
Developing Sustainable Conservation Finance Strategies for Coral Reef Restora...
 
C45 sample case
C45 sample caseC45 sample case
C45 sample case
 

Similar to Introduction to Database system

Unit 2 DATABASE ESSENTIALS.pptx
Unit 2 DATABASE ESSENTIALS.pptxUnit 2 DATABASE ESSENTIALS.pptx
Unit 2 DATABASE ESSENTIALS.pptx
Nirmalavenkatachalam
 
Unit3rd
Unit3rdUnit3rd
dbms Unit 1.pdf arey bhai teri maa chodunga
dbms Unit 1.pdf arey bhai teri maa chodungadbms Unit 1.pdf arey bhai teri maa chodunga
dbms Unit 1.pdf arey bhai teri maa chodunga
VaradKadtan1
 
PURPOSE OF DATABASE final.pptx
PURPOSE OF DATABASE final.pptxPURPOSE OF DATABASE final.pptx
PURPOSE OF DATABASE final.pptx
Anusha sivakumar
 
Lecture 1&2(rdbms-ii)
Lecture 1&2(rdbms-ii)Lecture 1&2(rdbms-ii)
Lecture 1&2(rdbms-ii)
Ravinder Kamboj
 
Chapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdfChapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdf
TamiratDejene1
 
Chapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdfChapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdf
TamiratDejene1
 
Chapter 1. Itroduction To DBMS -.pptx
Chapter 1. Itroduction To DBMS -.pptxChapter 1. Itroduction To DBMS -.pptx
Chapter 1. Itroduction To DBMS -.pptx
santosh96234
 
Unit1 dbms
Unit1 dbmsUnit1 dbms
Unit1 dbms
gowrivageesan87
 
Introduction to Databases and Transactions
Introduction to Databases and TransactionsIntroduction to Databases and Transactions
Introduction to Databases and Transactions
نبيله نواز
 
Database & Database Users
Database & Database UsersDatabase & Database Users
Database & Database Users
M.Zalmai Rahmani
 
Databaselpu
DatabaselpuDatabaselpu
Databaselpu
Upender Singh Loyal
 
DBMS-1.pptx
DBMS-1.pptxDBMS-1.pptx
DBMS-1.pptx
kingVox
 
Intro.pptx
Intro.pptxIntro.pptx
Intro.pptx
NithyasriA2
 
INTRODUCTION TO DATABASE
INTRODUCTION TO DATABASEINTRODUCTION TO DATABASE
INTRODUCTION TO DATABASE
CS_GDRCST
 
Information Management
Information ManagementInformation Management
Information Management
EllenGracePorras
 
DBS Theory Week 1 including relationships and relational database
DBS Theory Week 1 including relationships and relational databaseDBS Theory Week 1 including relationships and relational database
DBS Theory Week 1 including relationships and relational database
walaahuluu
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
Dr. Mazin Mohamed alkathiri
 
dbms ppt.pptx database management system
dbms ppt.pptx database management systemdbms ppt.pptx database management system
dbms ppt.pptx database management system
deeptipal230
 
Unit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 CompleteUnit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 Complete
Raj vardhan
 

Similar to Introduction to Database system (20)

Unit 2 DATABASE ESSENTIALS.pptx
Unit 2 DATABASE ESSENTIALS.pptxUnit 2 DATABASE ESSENTIALS.pptx
Unit 2 DATABASE ESSENTIALS.pptx
 
Unit3rd
Unit3rdUnit3rd
Unit3rd
 
dbms Unit 1.pdf arey bhai teri maa chodunga
dbms Unit 1.pdf arey bhai teri maa chodungadbms Unit 1.pdf arey bhai teri maa chodunga
dbms Unit 1.pdf arey bhai teri maa chodunga
 
PURPOSE OF DATABASE final.pptx
PURPOSE OF DATABASE final.pptxPURPOSE OF DATABASE final.pptx
PURPOSE OF DATABASE final.pptx
 
Lecture 1&2(rdbms-ii)
Lecture 1&2(rdbms-ii)Lecture 1&2(rdbms-ii)
Lecture 1&2(rdbms-ii)
 
Chapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdfChapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdf
 
Chapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdfChapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdf
 
Chapter 1. Itroduction To DBMS -.pptx
Chapter 1. Itroduction To DBMS -.pptxChapter 1. Itroduction To DBMS -.pptx
Chapter 1. Itroduction To DBMS -.pptx
 
Unit1 dbms
Unit1 dbmsUnit1 dbms
Unit1 dbms
 
Introduction to Databases and Transactions
Introduction to Databases and TransactionsIntroduction to Databases and Transactions
Introduction to Databases and Transactions
 
Database & Database Users
Database & Database UsersDatabase & Database Users
Database & Database Users
 
Databaselpu
DatabaselpuDatabaselpu
Databaselpu
 
DBMS-1.pptx
DBMS-1.pptxDBMS-1.pptx
DBMS-1.pptx
 
Intro.pptx
Intro.pptxIntro.pptx
Intro.pptx
 
INTRODUCTION TO DATABASE
INTRODUCTION TO DATABASEINTRODUCTION TO DATABASE
INTRODUCTION TO DATABASE
 
Information Management
Information ManagementInformation Management
Information Management
 
DBS Theory Week 1 including relationships and relational database
DBS Theory Week 1 including relationships and relational databaseDBS Theory Week 1 including relationships and relational database
DBS Theory Week 1 including relationships and relational database
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
dbms ppt.pptx database management system
dbms ppt.pptx database management systemdbms ppt.pptx database management system
dbms ppt.pptx database management system
 
Unit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 CompleteUnit 1: Introduction to DBMS Unit 1 Complete
Unit 1: Introduction to DBMS Unit 1 Complete
 

Recently uploaded

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 

Recently uploaded (20)

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 

Introduction to Database system

  • 1. 1
  • 2. Introduction DATABASE SYSTEM putu.sundika@gmail.com References : Database System Concepts (Abraham Silberschatz, Henry F. Korth, S. Sudarshan)
  • 3. Database-System Applications Enterprise Information • Sales: For customer, product, and purchase information. • Accounting: For payments, receipts, account balances, assets and other accounting information. • Human resources: For information about employees, salaries, payroll taxes, and benefits, and for generation of paychecks. • Manufacturing: For management of the supply chain and for tracking pro-duction 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 3
  • 4. Database-System Applications Banking and Finance • Banking: customer information, accounts, loans, and banking transactions. • Finance: For storing information about holdings, sales, and purchases of financial instruments such as stocks and bonds; also for storing real-time market data to enable online trading by customers and automated trading by the firm. Universities: For student information, course registrations, and grades (inaddition to standard enterprise information such as human resources and accounting) Airlines: For reservations and schedule first to use databases in a geographica Telecommunication: For keeping recordbills, maintaining balances on prepaid about the communication networks. Telecommunications: For keeping records of calls made, generating monthly bills, maintaining balances on prepaid calling cards, and storing information about the communication networks 4
  • 5. Database on almost everyone’s life today PAST few direct TODAY most contact contact to DB directly 5
  • 6. Database (past) • Add new students, instructors, and courses • Register students for courses and generate class rosters • Assign grades to students, compute grade point averages (GPA), and generate transcripts • Create a new major • etc 1960’s Universities 6
  • 7. Disadvantages of File-Processing System • Data redundancy and inconsistency • Difficulty in accessing data • Data isolation • Integrity problems • Atomicity problems • Concurrent-access anomalies • Security problems 7
  • 8. Data redundancy and inconsistency Different programmers  different files and application different structures and the programs in several programming languages  the same information may be duplicated in several places (files). For example : A student has a double major (music and mathematics). The address and telephone number of that student may appear in a file that consists of student records of students in the Music department and in a file that consists of student records of students in the Mathematics department.  This redundancy leads to higher storage and access cost.  It may lead to data inconsistency  a changed student address may be reflected in the Music department records but not elsewhere in the system. 8
  • 9. Difficulty in accessing data “Find out the names of all students who live within a particular postal-code area “ Because no application program on hand to meet it, then : 1. either obtain the list of all students and extract the needed information manually or 2. ask a programmer to write the necessary application program. 9
  • 10. Data isolation Because data are scattered in various files, and files may be in different formats, writing new application programs to retrieve the appropriate data is difficult 10
  • 11. Integrity problems The data values stored in the database must satisfy certain types of consistency constraints. Suppose the university maintains an account for each department, and records the balance amount in each account. Suppose also that the university requires that the account balance of a department may never fall below zero. Developers enforce these constraints in the system by adding appropriate code in the various application pro-grams. However, when new constraints are added, it is difficult to change the programs to enforce them. The problem is compounded when constraints involve several data items from different files. 11
  • 12. 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 balance of department A to the account balance of department B. If a system failure occurs during the execution of the program, it is possible that the $500 was removed from the balance of department A but was not credited to the balance of department B, resulting in an inconsistent database state. Clearly, it is essential to database consistency that either both the credit and debit occur, or that neither occur. That is, 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. 12
  • 13. Concurrent-access anomalies Interaction of concurrent updates is possible and may result in inconsistent data. Example : department A, with an account balance of $10,000. If two department clerks debit the account balance (by say $500 and $100, respectively) of department A at almost exactly the same time, the result of the concurrent executions may leave the budget in an incorrect (or inconsistent) state. 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. If the two programs run concurrently, they may both read the value $10,000, and write back $9500 and $9900, respectively. Depending on which one writes the value last, the account balance of department A may contain either $9500 or $9900, rather than the correct value of $9400. 13
  • 14. 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. 14
  • 15. View of Data A major purpose of a database system is to provide users with an abstract view of the data. That is, the system hides certain details of how the data are stored and maintained. Level of Data Abstractions 15
  • 16. Level Data of Abstraction type instructor=record ID:char(5); name:char(20); deptname:char(20); salary:numeric(8,2); end; another examples : • Department  deptname:type, building:type, budget:type • Course  coursed:type, title:type, deptname:type, credits:type • Student  id:type,name:type,deptname:type, totcred:type 16
  • 17. Database Language • Data-Definition Language (DDL)  to specify the database schema • Data-Manipulation Language (DML)  is a language that enables users to access or manipulate data as organized by the appropriate data model In practice, the data-definition and data-manipulation languages are not two separate languages; instead they simply form parts of a single database language, such as the widely used SQL language Data Models : a collection of conceptual tools for describing data, data relationships, data semantics, and consistency constraints. A data model provides a way to describe the design of a database at the physical, logical, and view levels. Database Schema : overall design of the database  variable declarations 17
  • 18. Data-Manipulation Language (DML) • Retrieval of information stored in the database • Insertion of new information into the database • Deletion of information from the database • Modification of information stored in the database  Procedural DMLs require a user to specify what data are needed and how to get those data.  Declarative DMLs (also referred to as non procedural DMLs) require a user to specify what data are needed without specifying how to get those data. 18
  • 19. Data-Definition Language (DDL)  Data Storage and Definition language  database schema Data stored in database must satisfy certain consistency constraint , ex: minus is disallowed for grade, birth of date must less than 2000 etc  Domain Constraints  possible values  integer types, character types, date/time types  Referential Integrity  ensure that a value that appears in one relation  Assertions  validation  database (domain dan referential integrity  special form of assertion)  Authorization  read authorization, which allows reading, but not modification, of data. Insert authorization, which allows insertion of new data, but not modification of existing data. Update authorization, which allows modification, but not deletion, of data; and delete authorization, which allows deletion of data. 19
  • 20. Sample of Relational Databases 20
  • 21. SQL 21
  • 22. TUGAS KELOMPOK  Rangkum materi hari ini dengan menggunakan kalimat sendiri  (untuk setiap kelompok) Buatlah tabel-tabel yang menurut Anda kemungkinan digunakan pada : 1. Facebook 2. Google Plus 3. Gmail 4. Yahoo Mail 5. Blogspot.com 6. Wordpress.com 7. Google Earth 8. Google Drive 9. DropBox 10. Youtube.com 11. Kaskus.com 22