Pertemuan 10 Database Management System & Data Modelling

80
1 Pertemuan 10 Database Management System & Data Modelling Matakuliah : M0084/Sistem Informasi dalam Manajemen Tahun : 2005 Versi : 1/1

description

Pertemuan 10 Database Management System & Data Modelling. Matakuliah: M0084/Sistem Informasi dalam Manajemen Tahun: 2005 Versi: 1/1. Learning Outcomes. Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : Mahasiswa dapat Menerangkan pengertian manajemen data dan basis data (C2) - PowerPoint PPT Presentation

Transcript of Pertemuan 10 Database Management System & Data Modelling

Page 1: Pertemuan 10 Database Management System & Data Modelling

1

Pertemuan 10Database Management System & Data

Modelling

Matakuliah : M0084/Sistem Informasi dalam Manajemen

Tahun : 2005

Versi : 1/1

Page 2: Pertemuan 10 Database Management System & Data Modelling

2

Learning Outcomes

Pada akhir pertemuan ini, diharapkan mahasiswa

akan mampu :

• Mahasiswa dapat Menerangkan pengertian manajemen data dan basis data (C2)

• Mahasiswa dapat Menyesuaikan berbagai bentuk manajemen data dengan kebutuhan perusahaan (C3)

Page 3: Pertemuan 10 Database Management System & Data Modelling

3

Outline Materi

• Data organization• Database structure• A relational database example• Creating database• Using the database• Managing the database• Database management system in perspective• ERD• Putting data modelling in perspective

Page 4: Pertemuan 10 Database Management System & Data Modelling

4

Introduction• Database management systems organize the

large volume of data that firms use in their everyday business activities

• The data organization must also allow managers to find specific data easily and quickly for decision making

• The increased importance of databases as resources supporting decision making has required managers to learn more about database design and use

Page 5: Pertemuan 10 Database Management System & Data Modelling

5

DATA ORGANIZATION• Firms need very large amounts of data stored in

their computer-based information systems simply because they conduct so many business transactions

• So much data exists that it would be useless for business decision making without an effective and efficient manner for organizing the data

• In order to use the data and avoid chaos, the “data” concept has to be broken down and reduced to smaller concepts

• These smaller concepts of data form the building blocks that can be combined to reproduce the original data in an organized, accessible format

Page 6: Pertemuan 10 Database Management System & Data Modelling

6

The Data Hierarchy • Business data is organized into a hierarchy of:

– data fields that combine to form records; and

– records that combine to form database files

• A data field is the smallest unit of data representing the smallest amount of data that might be retrieved from a computer at a given time

• A record is a collection of related data fields• A file is a collection of related records, such as a file

of all records containing course codes and title fields• Table 6.1 shows an example of a database file

Page 7: Pertemuan 10 Database Management System & Data Modelling

7

Page 8: Pertemuan 10 Database Management System & Data Modelling

8

The Spreadsheet As a Simple Database • A table of rows and columns can be

represented in a spreadsheet

• The columns of the spreadsheet represent the data fields while the column headings contain data field names

• Rows of the table contain the field values

• Figure 6.1 illustrates an Excel spreadsheet containing the values from the COURSE table shown in Table 6.1

Page 9: Pertemuan 10 Database Management System & Data Modelling

9

Page 10: Pertemuan 10 Database Management System & Data Modelling

10

Flat Files • A flat file is a table that does not have repeating

columns• A flat file provides the constant sequence of data

fields that database management requires • Flat files allow relational database structures to be

normalized • Normalization is a formal process for eliminating

redundant data fields while preserving the ability of the database to add, modify, and delete records without causing errors

Page 11: Pertemuan 10 Database Management System & Data Modelling

11

Page 12: Pertemuan 10 Database Management System & Data Modelling

12

Key Fields • Table 6.3 depicts values in the BOOK table and

illustrates the concept of a key • The key in a table is a field (or combination of

fields) which contains a value that uniquely identifies each record in the table

• A single field often serves as a key for a table. • Distinguishing between two or three rows is not

enough, key values must be unique for the entire table

• A candidate key is a field that uniquely identifies each table row but was not chosen to be the key

Page 13: Pertemuan 10 Database Management System & Data Modelling

13

Page 14: Pertemuan 10 Database Management System & Data Modelling

14

Key Fields (cont.)

• Some tables require the values of two or more fields to uniquely identify each row in the table

• An example would be when courses have projects • Table 6.4 shows projects but note that no single

data field value uniquely identifies each row• Values in the Code field column repeat between

rows. So do field values in all other columns • The combined values in the Code and Number

fields, however, do form a unique value

Page 15: Pertemuan 10 Database Management System & Data Modelling

15

Page 16: Pertemuan 10 Database Management System & Data Modelling

16

Relating Tables • Sometimes it may be necessary to join tables that

originally stand alone • Consider Table 6.5, the DEPARTMENT table. It

shows the six departments offering the courses in the COURSE table

• Note that the tables have no column in common. • You might be able to guess which department

offered each course based upon the values in the Abbreviation field but a computer needs an exact match, not a guess

• Table 6.6 depicts the COURSE table with the Abbreviation added

Page 17: Pertemuan 10 Database Management System & Data Modelling

17

Page 18: Pertemuan 10 Database Management System & Data Modelling

18

Page 19: Pertemuan 10 Database Management System & Data Modelling

19

DATABASE STRUCTURES• Database structures are ways of organizing data

in order to make data processing more efficient • The structure is then implemented via a

database management system (DBMS) which is a software application that: – stores the structure of the database;– stores the data itself;– stores the relationships among data in the database;and – forms and reports pertaining to the database including

the data field description

• Because it contains the data field definitions, the database controlled by a DBMS is called a “self-describing set of related data”

Page 20: Pertemuan 10 Database Management System & Data Modelling

20

Hierarchical Database Structures • The IDS database management system

was one of the first DBMS and conformed to the hierarchical database structure

• The hierarchical structure is formed by data groups, subgroups, and further subgroups

• Figure 6.2 shows navigation from the DEPARTMENT table to the COURSE table using a hierarchical database structure

Page 21: Pertemuan 10 Database Management System & Data Modelling

21

Page 22: Pertemuan 10 Database Management System & Data Modelling

22

Network Database Structures • Network database structures were developed to

allow retrieval of specific records• They allow any given record to point to any other

record in the database • Networks solve the problem of having to backtrack

all the way to a joining “branch” of the database • However, this wide range of possible connections

is also the weakness of applying network structures to practical problems since it was just too complex to allow every record to point to every other record

Page 23: Pertemuan 10 Database Management System & Data Modelling

23

Relational Database Structures

• The breakthrough came from basic research conducted independently by C. J. Date and E. F. Codd using relational algebra

• They were able to show that relational databases created out of a series of interrelated tables were, in fact, far more flexible and versatile than either the hierarchical or network database structures

• Whereas the hierarchical and network database structures rely on physical relationships in the form of storage addresses, relational database structures use implicit relationships that can be implied from the data (see Figure 6.3)

Page 24: Pertemuan 10 Database Management System & Data Modelling

24

Page 25: Pertemuan 10 Database Management System & Data Modelling

25

A RELATIONAL DATABASE EXAMPLE

• A database named Schedule has been created from tables used earlier in the chapter and some others

• The database is implemented in Microsoft Access 2002 (also known as Access XP).

• Databases break information into multiple tables because if information were stored in a single table, many data field values would be duplicated

Page 26: Pertemuan 10 Database Management System & Data Modelling

26

The Schedule Database • The example is implemented on Microsoft Access dbms

but would be similar on any relational dbms product • The COURSE table in Access (Figure 6.4) is a list of

data field values. The table itself had to be defined in Access before values were entered into the data fields

• Figure 6.5 shows the definition of the Code field• Figure 6.6 illustrates that Abbreviation field values will

be looked up from a list of values in the DEPARTMENT table

• Table 6.7 shows a single table of course and department fields before they were separated into different tables

Page 27: Pertemuan 10 Database Management System & Data Modelling

27

Page 28: Pertemuan 10 Database Management System & Data Modelling

28

Page 29: Pertemuan 10 Database Management System & Data Modelling

29

Page 30: Pertemuan 10 Database Management System & Data Modelling

30

Page 31: Pertemuan 10 Database Management System & Data Modelling

31

Page 32: Pertemuan 10 Database Management System & Data Modelling

32

The Database Concept • The logical integration of records across multiple

physical locations is called the database concept. It is not dependent on the user's perception of logical location

• Two primary goals of the database concept are to minimize data redundancy and to achieve data independence

• Data independence means placing the data specifications in tables and dictionaries that are physically separate from the programs

• Data dictionary refers to the definition of data stored within the database and controlled by the DBMS

Page 33: Pertemuan 10 Database Management System & Data Modelling

33

CREATING A DATABASE

• In the conceptual model you:

– Determine the data that you need

– Describe the data – Enter the data into the database

Page 34: Pertemuan 10 Database Management System & Data Modelling

34

Determine the Data Needs The two main approaches to determine data needs are:• The Process-Oriented Approach:

– 1. The problem is defined– 2. The decisions required to solve the problem are

identified – 3. For each decision the required information is

described – 4. The processing necessary to produce the information

is determined – 5. The data required by the processing is specified

• The Enterprise Modeling Approach – the firm’s entire data needs are determined and then

stored in the database

• The enterprise data model is shown in Figure 6.8

Page 35: Pertemuan 10 Database Management System & Data Modelling

35

Page 36: Pertemuan 10 Database Management System & Data Modelling

36

Data Modeling Techniques• Modeling the firm's data needs is supported by

techniques that: • Describe the data • Describe how the data aggregates into tables• Describe how tables relate to each other

• Entity-relationship diagrams are used to describe relationships between conceptual collections of data so that their related records can be joined together

• Class diagrams are used to describe both the data relationships and the actions that operate on the data in the relationships

Page 37: Pertemuan 10 Database Management System & Data Modelling

37

Entity-Relationship Diagrams• ER Diagrams deal with data in entities (conceptual collections

of related data fields) and the relationships between entities

• If we need to describe the data needed for a new information system to keep track of firms and their employees as well as their products, we can imagine that three separate data entities will exist: firm, employee, and product (Figure 6.9)

• When firms hire employees, however, there is an independent relationship between those two entities (Figure 6.10)

• Figure 6.11 demonstrates how we specify that one record in the firm entity can be related to many records in the product entity and also that one record in the firm entity can relate to many records in the employee entity

• Figure 6.12 is a “many-to-many” example

Page 38: Pertemuan 10 Database Management System & Data Modelling

38

Page 39: Pertemuan 10 Database Management System & Data Modelling

39

Page 40: Pertemuan 10 Database Management System & Data Modelling

40

Page 41: Pertemuan 10 Database Management System & Data Modelling

41

Page 42: Pertemuan 10 Database Management System & Data Modelling

42

Class Diagrams • When both the data used in an application and the

actions associated with the data can be graphically represented they are called class diagrams and they are one of several object-oriented design models

• Class diagrams consist of the named class, fields in the class, and actions (sometimes referred to as methods) that act upon the class

• The class diagram in Figure 6.13 illustrates the entity-relationship diagram we have just completed

Page 43: Pertemuan 10 Database Management System & Data Modelling

43

Page 44: Pertemuan 10 Database Management System & Data Modelling

44

USING THE DATABASE• Consider a database on a personal computer

• Forms, reports, and queries are common methods for accessing the database held in a database management system

• A query language is the means for asking questions of the database

• Many database management systems provide an easy-to-use interface for the user

Page 45: Pertemuan 10 Database Management System & Data Modelling

45

Reports and Forms • The majority of users' interactions with databases

are via reports and forms• Graphical user interfaces (GUIs) are provided by

most database management software vendors to make the development of forms and reports easier

• The greatest difference between forms and reports is in their format

• Figure 6.14 shows a form for entering courses into the database

• Figure 6.15 illustrates a form and subform combination

Page 46: Pertemuan 10 Database Management System & Data Modelling

46

Page 47: Pertemuan 10 Database Management System & Data Modelling

47

Page 48: Pertemuan 10 Database Management System & Data Modelling

48

Reports and Forms (cont.)• Reports are aggregated database data formatted in a

manner that aids decision making • Figure 6.16 is a report that shows each department

with a list of each course taught and projects required for the course

• Figure 6.17 illustrates that the DEPARTMENT table relates down to the COURSE table which, in turn, relates down to the PROJECT table

• Unless there was a related entry in the PROJECT table, no COURSE record was displayed. If no record from the COURSE table was used (for example, neither economics course had a project) then a DEPARTMENT record was not displayed

Page 49: Pertemuan 10 Database Management System & Data Modelling

49

Page 50: Pertemuan 10 Database Management System & Data Modelling

50

Page 51: Pertemuan 10 Database Management System & Data Modelling

51

Query-by-Example • Some users wish to go beyond reports and forms to

directly ask questions of the database • A query is a request for the database to display

selected records and generally selects a limited number of data fields, then constrains the records to a set of criteria

• Figure 6.18 represents how that query could be represented

• The format is called query-by-example (QBE) because the DBMS software presents a standardized form that the user completes so that the system can generate a true query

• The result of the query is the table in Figure 6.19

Page 52: Pertemuan 10 Database Management System & Data Modelling

52

Page 53: Pertemuan 10 Database Management System & Data Modelling

53

Query-by-Example (cont.)• Structured query language (SQL) is the code that

relational database management systems use to perform their database tasks

• While the user may see Figure 6.18 as the QBE, this is actually translated by database management system into the structured query language example shown in Figure 6.20

• DBMS software contains graphical user interfaces and "wizard" programs to walk users through queries in a user friendly manner

• Online analytical processing (OLAP) is another feature becoming more common in database management system software

Page 54: Pertemuan 10 Database Management System & Data Modelling

54

Page 55: Pertemuan 10 Database Management System & Data Modelling

55

MANAGING THE DATABASE

• Database management systems perform functions that most users never see

• The infrastructure is needed so that the database can be maintained and modified and also to assure its efficient operation

Page 56: Pertemuan 10 Database Management System & Data Modelling

56

Resources • The performance statistics processor component

of the DBMS maintains information that identifies what data is being used, who is using it, when it is being used, and so forth

• As the database management system runs, it keeps a transaction log that notes every database action taken as well as the exact time the action was taken

• A backup copy of the database is also made periodically

Page 57: Pertemuan 10 Database Management System & Data Modelling

57

Database Personnel • The database administrator (DBA) has

both technical and managerial responsibilities over the database resource.

• Database programmers create the databse applications required by firms for their corporate use

• The database end-user, by virtue of the decisions made and the amount of data retrieved, also has a major impact on database design, use, and efficiency

Page 58: Pertemuan 10 Database Management System & Data Modelling

58

DATABASE MANAGEMENT SYSTEMS IN PERSPECTIVE

• The DBMS makes it possible to create a database, maintain its contents, and disseminate the data to a wide audience of users without costly computer programming

• Its ease of use allows managers and professional staff to access database contents with only modest training

• Every facet of information technology has both advantages and disadvantages and database management systems are no exception

Page 59: Pertemuan 10 Database Management System & Data Modelling

59

DBMS Advantages and Disadvantages • The DBMS enables both firms and individual

users to:– Reduce data redundancy – Achieve data independence – Retrieve data and information rapidly

– Improve security • A decision to use a DBMS commits a firm or

user to:– Obtain expensive software – Obtain a large hardware configuration

– Hire and maintain a DBA staff

Page 60: Pertemuan 10 Database Management System & Data Modelling

60

DATA WAREHOUSING• Until recently, computer technology could not

support a system with such large-scale data demands

• The term data warehouse was coined to describe a data store with the following characteristics:– Very large scale storage capacity– The data is accumulated into new records

instead of updating existing records with new information

– The data is easily retrievable.– The data is used for decision making, not for the

firm's daily operations

Page 61: Pertemuan 10 Database Management System & Data Modelling

61

The Data Warehousing System • A data warehousing system (Figure 8.11) enters

data into the warehouse, transforms the data into information, and makes the information available to users

• Data is gathered from data sources and goes through a staging area before being entered in the warehouse data repository

• An information delivery system obtains data from the warehouse data repository and transforms it into information for the users

• The data warehousing system also includes a management and control components

Page 62: Pertemuan 10 Database Management System & Data Modelling

62

Page 63: Pertemuan 10 Database Management System & Data Modelling

63

How Data Is Stored in the Warehouse Data Repository

• The warehouse data repository stores two types of data in separate tables, which are combined to produce an information package

• Identifying and descriptive data are stored in dimension tables (Figure 8.12)

• Fact tables contain the quantitative measures of an entity, object, or activity (Fig. 8.13)

• An information package identifies all of the dimensions that will be used in analyzing a particular activity. Figure 8.14 shows the format and Figure 8.15 includes some sample data

Page 64: Pertemuan 10 Database Management System & Data Modelling

64

Page 65: Pertemuan 10 Database Management System & Data Modelling

65

Page 66: Pertemuan 10 Database Management System & Data Modelling

66

Figure 8.14 Information

Package Format

Page 67: Pertemuan 10 Database Management System & Data Modelling

67

Figure 8.15 A Sample Information Package

Page 68: Pertemuan 10 Database Management System & Data Modelling

68

The Star Schema • The key that identifies the dimension and provides

the link to connect the dimension tables to the fact table is called a star schema

• Figure 8.16 shows how the keys in four dimension tables are related to keys in the information package in the center

• Fig. 8.17 is an example using the four dimension tables: customer, time, salesperson, and product

• The warehouse data repository contains multiple star schemas – one for each activity type to be analyzed

Page 69: Pertemuan 10 Database Management System & Data Modelling

69

Page 70: Pertemuan 10 Database Management System & Data Modelling

70

Page 71: Pertemuan 10 Database Management System & Data Modelling

71

INFORMATION DELIVERY• The final element in the data warehousing system

is the information delivery system• Information is obtained from the data repository,

transformed into information, and made available to users

• Figure 8.18 shows how the user can navigate the data repository to produce summary information, detailed information, and detailed data

• Figure 8.19 shows the results of a drill-across navigation, producing outputs in different hierarchies

Page 72: Pertemuan 10 Database Management System & Data Modelling

72

Page 73: Pertemuan 10 Database Management System & Data Modelling

73

Page 74: Pertemuan 10 Database Management System & Data Modelling

74

ONLINE ANALYTCAL PROCESSING• OLAP is a type of software especially developed for

data warehouses• Using OLAP, users can communicate with the data

warehouse either through a GUI or Web interface, and quickly produce information in a variety of forms, including graphics

• There are two approaches to OLAP (Figure 8.20): 1. ROLAP (for relational online analytical processing) that

utilizes a standard relational DBMS

2. MOLAP (for multidimensional online analytical processing) that utilizes a special multidimensional DBMS

Page 75: Pertemuan 10 Database Management System & Data Modelling

75

Page 76: Pertemuan 10 Database Management System & Data Modelling

76

ROLAP and MOLAP• Both OLAP types include a data warehouse server and

a second server that houses OLAP software • A major difference is that the MOLAP workstation

includes a downloaded multidimensional database • The data in this database has already been formatted in

various dimensions so that it may be made available quickly rather than go through time-consuming analyses

• Figure 8.21 illustrates a report that is the type that ROLAP can easily prepare

• MOLAP can produce information in many dimensions• Figure 8.22 illustrates a summary report in four

dimensions: store type, product, age, and gender

Page 77: Pertemuan 10 Database Management System & Data Modelling

77

Page 78: Pertemuan 10 Database Management System & Data Modelling

78

Page 79: Pertemuan 10 Database Management System & Data Modelling

79

DATA MINING• Data mining is the process of finding relationships

in data previously unknown to the user• Data mining helps users discover relationships and

present them in an understandable way so the relationships can be used in decision making

• The two basic data mining techniques are:– Hypothesis Verification where data is used to

test theories– Knowledge Discovery in which users search

for common characteristics within the data

Page 80: Pertemuan 10 Database Management System & Data Modelling

80

End of Session 10