Nothing Special   »   [go: up one dir, main page]

Pengantar Database: Minggu 3

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 27

MINGGU 3

PENGANTAR DATABASE
FILE VS. DATABASES

 Masalahyg timbul jika master file


Master File 1
Fact A
Enrollment makin banyak:
Program  Often the same information was
Fact B
Fact C stored in multiple master files.
 Made it more difficult to effectively
integrate data and obtain an
organization-wide view of the data.
Master File 2  Also, the same information may not
Fact A Financial Aid
Fact D Program have been consistent between files.
 If a student changed his phone
Fact F
number, it may have been updated
in one master file but not another.
Master File 1
Grades
Fact A Program
Fact B
Fact F
FILE VS. DATABASES

 Database adalah gabungan file


Database yang saling berhubungan dan
Fact A Fact B
Fact C Fact D dikoordinasi secara terpusat
Fact E Fact F

Database
Management
System

Enrollment Financial Aid Grades


Program Program Program
FILE VS. DATABASES

Database
 Database system adalah
Fact A Fact B kombinasi database, DBMS,
Fact C Fact D dan program aplikasi yang
Fact E Fact F
dapat mengakses data base

Database
Management
System

Enrollment Financial Aid Grades


Program Program Program
IMPORTANCE AND ADVANTAGES OF
DATABASE SYSTEMS
 Manfaat Database technology bagi organisasi:
 Data integration

• Achieved by combining master


files into larger pools of data
accessible by many programs.
IMPORTANCE AND ADVANTAGES OF
DATABASE SYSTEMS
 Database technology provides the following benefits to
organizations:
 Dataintegration
 Data sharing

• It’s easier to share data that’s integrated—the FBI is


planning an 8 year, $400 million database project to
make data more available to agency users.
IMPORTANCE AND ADVANTAGES OF
DATABASE SYSTEMS
 Database technology provides the following benefits to
organizations:
 Data integration
 Data sharing
 Reporting flexibility

• Reports can be revised easily and generated as


needed.
• The database can easily be browsed to research
problems or obtain detailed information.
IMPORTANCE AND ADVANTAGES OF
DATABASE SYSTEMS
 Database technology provides the following benefits to
organizations:
 Data integration
 Data sharing
 Reporting flexibility
 Minimal data redundancy and inconsistencies

• Because data items are usually


stored only once.
IMPORTANCE AND ADVANTAGES OF
DATABASE SYSTEMS
 Database technology provides the following benefits to
organizations:
 Data integration
 Data sharing
 Reporting flexibility
 Minimal data redundancy and inconsistencies
 Data independence

• Data items are independent of the programs that use


them.
• Consequently, a data item can be changed without
changing the program and vice versa.
• Makes programming easier and simplifies data
management.
Logical View—User A Logical View—User B
Scholarship Distribution
Enrollment by Class Fr.
5%
Sr. Soph.
33% 24%

Jr.
38%

The DBMS translates


DBMS users’ logical views into
instructions as to which
data should be retrieved
Operating from the database.
System

Database
Logical View—User A Logical View—User B
Scholarship Distribution
Enrollment by Class Fr.
5%
Sr. Soph.
33% 24%

Jr.
38%

DBMS
The operating system
Operating translates DBMS requests
System into instructions to
physically retrieve data
from various disks.

Database
RELATIONAL DATABASES

 The relational data model represents everything in the


database as being stored in the forms of tables (aka, relations).
STUDENTS
Last First Phone
Student ID Name Name No.
333-33-3333 Simpson Alice 333-3333
Relation
111-11-1111 Sanders Ned 444-4444
123-45-6789 Moore Artie 555-5555

COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30

STUDENT x COURSE
SCID Student ID Course
333333333-1234 333-33-3333 1234
333333333-1236 333-33-3333 1236
111111111-1235 111-11-1111 1235
111111111-1236 111-11-1111 1235
STUDENTS Each row is called a
Last First Phone tuple, which
Student ID Name Name No. rhymes with
333-33-3333 Simpson Alice 333-3333 “couple.”
111-11-1111 Sanders Ned 444-4444
123-45-6789 Moore Artie 555-5555

COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
SCID
333333333-1234
333333333-1236
111111111-1235
111111111-1236
Each row contains
STUDENTS
data about a
Last First Phone
specific occurrence
Student ID Name Name No.
of the type of entity
333-33-3333 Simpson Alice 333-3333
in the table.
111-11-1111 Sanders Ned 444-4444
123-45-6789 Moore Artie 555-5555

COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
SCID
333333333-1234
333333333-1236
111111111-1235
111111111-1236
STUDENTS Each column in a
Last First Phone table contains
Student ID Name Name No. information about a
333-33-3333 Simpson Alice 333-3333 specific attribute of
111-11-1111 Sanders Ned 444-4444 the entity.
123-45-6789 Moore Artie 555-5555

COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
SCID
333333333-1234
333333333-1236
111111111-1235
111111111-1236
STUDENTS
Last First Phone
Student ID Name Name No.
333-33-3333 Simpson Alice 333-3333
111-11-1111 Sanders Ned 444-4444
123-45-6789 Moore Artie 555-5555

COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
A primary key is the attribute
SCID
or combination of attributes
333333333-1234 that uniquely identifies a
333333333-1236 specific row in a table.
111111111-1235
111111111-1236
STUDENTS
Last First Phone
Student ID Name Name No.
333-33-3333 Simpson Alice 333-3333
111-11-1111 Sanders Ned 444-4444
123-45-6789 Moore Artie 555-5555

COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
SCID
333333333-1234 In some tables, two or more attributes may be
333333333-1236 joined to form the primary key.
111111111-1235
111111111-1236
STUDENTS
First Advisor
Student ID Last Name Name Phone No. No.
333-33-3333 Simpson Alice 333-3333 1418
111-11-1111 Sanders Ned 444-4444 1418
123-45-6789 Moore Artie 555-5555 1503

ADVISORS
Advisor No. Last Name First Name Office No.
1418 Howard Glen 420
1419 Melton Amy 316
1503 Zhang Xi 202
1506 Radowski J.D. 203

A foreign key is an attribute in one table that is a primary key in another


table.
STUDENTS
First Advisor
Student ID Last Name Name Phone No. No.
333-33-3333 Simpson Alice 333-3333 1418
111-11-1111 Sanders Ned 444-4444 1418
123-45-6789 Moore Artie 555-5555 1503

ADVISORS
Advisor No. Last Name First Name Office No.
1418 Howard Glen 420
1419 Melton Amy 316
1503 Zhang Xi 202
1506 Radowski J.D. 203

Foreign keys are used to link tables together.


STUDENTS
First Advisor
Student ID Last Name Name Phone No. No.
333-33-3333 Simpson Alice 333-3333 1418
111-11-1111 Sanders Ned 444-4444 1418
123-45-6789 Moore Artie 555-5555 1503

ADVISORS
Advisor No. Last Name First Name Office No.
1418 Howard Glen 420
1419 Melton Amy 316
1503 Zhang Xi 202
1506 Radowski J.D. 203

Other non-key attributes in each table store important


information about the entity.
Last First
Student ID Name Name Phone No. Course No. Section Day Time
333-33-3333 Simpson Alice 333-3333 ACCT-3603 1 M 9:00 AM
333-33-3333 Simpson Alice 333-3333 FIN-3213 3 Th 11:00 AM
333-33-3333 Simpson Alice 333-3333 MGMT-3021 11 Th 12:00 PM
111-11-1111 Sanders Ned 444-4444 ACCT-3433 2 T 10:00 AM
111-11-1111 Sanders Ned 444-4444 MGMT-3021 5 W 8:00 AM
111-11-1111 Sanders Ned 444-4444 ANSI-1422 7 F 9:00 AM
123-45-6789 Moore Artie 555-5555 ACCT-3433 2 T 10:00 AM
123-45-6789 Moore Artie 555-5555 FIN-3213 3 Th 11:00 AM

• Suppose Alice Simpson changes her phone number. You need to make the
change in three places. If you fail to change it in all three places or change it
incorrectly in one place, then the records for Alice will be inconsistent.
• This problem is referred to as an update anomaly.
Last First
Student ID Name Name Phone No. Course No. Section Day Time
333-33-3333 Simpson Alice 333-3333 ACCT-3603 1 M 9:00 AM
333-33-3333 Simpson Alice 333-3333 FIN-3213 3 Th 11:00 AM
333-33-3333 Simpson Alice 333-3333 MGMT-3021 11 Th 12:00 PM
111-11-1111 Sanders Ned 444-4444 ACCT-3433 2 T 10:00 AM
111-11-1111 Sanders Ned 444-4444 MGMT-3021 5 W 8:00 AM
111-11-1111 Sanders Ned 444-4444 ANSI-1422 7 F 9:00 AM
123-45-6789 Moore Artie 555-5555 ACCT-3433 2 T 10:00 AM
123-45-6789 Moore Artie 555-5555 FIN-3213 3 Th 11:00 AM

• What happens if you have a new student to add, but he hasn’t signed up for
any courses yet?
• Or what if there is a new class to add, but there are no students enrolled in it
yet? In either case, the record will be partially blank.
• This problem is referred to as an insert anomaly.
Last First
Student ID Name Name Phone No. Course No. Section Day Time
333-33-3333 Simpson Alice 333-3333 ACCT-3603 1 M 9:00 AM
333-33-3333 Simpson Alice 333-3333 FIN-3213 3 Th 11:00 AM
333-33-3333 Simpson Alice 333-3333 MGMT-3021 11 Th 12:00 PM
111-11-1111 Sanders Ned 444-4444 ACCT-3433 2 T 10:00 AM
111-11-1111 Sanders Ned 444-4444 MGMT-3021 5 W 8:00 AM
111-11-1111 Sanders Ned 444-4444 ANSI-1422 7 F 9:00 AM
123-45-6789 Moore Artie 555-5555 ACCT-3433 2 T 10:00 AM
123-45-6789 Moore Artie 555-5555 FIN-3213 3 Th 11:00 AM

• If Ned withdraws from all his classes and you eliminate all three of his rows
from the table, then you will no longer have a record of Ned. If Ned is
planning to take classes next semester, then you probably didn’t really want to
delete all records of him.
• This problem is referred to as a delete anomaly.
DATABASE SYSTEMS AND THE FUTURE OF
ACCOUNTING
 Database systems dapat mempengaruhi sifat fundamental dari
akuntansi :
 Memiliki potensi untuk mengubah sifat pelaporan eksternal
Contoh: External users diberikan akses untuk bisa mengkopi data base perusahaan,
sebagai ganti dari laporan keuangan tradisional
DATABASE SYSTEMS AND THE FUTURE OF
ACCOUNTING
 Pengaruh adanya database dalam hal bagaimana informasi
akuntansi digunakan dalam pengambilan keputusan :
 The ability to accommodate multiple views of the same underlying
phenomenon.
 The ability to integrate financial and operational data.
LATIHAN

 Soal 4.3 (S& S)


 Soal 4.8 (Anomaly)

You might also like