Top Banner
1 Chapter 1 Chapter 1 Introduction to Databases Introduction to Databases Transparencies Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 http://arief.ismy.web.id
31

1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

Jan 03, 2016

Download

Documents

Percival Bryant
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

11

Chapter 1Chapter 1

Introduction to DatabasesIntroduction to Databases

TransparenciesTransparenciesLast Updated: Pebruari 2010

By M. AriefUpdated by RSO Feb 2011

http://arief.ismy.web.id

Page 2: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

Course IntroductionCourse Introduction

►TI 403 3+1 SKSTI 403 3+1 SKS►Learning Objective:Learning Objective:

Understand about DBMS conceptUnderstand about DBMS concept Capable to design DBMSCapable to design DBMS

►Marking Composition: Marking Composition: 30% UTS, 40% UAS, 10% Individual works, 10% group 30% UTS, 40% UAS, 10% Individual works, 10% group

work, 10% lab workwork, 10% lab work

► Intro to LecturerIntro to Lecturer

2

Page 3: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

Group WorksGroup Works

►Max 10 groups in the classMax 10 groups in the class►Choose your leaderChoose your leader►Leader bring Connolly book to the Leader bring Connolly book to the

classclass►Group discussion in the class Group discussion in the class ►Group project outside classGroup project outside class►Arrange seats for group discussionArrange seats for group discussion►Tidy up & clean up the classTidy up & clean up the class

3

Page 4: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

4

What problemsWhat problemsyou might think?you might think?

http://arief.ismy.web.id

Page 5: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

5

Chapter 1 - ObjectivesChapter 1 - Objectives

1.1. Some common uses of database systems.Some common uses of database systems.

2.2. Characteristics of file-based systems.Characteristics of file-based systems.

3.3. Problems with file-based approach.Problems with file-based approach.

4.4. Meaning of the term database.Meaning of the term database.

5.5. Meaning of the term Database Meaning of the term Database Management System (DBMS).Management System (DBMS).

http://arief.ismy.web.id

Page 6: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

6

Chapter 1 - Objectives Chapter 1 - Objectives

6.6. DBMS Approaches.DBMS Approaches.

7.7. Major components of the DBMS Major components of the DBMS environment.environment.

8.8. Personnel involved in the DBMS Personnel involved in the DBMS environment.environment.

9.9. History of the development of DBMSs.History of the development of DBMSs.

10.10. Advantages and disadvantages of Advantages and disadvantages of DBMSs.DBMSs.

http://arief.ismy.web.id

Page 7: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

7

1. Database Applications1. Database Applications

►Purchases from the supermarketPurchases from the supermarket►Purchases using your credit cardPurchases using your credit card ►Booking a holiday at the travel agents Booking a holiday at the travel agents ►Using the local libraryUsing the local library ►Taking out insuranceTaking out insurance ►Using the InternetUsing the Internet ►Studying at universityStudying at university

http://arief.ismy.web.id

Page 8: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

8

2. File-Based Systems2. File-Based Systems

►Collection of application programs that Collection of application programs that perform services for the end users (e.g. perform services for the end users (e.g. reports). reports).

►Each program defines and manages its Each program defines and manages its own data.own data.

http://arief.ismy.web.id

Page 9: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

9

File-Based ProcessingFile-Based Processing

http://arief.ismy.web.id

Page 10: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

3. FBS problems3. FBS problems

►Make a list of problems that may happened on Make a list of problems that may happened on File Based System!File Based System!

► Sales FilesSales Files Client(ClientNo,fName,iName,address,telpNo,prefType,MaxRent)Client(ClientNo,fName,iName,address,telpNo,prefType,MaxRent) PrivateOwner(OwnerNo,fName,iName,address,telpNo)PrivateOwner(OwnerNo,fName,iName,address,telpNo) PropertyForRent(PropertyNo,street,city,postcode,Type,Rooms,RPropertyForRent(PropertyNo,street,city,postcode,Type,Rooms,R

ent,OwnerNo)ent,OwnerNo)

► Contract FilesContract Files Client(ClientNo,fName,iName,address,telpNo)Client(ClientNo,fName,iName,address,telpNo) PropertyForRent(PropertyNo,street,city,postcode,Rent)PropertyForRent(PropertyNo,street,city,postcode,Rent) Lease(LeaseNo,PropertyNo,ClientNo,Rent,PaymentMethod,DepoLease(LeaseNo,PropertyNo,ClientNo,Rent,PaymentMethod,Depo

sit,Paid,RentStart,RentFinish,Duration)sit,Paid,RentStart,RentFinish,Duration)

10

Page 11: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

11

Limitations of File-Based Limitations of File-Based ApproachApproach

►Separation and isolation of dataSeparation and isolation of data Each program maintains its own set of data.Each program maintains its own set of data. Users of one program may be unaware of Users of one program may be unaware of

potentially useful data held by other programs.potentially useful data held by other programs.

►Duplication of dataDuplication of data Same data is held by different programs.Same data is held by different programs. Wasted space and potentially different values Wasted space and potentially different values

and/or different formats for the same item.and/or different formats for the same item.

http://arief.ismy.web.id

Page 12: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

12

Limitations of File-Based Limitations of File-Based ApproachApproach

►Data dependenceData dependence File structure is defined in the program code.File structure is defined in the program code.

►Incompatible file formatsIncompatible file formats Programs are written in different languages, and so Programs are written in different languages, and so

cannot easily access each other’s files.cannot easily access each other’s files.

►Fixed Queries/Proliferation of application Fixed Queries/Proliferation of application programsprograms Programs are written to satisfy particular functions.Programs are written to satisfy particular functions. Any new requirement needs a new program.Any new requirement needs a new program.

http://arief.ismy.web.id

Page 13: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

13

4. Database4. Database

► Shared collection of logically Shared collection of logically related data related data and and a a description description of this data, designed to meet the of this data, designed to meet the information information needs of an needs of an organizationorganization..

► System catalog (metadata)System catalog (metadata) provides description provides description of data to enable program–data independence.of data to enable program–data independence.

► Logically related data comprises Logically related data comprises entitiesentities, , attributesattributes, and , and relationshipsrelationships of an of an organization’s information.organization’s information.

http://arief.ismy.web.id

Page 14: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

14

Entity-Relationship DiagramEntity-Relationship Diagram

http://arief.ismy.web.id

Page 15: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

15

5. Database Management System 5. Database Management System (DBMS)(DBMS)

►A A softwaresoftware system that enables users to system that enables users to definedefine, , createcreate, and , and maintainmaintain the database the database and that provides controlled and that provides controlled accessaccess to to this this databasedatabase..

http://arief.ismy.web.id

Page 16: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

16

6. Database Approach6. Database Approach

► Arose because:Arose because: Definition of data was embedded in application Definition of data was embedded in application

programs, rather than being stored separately and programs, rather than being stored separately and independentlyindependently..

No controlNo control over access and manipulation of data over access and manipulation of data beyond that imposed by application programs.beyond that imposed by application programs.

► ResultResult: : the database and Database Management System the database and Database Management System

(DBMS).(DBMS).

http://arief.ismy.web.id

Page 17: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

17

DBMS Provides:DBMS Provides:►No Control?No Control?

Lots of Controlled accessLots of Controlled access to database may include: to database may include:►A security system.A security system.►An integrity system.An integrity system.►A concurrency control system.A concurrency control system.►A recovery control system.A recovery control system.►A user-accessible catalog.A user-accessible catalog.

►Not Independent?Not Independent? DBMS provide a DBMS provide a viewview mechanism. mechanism.

►Provides users with only the data they want or need to use.Provides users with only the data they want or need to use.

http://arief.ismy.web.id

Page 18: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

18

ViewsViews

►Allows each user to have his or her Allows each user to have his or her own own viewview of the database. of the database.

►A view is essentially some A view is essentially some subset of the subset of the databasedatabase..

http://arief.ismy.web.id

Page 19: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

19

ViewsViews

►BenefitsBenefits include: include: Reduce complexity;Reduce complexity; Provide a level of security;Provide a level of security; Provide a mechanism to customize the appearance Provide a mechanism to customize the appearance

of the database;of the database; Present a consistent, unchanging picture of the Present a consistent, unchanging picture of the

structure of the database, even if the underlying structure of the database, even if the underlying database is changeddatabase is changed..

http://arief.ismy.web.id

Page 20: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

FBS problems SolvedFBS problems Solved

► Solve FBS problems by composing these files!Solve FBS problems by composing these files!► Sales FilesSales Files

Client(ClientNo,fName,iName,address,telpNo,prefType,MaxReClient(ClientNo,fName,iName,address,telpNo,prefType,MaxRent)nt)

PrivateOwner(OwnerNo,fName,iName,address,telpNo)PrivateOwner(OwnerNo,fName,iName,address,telpNo) PropertyForRent(PropertyNo,street,city,postcode,Type,RoomsPropertyForRent(PropertyNo,street,city,postcode,Type,Rooms

,Rent,OwnerNo),Rent,OwnerNo)

► Contract FilesContract Files Client(ClientNo,fName,iName,address,telpNo)Client(ClientNo,fName,iName,address,telpNo) PropertyForRent(PropertyNo,street,city,postcode,Rent)PropertyForRent(PropertyNo,street,city,postcode,Rent) Lease(LeaseNo,PropertyNo,ClientNo,Rent,PaymentMethod,DeLease(LeaseNo,PropertyNo,ClientNo,Rent,PaymentMethod,De

posit,Paid,RentStart,RentFinish,Duration)posit,Paid,RentStart,RentFinish,Duration)

20

Page 21: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

21

Database Management System Database Management System (DBMS)(DBMS)

http://arief.ismy.web.id

Page 22: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

22

DBMS also Provides:DBMS also Provides:

►Data definition language (DDL).Data definition language (DDL). Permits specification of data types, structures and Permits specification of data types, structures and

any data constraints. any data constraints. All specifications are stored in the database.All specifications are stored in the database.

►Data manipulation language (DML).Data manipulation language (DML). General enquiry facility (query language) of the General enquiry facility (query language) of the

data.data.

http://arief.ismy.web.id

Page 23: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

23

7. Components of DBMS 7. Components of DBMS EnvironmentEnvironment

http://arief.ismy.web.id

Page 24: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

24

Components of DBMS Components of DBMS EnvironmentEnvironment

►HardwareHardware Can range from a PC to a network of Can range from a PC to a network of

computers.computers.

►SoftwareSoftware DBMS, operating system, network software (if DBMS, operating system, network software (if

necessary) and also the application programs.necessary) and also the application programs.

►DataData Used by the organization and a description Used by the organization and a description

of this data called the schema.of this data called the schema.

http://arief.ismy.web.id

Page 25: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

25

Components of DBMS Components of DBMS EnvironmentEnvironment

►ProceduresProcedures Instructions and rules that should be applied to Instructions and rules that should be applied to

the design and use of the database and DBMS.the design and use of the database and DBMS.

►PeoplePeople

http://arief.ismy.web.id

Page 26: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

26

Database Design: Database Design: The Paradigm ShiftThe Paradigm Shift

► Which one is yours? why?Which one is yours? why?

►The organization has to think of the The organization has to think of the applicationapplication first and the first and the datadata second. second.

oror►The organization has to think of the The organization has to think of the datadata

first and the first and the applicationapplication second. second.

http://arief.ismy.web.id

Page 27: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

27

8. Roles in the Database 8. Roles in the Database EnvironmentEnvironment

►Data AdministratorData Administrator ( (DADA))►Database Administrator (DBA)Database Administrator (DBA)►Database Designers (Logical and Physical)Database Designers (Logical and Physical)►Application ProgrammersApplication Programmers►End Users (naive and sophisticated)End Users (naive and sophisticated)

http://arief.ismy.web.id

Page 28: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

28

DA and DBADA and DBA

► The Data Administrator (DA)The Data Administrator (DA) is is responsible for the responsible for the management of the data management of the data resourceresource including database planning, including database planning, development and maintenance of standards, development and maintenance of standards, policies and procedures, and policies and procedures, and conceptual/logical database design.conceptual/logical database design.

► The Database Administrator (DBA)The Database Administrator (DBA) is is responsible for the responsible for the physical realization of the physical realization of the databasedatabase, including physical database design , including physical database design and implementation, security and integrity and implementation, security and integrity control, maintenance of the operational control, maintenance of the operational system, and ensuring satisfactory system, and ensuring satisfactory performance of the application for users.performance of the application for users.

http://arief.ismy.web.id

Page 29: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

29

Logical and Physical DB DesignerLogical and Physical DB Designer► Logical DB DesignerLogical DB Designer is concerned with is concerned with identifyingidentifying the the

data (entities and attributes), the data (entities and attributes), the relationshiprelationship between between the data, and the the data, and the constraintsconstraints on the data. They must on the data. They must have a thorough and complete understanding of the have a thorough and complete understanding of the organization’s and its organization’s and its business rulebusiness rule.. Conceptual database designConceptual database design Logical database designLogical database design

► Physical DB DesignerPhysical DB Designer decides how the logical database decides how the logical database design is to be design is to be physically realizedphysically realized. This involves:. This involves: Mapping log. DB des. Into a set of tables and integrity constraintsMapping log. DB des. Into a set of tables and integrity constraints Selecting specific storage structures and access methods for the Selecting specific storage structures and access methods for the

data to achieve good performancedata to achieve good performance Designing any security measures required on the data.Designing any security measures required on the data.

► Highly dependent on the target DBMSHighly dependent on the target DBMS

► Logical DB Designer: Logical DB Designer: WhatWhat, Physical DB Designer: , Physical DB Designer: HowHow

http://arief.ismy.web.id

Page 30: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

30

9. History of Database Systems9. History of Database Systems

►First-generationFirst-generation Hierarchical and NetworkHierarchical and Network

►Second generationSecond generation RelationalRelational

►Third generationThird generation Object RelationalObject Relational Object-OrientedObject-Oriented

http://arief.ismy.web.id

Page 31: 1 Chapter 1 Introduction to Databases Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011 .

31

10. Individual Home Work10. Individual Home Work

►Make a list of descriptions of DBMS Make a list of descriptions of DBMS advantages and Disadvantages from advantages and Disadvantages from Connolly Book Chapter 1Connolly Book Chapter 1

http://arief.ismy.web.id