Date post: | 04-Jan-2016 |
Category: |
Documents |
Upload: | fazar-ikhwan-guntarra |
View: | 213 times |
Download: | 0 times |
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
1
Sistem dan Teknologi Basis Data Sub Perancangan Basis Data
[Basis Data dan Sistem Basis Data]
ASEP WAHYUDIN,S.KOM, M.T.
FKOM
Universitas Kuningan
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
2
Mukadimah
Model Data
Penting dan harus baik
Basis Data Representasi dijital dari kenyataan fisik dan lojik dari sebuah
sistem.
Transformasi dunia nyata dari sebuah sistem tiak sesederhana
kata-kata mutiara perlu media antara
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
3
Basis Data ?
..arsip...
Ini
Arsip
Ini
Arsip
Bundel..
Kelompokan..
Sampul beda warna…
Ditempatkan terurut
berdasarkan apa
(kronologis?)
Supaya mudah dan cepat mencari….
Supaya mudah dan cepat mengambil kembali…
Ini
Arsip
Ini
Kelompok Arsip
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
4
Definisi
Basis Sarang, tempat berkumpul, pangkalan
Data Representasi dunia nyata yang mewakili suatu objek
(manusia –mahasiswa, pegawai, konsumen, ..-, hewan,
barang, konsep, keadaan dsb.)
Basis Data Himpunan kelompok data (file/tabel) yang saling
berhubungan dan diorganisasi sedemikian rupa, disimpan
dalam media penyimpanan elektronis agar suatu saat nanti
dapat digunakan kembali dengan lebih cepat dan mudah.
Prinsip Utama Pengaturan Data (data management)
--pemilahan dan pengelompokan data sesuai dengan jenis
dan fungsi--
Tujuan Utama Kemudahan dan Kecepatan dalam pengambilan data (data
retrieval)
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
5
Perancangan Basis Data
Merupakan proses untuk merepresentasikan fakta dunia nyata (real world)
yang dikehendaki ke dalam sistem komputer, sehingga mudah dipahami
pemakai dengan mempertimbangkan kemudahan implementasi dan
pemrosesannya
Isitilah ‘dunia nyata’ (real world) bermakna terhadap keseluruhan
data yang belum terstruktur yang secara nyata ada/terkait dalam
lingkup sistem yag sedang ditinjau.
Contoh : dunia nyata bagi sistem perbankan tidak sama dengan
dunia nyata bagi sistem perkuliahan.
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
6
Perancangan Basis Data
Faktor penting yang menyangkut pemodelan data yang berasal dari dunia nyata
adalah :
1. Ada struktur (keteraturan) data yang akan disimpan dan bagaimana struktur
data yang akan diimplementasikan ke dalam sebuah basis data secara fisik.
2. Karakterisitk dari data yang akan disimpan sudah jelas.
Contoh :
Dalam sistem perkuliahan misalnya ada : mahasiswa, dosen, kurikulum,
ruangan, penilaian, ujian.
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
7
Tujuan Perancangan Basis Data
1. Memenuhi kebutuhan informasi pada saat ini dan akan datang
2. Kemudahan pengembangan sesuai dengan perkembangan organisasi
3. Penerapan mekanisme pengamanan data
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
8
Metodologi Perancangan Basis Data
1. Merupakan cara bagaimana suatu basis data dibuat melalui tahap-tahap
tertentu, mulai dari tahap investigasi masalah sampai tahap implementasinya.
2. Secara umum ada dua tahapan proses perancangan basis data, yaitu :
• Perancangan logika basis data
• Perancangan fisik basis data
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
9
Perancangan Logika Basis Data
Merupakan proses pendefinisian entitas dan relasi (relationship) dari dunia nyata
yang dirancang, berdasarkan kebutuhan informasi dan pengolahan data dari
organisasi yang bersangkutan.
• Entity / entitas adalah sekumpulan objek yang dapat diidentifikasi dan
dibedakan di lingkungan pemakai
• Relasi adalah hubungan yang terjadi antar kelompok entitas.
Sasaran dari perancangan logika basis data adalah fleksibilitas model data yang
dihasilkan dan efisiensi pengimplementasiannya dalam komputer.
Model data :
Adalah suatu kumpulan alat konseptual untuk menggambarkan data, hubungan data,
semantik (makna) data dan batasan data dari dunia nyata yang akan
diimplementasikan dalam sistem komputer tanpa tergantung kepada software dan
jenis komputernya.
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
10
Perancangan Fisik Basis Data
Merupakan proses untuk mengimplementasikan hasil perancangan logika ke
dalam komputer secara fisik yang bergantung kepada software DBMS yang
dipilih.
Proses yang dilakukan :
1. Menentukan struktur utk setiap tabel, meliputi nama field, jenis, lebar dan field
kuncinya.
2. Menentukan nama basis data dan nama setiap tabel, serta lokasi tempat
penyimpanannya (drive, directory / folder).
3. Menghitung perkiraan tempat (space) yg dibutuhkan utk seluruh tabel dan utk
seluruh index.
4. Implementasi dengan menggunakan software DBMS.
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
11
Metodologi Perancangan Basis Data Relationship
Terdapat dua pendekatan dalam perancangannya :
1. Pendekatan Konvensional
2. Pendekatan Entity-Relationship
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
12
Metodologi Perancangan Basis Data Relationship
1. Pendekatan Konvensional
Realworld Model
Data
Relasi
Skema
Basis
Data
Basis
Data
Pembuatan
model relasi Normaslisasi Implementasi
melalui
DBMS
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
13
Metodologi Perancangan Basis Data Relationship
2. Pendekatan Entity-Relationship
Realworld Model
Data
E-R
Skema
Basis
Data
Basis
Data
Pembuatan
model
konseptual
Implementasi
melalui
DBMS
Model
Data
Relasi
Tranformasi
menjadi model
relasi Normaslisasi Implementasi melalui
DBMS :
• Struktur tabel
• Atribut kunci
• Aturan integritas
• Relasi antar
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
14
Operasi Dasar
Basis Data Mewakili sebuah semesta data yang spesifik (basis data
keuangan, basis data asset dan fasilitas, basis data
kepegawaian, dsb)
- create database
- drop database
- create table
- drop table
- insert
- retrieve / search
- update
- delete
Operasi Dasar
Sebagai operasi awal Basis Data, dilakukan sekali.
Selebihnya adalah operasi rutin yang berkaitan dengan Data management dan
data processing.
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
15
Tujuan Basis Data
Speed Kecepatan dan kemudahan pencarian dan pengambilan
kembali data
Space Efesiensi dan optimalisasi ruang penyimpanan, dengan
tidak memunculkan redudansi yang tidak penting.
Accuracy Keakuratan/terbebas dari kesalahan, dengan menerapkan
standar integritas data yang tinggi
Availability Tingkat ketersidaan data yang tinggi. Memilah data
(master/induk/referensi/transaksi), offline dan online /
backup sistem, distribusi data.
Completeness Kelengkapan data (elastisitas dalam penambahan struktur
tabel)
Security Aspek keamanan data, dengan menentukan dan
menerapkan struktur hak akses pengguna, dsb.
Sharability Prinsip kebersamaan pemakai. Bahwa satu basis data
dapat dipakai dalam kontek yang berbeda
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
16
Basis Data
Sistem Basis Data ?
Program Aplikasi (Software)
Sistem Basis Data
• Hardware
• Operating System
• Database
• Aplikasi Pengelola Database (DBMS)
• User
• Aplkasi Lain (optional)
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
17
Sistem Basis Data ?
Database Applications:
– Banking: all transactions
– Universities: registration, grades
– Sales: customers, products, purchases
Date, C.J., An Introduction to Database System , 7 th edition, Addison Wesley, 2000
Silberschatz, A., Korth, H. F., Sudarshan, S., Database System Concepts, 3 rd edition, McGraw -Hill, 1999
Collection of interralated data Set of programs to access the data DBMS contains information about particular enterprise DBMS provides an environment that is both convenient and efficient to use Databases touch all aspects of our lives
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
18
Tujuan Sistem Basis Data
Drawbacks of using file systems to store data:
– Data redundancy and inconsistency
(format file yang beragam, duplikasi informasi di file yang berbeda)
– Difficulty in accessing data
(diperlukan pembuatan program baru setiap pelaksanaan tugas baru)
– Data isolation (multiple files and formats)
– Integrity problems
– Atomicity of updates
– Concurrent access by multiple users
– Security problems
Date, C.J., An Introduction to Database System , 7 th edition, Addison Wesley, 2000
Silberschatz, A., Korth, H. F., Sudarshan, S., Database System Concepts, 3 rd edition, McGraw -Hill, 1999
In the early days, database applications were built on top of file systems
Database systems offer solutions to all the above problems
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
19
Level of Abstraction
• Physical level:
– describes how a record (e.g., customer) is stored.
– detailed description of data structure.
• Logical level:
– describes data stored in database (abstract representation), and the
relationships among the data.
– used by DBAs .
• View level:
– application programs hide details of data types. Views can also hide
information (e.g., salary) for security purposes.
– used by users. View Level
View 1 View 1 View 1
Logical
level
Phisica
l level
Date, C.J., An Introduction to Database System , 7 th edition, Addison Wesley, 2000
Silberschatz, A., Korth, H. F., Sudarshan, S., Database System Concepts, 3 rd edition, McGraw -Hill, 1999
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
20
Instances dan Schemas
Similar to types and variables in programming languages
• Schema
– the logical structure of the database
(e.g., database yang berisi informasi tentang nasabah dan rekening serta
hubungan antara keduanya)
– Physical & Logical schema
(PDM dan CDM)
• Instance
– the actual content of the database at a particular point in time
(sama dengan nilai pada suatu variabel)
• Physical Data Independence
– the ability to modify the physical schema without changing the logical
schema
– Applications depend on the logical schema
Date, C.J., An Introduction to Database System , 7 th edition, Addison Wesley, 2000
Silberschatz, A., Korth, H. F., Sudarshan, S., Database System Concepts, 3 rd edition, McGraw -Hill, 1999
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
21
Database Language
• Specification notation for defining the database schema
– e.g.
create table rekening ( no_rekening char(10),
saldo integer)
• DDL compiler generates a set of tables stored in a data dictionary
• Data dictionary contains metadata (i.e., data about data)
Data Definition Language (DDL)
Date, C.J., An Introduction to Database System , 7 th edition, Addison Wesley, 2000
Silberschatz, A., Korth, H. F., Sudarshan, S., Database System Concepts, 3 rd edition, McGraw -Hill, 1999
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
22
Database Language
• Language for accessing and manipulating the data organized by the
appropriate data model
– DML also known as query language
• Two classes of languages
– Procedural
(user specifies what data is required and how to get those data)
– Nonprocedural
(user specifies what data is required without specifying how to get
those data)
• SQL is the most widely used query language
Data Manipulation Language (DML)
Date, C.J., An Introduction to Database System , 7 th edition, Addison Wesley, 2000
Silberschatz, A., Korth, H. F., Sudarshan, S., Database System Concepts, 3 rd edition, McGraw -Hill, 1999
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
23
Database Language
• SQL: widely used non-procedural language
– e.g. find the name of the customer with customer-id 192-83-7465
select customer.customer-name
from customer
where customer.customer-id = ‘192-83- 7465’
• Application programs generally access databases through one of
– Language extensions to allow embedded SQL
– Application program interface (e.g. ODBC/JDBC) which allow SQL
queries to be sent to a database
SQL
Date, C.J., An Introduction to Database System , 7 th edition, Addison Wesley, 2000
Silberschatz, A., Korth, H. F., Sudarshan, S., Database System Concepts, 3 rd edition, McGraw -Hill, 1999
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
24
Database User
• Users are differentiated by the way they expect to interact with the system:
– Application programmers
interact with system through DML calls
– Sophisticated users (user mahir)
form requests in a database query language
– Specialized users (user khusus)
write specialized database applications that do not fit into the traditional
data processing framework (untuk keperluan khusus, misalnya untuk
aplikasi sistem pakar, dll)
– Naive users (user umum/end user)
invoke one of the permanent application programs that have been
written previously
Date, C.J., An Introduction to Database System , 7 th edition, Addison Wesley, 2000
Silberschatz, A., Korth, H. F., Sudarshan, S., Database System Concepts, 3 rd edition, McGraw -Hill, 1999
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
25
Database Administrator
• Coordinates all the activities of the database system;
• The database administrator has a good understanding of the enterprise ’ s
information resources and needs.
• Database administrator's duties include:
– Schema definition
– Storage structure
– Schema & physical organization modification
– Granting user authority to access DB
– Specifying integrity constraints
Date, C.J., An Introduction to Database System , 7 th edition, Addison Wesley, 2000
Silberschatz, A., Korth, H. F., Sudarshan, S., Database System Concepts, 3 rd edition, McGraw -Hill, 1999
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
26
Transaction Management
• A transaction is a collection of operations that performs a single logical
function in a database application
• Transaction-management component ensures that the database remains in a
consistent (correct) state despite system failures
(e.g., power failures and operating system crashes) and transaction failures.
• Concurrency-control manager controls the interaction among the concurrent
transactions, to ensure the consistency of the database.
Date, C.J., An Introduction to Database System , 7 th edition, Addison Wesley, 2000
Silberschatz, A., Korth, H. F., Sudarshan, S., Database System Concepts, 3 rd edition, McGraw -Hill, 1999
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
27
DBMS
Struktur SBD
naive User application Programmer DBA sophisticated User
Prog. aplikasi system calls query Skema BD
DML
precompiler
Query
processor
DDL
compiler
Kode Program
Aplikasi
Database
manager
File manager
File Data
Kamus Data
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
28
Arsitektur Aplikasi
Date, C.J., An Introduction to Database System , 7 th edition, Addison Wesley, 2000
Silberschatz, A., Korth, H. F., Sudarshan, S., Database System Concepts, 3 rd edition, McGraw -Hill, 1999
application
Database system
user
network
Application client
Database system
user client
Application server server
two-tier architecture three-tier architecture
Two- tier architecture : E.g. client programs using ODBC/JDBC to communicate
with a database
Three-tier architecture : E.g. web- based applications, and applications built
using “ middleware ”
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
29
Konklusi
• Penerapan Basis Data, dalam bidang apa saja ?
• Industri/organisasi bisnis yang memanfaatkan
basis data ?
• Pertanyaan ?
Informatika / FIK - UNIKU
.:: PERANCANGAN BASIS DATA .:. Asep Wahyudin, S.KOM, M.T. (DLB) ::.
Halaman : UNIVERSITAS KUNINGAN
30
? selesai