Sistem Basis Data (DATABASE) Siauw Yohanes Darmawan 0817 917 8 917 92809577 [email protected] 1.

31
Sistem Basis Data Sistem Basis Data (DATABASE) (DATABASE) Siauw Yohanes Darmawan Siauw Yohanes Darmawan 0817 917 8 917 0817 917 8 917 92809577 92809577 [email protected] 1

Transcript of Sistem Basis Data (DATABASE) Siauw Yohanes Darmawan 0817 917 8 917 92809577 [email protected] 1.

Sistem Basis DataSistem Basis Data(DATABASE)(DATABASE)

Siauw Yohanes DarmawanSiauw Yohanes Darmawan

0817 917 8 9170817 917 8 917

[email protected]

11

RulesRules

► Pertemuan + 2x UjianPertemuan + 2x Ujian► SeReSanSeReSan► No Smoking, No Ring ToneNo Smoking, No Ring Tone► No Cell Phone UsageNo Cell Phone Usage► Tidak ada Dewa dan Dewi PenolongTidak ada Dewa dan Dewi Penolong► Food & Drink AllowableFood & Drink Allowable► You talk, I’m quite. I talk, you’re quiteYou talk, I’m quite. I talk, you’re quite► 10 Minutes Tolerance10 Minutes Tolerance► Bahan KuliahBahan Kuliah► QuizQuiz► Tugas MandiriTugas Mandiri► PresentasiPresentasi

2

33

Chapter 1Chapter 1

Introduction to DatabasesIntroduction to Databases

TransparenciesTransparenciesLast Updated: Pebruari 2011

By M. Arief

http://arief.ismy.web.id

4

Communication Communication ProblemProblem

http://arief.ismy.web.id

5

Chapter 1 - ObjectivesChapter 1 - Objectives

►Some common uses of database systems.Some common uses of database systems.►Characteristics of file-based systems.Characteristics of file-based systems.►Problems with file-based approach.Problems with file-based approach.►Meaning of the term database.Meaning of the term database.►Meaning of the term Database Meaning of the term Database

Management System (DBMS).Management System (DBMS).

http://arief.ismy.web.id

6

Chapter 1 - Objectives Chapter 1 - Objectives

►Typical functions of a DBMS.Typical functions of a DBMS.►Major components of the DBMS Major components of the DBMS

environment.environment.►Personnel involved in the DBMS Personnel involved in the DBMS

environment.environment.►History of the development of DBMSs.History of the development of DBMSs.►Advantages and disadvantages of DBMSs.Advantages and disadvantages of DBMSs.

http://arief.ismy.web.id

7

Examples of Database Examples of Database ApplicationsApplications

►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

8

File-Based SystemsFile-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

9

File-Based ProcessingFile-Based Processing

http://arief.ismy.web.id

10

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

11

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

12

Database ApproachDatabase Approach

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

programsprograms, rather than being stored separately , rather than being stored separately and independently.and independently.

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

13

DatabaseDatabase

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

► 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

14

Entity-Relationship DiagramEntity-Relationship Diagram

http://arief.ismy.web.id

15

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

►A software system that enables users to A software system that enables users to definedefine, , createcreate, and , and maintainmaintain the database the database and that provides controlled access to and that provides controlled access to this database.this database.

http://arief.ismy.web.id

16

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

http://arief.ismy.web.id

17

DBMS Provides:DBMS 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

18

DBMS Provides:DBMS Provides:

►Controlled accessControlled 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.

►A A viewview mechanism. mechanism. Provides users with only the data they want or need to Provides users with only the data they want or need to

use.use.

http://arief.ismy.web.id

19

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

20

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

21

Components of DBMS Components of DBMS EnvironmentEnvironment

http://arief.ismy.web.id

22

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

23

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

24

Database Design: The Paradigm Database Design: The Paradigm ShiftShift

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

http://arief.ismy.web.id

25

Roles in the Database 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

26

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

27

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

28

History of Database SystemsHistory 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

29

Advantages of DBMSsAdvantages of DBMSs

►Control of data redundancyControl of data redundancy►Data consistencyData consistency►More information from the same amount of More information from the same amount of

datadata►Sharing of dataSharing of data►Improved data integrityImproved data integrity►Improved securityImproved security►Enforcement of standardsEnforcement of standards►Economy of scaleEconomy of scale

http://arief.ismy.web.id

30

Advantages of DBMSsAdvantages of DBMSs

►Balanced conflicting requirementsBalanced conflicting requirements►Improved data accessibility and Improved data accessibility and

responsivenessresponsiveness►Increased productivityIncreased productivity►Improved maintenance through data Improved maintenance through data

independenceindependence►Increased concurrencyIncreased concurrency►Improved backup and recovery servicesImproved backup and recovery services

http://arief.ismy.web.id

31

Disadvantages of DBMSsDisadvantages of DBMSs

►ComplexityComplexity►SizeSize►Cost of DBMSCost of DBMS►Additional hardware costsAdditional hardware costs►Cost of conversionCost of conversion►PerformancePerformance►Higher impact of a failureHigher impact of a failure

http://arief.ismy.web.id