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

PPTX
Database management system by Neeraj Bhandari ( Surkhet.Nepal )
PDF
Air Line Management System | DBMS project
PDF
Tutorial On Database Management System
PPTX
Database basics
PDF
Database management system
PPTX
Database Design
PPT
Chapter01 introduction
PPTX
Relational database revised
Database management system by Neeraj Bhandari ( Surkhet.Nepal )
Air Line Management System | DBMS project
Tutorial On Database Management System
Database basics
Database management system
Database Design
Chapter01 introduction
Relational database revised

What's hot (20)

PDF
Data base management systems ppt
PPTX
Database Basics Theory
PPTX
Database Project Airport management System
PPT
D B M S Animate
DOC
Dbms Lecture Notes
PPTX
Introduction to database & sql
PPTX
Introduction to DBMS(For College Seminars)
PPTX
Database Concepts and Components
PDF
Relational Database Management System
PPT
Dbms
DOC
DBMS Practical File
DOCX
Mi0034 –database management systems
PPTX
Bank mangement system
PPTX
Relational Database Design
PDF
Oracle
PPTX
RDMS AND SQL
PPT
Introduction To DBMS
PDF
Database Lecture Notes
PPT
PPT
Unit 02 dbms
Data base management systems ppt
Database Basics Theory
Database Project Airport management System
D B M S Animate
Dbms Lecture Notes
Introduction to database & sql
Introduction to DBMS(For College Seminars)
Database Concepts and Components
Relational Database Management System
Dbms
DBMS Practical File
Mi0034 –database management systems
Bank mangement system
Relational Database Design
Oracle
RDMS AND SQL
Introduction To DBMS
Database Lecture Notes
Unit 02 dbms
Ad

Viewers also liked (20)

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

Similar to Introduction to Database system (20)

PPTX
Introduction to Database Management Sytems
PPTX
Unit 2 DATABASE ESSENTIALS.pptx
DOC
PDF
dbms Unit 1.pdf arey bhai teri maa chodunga
PPTX
PURPOSE OF DATABASE final.pptx
PDF
introducttion to Relational Databases ppt
PPTX
Lecture 1&2(rdbms-ii)
PDF
Chapter – 1 Intro to DBS.pdf
PDF
Chapter – 1 Intro to DBS.pdf
PPTX
database management systems for ug students
PPTX
Chapter 1. Itroduction To DBMS -.pptx
PPTX
Unit1 dbms
PPT
Basic and Introduction to DBMS Unit 1 of AU
PDF
Introduction to Databases and Transactions
PDF
Database & Database Users
PPTX
Databaselpu
PPTX
DBMS-1.pptx
PPTX
Intro.pptx
PPTX
INTRODUCTION TO DATABASE
PPT
Information Management
Introduction to Database Management Sytems
Unit 2 DATABASE ESSENTIALS.pptx
dbms Unit 1.pdf arey bhai teri maa chodunga
PURPOSE OF DATABASE final.pptx
introducttion to Relational Databases ppt
Lecture 1&2(rdbms-ii)
Chapter – 1 Intro to DBS.pdf
Chapter – 1 Intro to DBS.pdf
database management systems for ug students
Chapter 1. Itroduction To DBMS -.pptx
Unit1 dbms
Basic and Introduction to DBMS Unit 1 of AU
Introduction to Databases and Transactions
Database & Database Users
Databaselpu
DBMS-1.pptx
Intro.pptx
INTRODUCTION TO DATABASE
Information Management

Recently uploaded (20)

PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Cell Structure & Organelles in detailed.
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Pre independence Education in Inndia.pdf
PDF
Classroom Observation Tools for Teachers
PPTX
Institutional Correction lecture only . . .
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
master seminar digital applications in india
PPTX
Lesson notes of climatology university.
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Cell Structure & Organelles in detailed.
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Sports Quiz easy sports quiz sports quiz
human mycosis Human fungal infections are called human mycosis..pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Pre independence Education in Inndia.pdf
Classroom Observation Tools for Teachers
Institutional Correction lecture only . . .
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
master seminar digital applications in india
Lesson notes of climatology university.
Final Presentation General Medicine 03-08-2024.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Pharmacology of Heart Failure /Pharmacotherapy of CHF

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