Anda di halaman 1dari 28

I.

Konsep dan Klasifikasi Sistem Basis


Data

1. Kebutuhan Sistem Basis Data

Sistem basis data adalah sebuah sistem yang terdiri dari kumpulan file
atau tabel dan saling berhubungan dan memungkinkan beberapa user untuk
mengakses dan memanipulasi file atau data.
Data yang terintegrasi dalam suatu sistem basis data akan memudahkan
pengelolaannya, pengolahan informasi dan pendistribusiannya.
Integrasi data dan kontrol data dapat diterapkan pada suatu sistem yang
terpusat, dan dapat juga diterapkan pada system yang tersebar atau
terdistribusi.

Integrasi dan kendali data dalam system basis data, antara lain mesti
memenuhi fungsi-fungsi berikut :
a) Mengklasifikasikan data agar mudah digunakan dan dipahami
oleh user b) Menghindari adanya duplikasi data
c) Memudahkan proses penyimpanan dan pengaksesan data
d) Mendukung kinerja aplikasi dalam proses
penyimpanan data e) Menjamin kualitas data dan
informasi

2. Perbedaan Antara Basis Data Terdistribusi dan Basis Data Terpusat

Basis data terpusat adalah basis data tempat data disimpan dan dipelihara dalam
satu lokasi. Ini adalah pendekatan tradisional untuk menyimpan data di
perusahaan besar.Jadi istem basis data terpusat merupakan kebalikan dari
sebuah sistem basis data terdistribusi, dimana dalam sebuah sistem basis data
terpusat, sebuah server yang menyediakan informasi di dalam basis data
hanya terdiri dari satu sever saja, sebagai pusat dan juga sebagai komputer
induk bagi seluruh sistem dan juga jaringna yang ada
Sedangkan Basis data terdistribusi adalah basis data di mana data
disimpan dalam perangkat penyimpanan yang tidak terletak di lokasi fisik yang
sama tetapi basis data dikendalikan menggunakan Sistem Manajemen
Database pusat (DBMS).

Sistem Basis Data Terpusat Sistem Basis Data Terdistribusi

• Basis data dan system manajemen • Basis data disimpan di perangkat

basis data tersimpan di perangkat penyimpanan yang mungkin berada

penyimpanan yang berada di satu di lokasi geografis yang berbeda

lokasi yang terhubung ke sistem dan dikelola menggunakan DBMS

server. yang terdapat di server pusat

• Lebih mudah untuk memelihara • membutuhkan pekerjaan tambahan

dan diperbarui karena semua data dan perangkat lunak tambahan

disimpan dalam satu lokasi. untuk menjaga data terbaru dalam


sistem basis data terdistribusi
• Lebih mudah mempertahankan
integritas data dan menghindari • meningkatkan biaya pemeliharaan

persyaratan untuk duplikasi data dan kompleksitas

• Semua permintaan yang datang • resiko penumpukan akses dapat

untuk mengakses data diproses dikurangi karena pengaksesan

oleh entitas tunggal (sistem server basis data berjalan secara paralel,

tunggal), sehingga terdapat resiko sehingga pembebanan seimbang

penumpukan akses (data traffic antara beberapa server

jam)
• rencangan basis data lebih • rencangan basis data lebih

sederhana kompleks

3.Klasifikasi Sistem Basis Data

suatu model tertentu menunjukkan struktur logis dari suatu basis data,
yang merupakan sekumpulan dari berbagai perangkat konseptual yang digunakan
untuk menggambarkan suatu data, semantik data, relasi data, batasan data yang
menentukan bagaimana data dapat disimpan dan diakses.Basis data
spasial mendeskripsikan sekumpulan entity baik yang memiliki lokasi atau posisi yang
tetap maupun yang tidak tetap (memiliki kecenderungan buntuk berubah, bergerak, atau
berkembang).ssssd
Tipe-tipe entity spasial ini memiliki properties topografi dasar yang meliputi
dd
lokasi, dimensi dan bentuk (shape).

Data Flat Sistem Basis Data


Sistem Basis Data

Basis Data Terpusat Basis Data Terdistribusi

Model Hierarki
BDT Terpartisi
Model Jaringan
(Mash Database) BDT Terreplikasi

Model Relasional
SISTEM JARINGAN KOMPUTER
1.Local Area Network (LAN)

Jaringan wilayah lokal atau Local Area Network (LAN) jaringan computer yang berbasis
pada teknologi IEEE 802.3 Ethernet menggunakan perangkat switch, yang mempunyai
kecepatan transfer data 10, 100, atau 1000 Mbit/s, hingga 2,5 Gbit/s ( ATM ) dan memiliki
keandalan data yang baik.

Metropolitan Area Network


(MAN)
Jaringan wilayah metropolitan atau Metropolitan Area Network (MAN) merupakan
jaringan yang tepat untuk membangun jaringan antar kantor kantor dalam satu
kota antara pabrik/instansi dan kantor pusat yang berada dalam antar 10
hingga 50 km jangkauannya dalam suatu kota dengan transfer data
berkecepatan tinggi, yang menghubungkan berbagai lokasi seperti kampus,
perkantoran, pemerintahan, dan sebagainya.
Wide Area Network
(WAN)
Jaringan wilayah luas atau Wide Area Network digunakan untuk
menghubungkan jaringan area lokal yang satu dengan jaringan lokal yang lain,
sehingga pengguna atau komputer di lokasi yang satu dapat berkomunikasi
dengan pengguna dan komputer di lokasi yang lain yang mencakup area yang
besar sebagai contoh yaitu jaringan komputer antar wilayah, kota atau bahkan
negara dan saluran komunikasi publik.

Personal Area Network (PAN)


Jaringan personal atau Personal Area Network (PAN) jaringan computer
menghubungkan antara dua atau lebih sistem komputer yang berjarak sangat berdekatan, yaitu hanya berjarak
4 sampai 6 meter.
2. Jaringan Komputer Berdasarkan Fungsinya

a) Client Server

Klien-server atau client-server merupakan sebuah paradigma dalam


teknologi informasi yang merujuk kepada cara untuk mendistribusikan aplikasi ke
dalam dua pihak yaitu pihak klien dan pihak server.

b) Peer to Peer

Pada jaringan peer to peer tidak ada komputer server ataupun komputer
client, karena setiap komputer pada jaringan peer to peer bisa menyediakan
layanan (fungsi server) dan menjadi pengakses layanan (fungsi client).

3. Klasifikasi jaringan komputer berdasarkan topologi jaringan

topologi jaringan didasarkan pada kecepatan akses data, biaya serta


ukuran maupun tingkat konektivitas yang nantinya akan mempengaruhi kualitas
maupun efiensi suatu jaringan. Berikut jenis -jenis topologi jaringan :

Topologi
Liner
Jaringan komputer dengan topologi runtut (linear topology) biasa disebut
dengan topologi bus beruntut, tata letak ini termasuk tata letak umum. Satu kabel
utama menghubungkan tiap titik sambungan (komputer) yang dihubungkan
dengan penyambung yang disebut dengan Penyambung-T dan pada ujungnya
harus diakhiri dengan sebuah penamat (terminator )

Topologi Bus
Topologi bus merupakan topologi yang banyak digunakan pada masa
penggunaan kabel sepaksi menjamur. Dengan menggunakan T-Connector
(dengan terminator 50ohm pada ujung network), maka komputer atau
perangkat jaringan lainnya bisa dengan mudah dihubungkan satu sama lain.

Topologi Star
Topologi star atau topologi bintang merupakan bentuk topologi jaringan
yang berupa konvergensi dari node tengah ke setiap node atau pengguna.
Topologi jaringan bintang termasuk topologi jaringan dengan biaya menengah.
Topologi ini didesain di mana setiap node (file server, workstation dan perangkat
lainnya) terkoneksi ke jaringan melewati sebuah hub/switch

Topologi Ring
Topologi ring atau topologi cincin adalah topologi jaringan berbentuk
rangkaian titik yang masing-masing terhubung ke dua titik lainnya, sedemikian
sehingga membentuk jalur melingkar membentuk cincin. Pada topologi cincin,
masing-masing titik/node berfungsi sebagai repeater yang akan memperkuat
sinyal disepanjang sirkulasinya, artinya masing-masing perangkat saling
bekerjasama untuk menerima sinyal dari perangkat sebelumnya

Topologi Mesh
Topologi jala atau topologi mesh adalah suatu bentuk hubungan antar
perangkat dimana setiap perangkat terhubung secara langsung ke perangkat
lainnya yang ada di dalam jaringan.

Topologi Tree
Topologi tree atau topologi pohon adalah kombinasi karakteristik antara
topologi bintang dan topologi bus. Topologi ini terdiri atas kumpulan topologi
bintang yang dihubungkan dalam satu topologi bus sebagai jalur tulang
punggung atau backbone. Komputer-komputer dihubungkan ke hub, sedangkan
hub lain di hubungkan sebagai jalur tulang punggung.
Distributed Database Systems
4.1 Foundations of DDBS
Architecture & Data Distribution

DBMS−Inst
ance
Node
Node

Networ
k

Node
Node

Dimensions
Heteroge
neity

Centralized DBS
Client/ Autonomy
Server−DB Distributed DBS
S
Distribution
Global conzeptual schema (GCS)
– Logical structure of overall DB
– Supported by all nodes
– Ensures transparency

• Global distribution schema (GDS)


– Describes fragmentation, replication, allocation
Global Global Replica
Query Catalog Management
Processing Management
global
Component Global
Global Global
Transaction
Recovery Management Synchronisation

local
"normal DBMS"
Component

Global & Local Components


Now that we have created our first component, let’s talk a bit about
global and local components. A global component is a component that
can be used anywhere in an application, including within other
components. On the other hand, a local component is a component that is
not registered globally, and can therefore only be used on components
where it is registered. You will see this in action in a moment.

Syntak:
Vue.component('contact-us', { data: function() { return { email:
'info@mycompany.com' }; }, template: ` <div> <h1>Contact Us</h1> <p>Please
send an e-mail to: {{ email }}</p> </div> ` }); new Vue({ el: '#app', });

This component is actually a global component, because we registered it


with the component method on the global Vue object. 

var contactUs = { data: function() { return { email: 'info@mycompany.com' };


}, template: ` <div> <h1>Contact Us</h1> <p>Please send an e-mail to:
{{ email }}</p> </div> ` };

Then within the Vue instance, we can add a components property


with the components that we want to register locally.
new Vue({ el: '#app', components: { 'contact-us': contactUs } });
Notice that in this example, I have added the components property to
a Vue instance, but I could just as well have added it to another
component. If you were to run the code, you would see the component
working. But just to prove that the component is indeed local and not
globally available, I will add another Vue instance and change the
selector of the existing one.
new Vue({ el: '#app1', components: { 'contact-us': contactUs } }); new Vue({
el: '#app2', });
<div id="app1"> <contact-us></contact-us> </div> <div id="app2"> <contact-
us></contact-us> </div>

Catalog Management
Catalog Management

• Catalog: collection of metadata (schema, statistics, access rights, etc.)


– Local catalog
∗ Identical to catalog of a centralized DBS
∗ consistes of LIS and LCS
– Global ctalaog
∗ Also contains GCS and GDS
∗ System-wide management of users and access rights
• Storage
– Local catalog: on each node
– Global catalog: centralized, replicated, or partitioned

Global Catalog /1

• Centralized: one instance of global catalog managed by central node


– Advantages: only one update operation required, litte space consumption
– Disadvantages: request for each query, potential bottleneck, critical ressource

• Replicated: full copy of global catalog stored on each node


– Advantage: low communication overhead during queries, availabilty
– Disadvantage: high overhead for updates

• Mix- form: cluster-catalog with centralized catalog for certain clusters of nodes

Global Catalog /2

• Partitioned: (relevant) part of the catalog is stored on each node


– No explicit GCS union of LCS
– Partitioned GDS by extend object (relations, etc.) names (see System R*)
Catalog Management
Catalogue management “is the process of suppliers enabling electronic
product content to be made available to buying organisations in order for them to
procure goods electronically” and where the product content can be hosted by either
the supplier or the buyer

• Catalog: collection of metadata (schema, statistics, access rights, etc.)


– Local catalog
∗ Identical to catalog of a centralized DBS
∗ consistes of LIS and LCS
– Global ctalaog
∗ Also contains GCS and GDS
∗ System-wide management of users and access rights

• Storage
– Local catalog: on each node
– Global catalog: centralized, replicated, or partitioned

Global Catalog /1

• Centralized: one instance of global catalog managed by central node


– Advantages: only one update operation required, litte space consumption
– Disadvantages: request for each query, potential bottleneck, critical ressource

• Replicated: full copy of global catalog stored on each node


– Advantage: low communication overhead during queries, availabilty
– Disadvantage: high overhead for updates

• Mix- form: cluster-catalog with centralized catalog for certain clusters of nodes

Global Catalog /2

• Partitioned: (relevant) part of the catalog is stored on each node


– No explicit GCS union of LCS
– Partitioned GDS by extend object (relations, etc.) names (see System R*)

DB Object Name Management

• Task: identification of relations, views, procedures, etc.

• Typical schema object names in RDBMS: [<username>.]<objectname>


• Requirement global uniqueness in DDBS
– Name Server approach: management of names in centralized catalog
– Hierarchic Naming: enrich object name with node name
[[<nodename>.]<username>.]<objectname>
∗ Node name: birth site (or simplification via alias)
When global object names are used in a distributed database, either explicitly or
indirectly within a synonym, the local database resolves the reference locally. For example, it
resolves a synonym to global object name of a remote table. The partially resolved statement
is shipped to the remote database, and the remote database completes the resolution of the
object as described here.

Because of how the database resolves references, it is possible for an object to depend on the
nonexistence of other objects. This situation occurs when the dependent object uses a
reference that would be interpreted differently were another object present. For example,
assume the following:

 At the current point in time, the company schema contains a table named emp.


 A PUBLIC synonym named emp is created for company.emp and the SELECT privilege
for company.emp is granted to the PUBLIC role.
 The jward schema does not contain a table or private synonym named emp.
 The user jward creates a view in his schema with the following statement:
 CREATE VIEW dept_salaries AS

 SELECT deptno, MIN(sal), AVG(sal), MAX(sal) FROM emp

 GROUP BY deptno

 ORDER BY deptno;

When jward creates the dept_salaries view, the reference to emp is resolved by first


looking for jward.emp as a table, view, or private synonym, none of which is found, and then
as a public synonym named emp, which is found. As a result, the database notes
that jward.dept_salaries depends on the nonexistence of jward.emp and on the
existence of public.emp.

Now assume that jward decides to create a new view named emp in his schema using the
following statement:

CREATE VIEW emp AS

SELECT empno, ename, mgr, deptno

FROM company.emp;

Notice that jward.emp does not have the same structure as company.emp.

As it attempts to resolve references in object definitions, the database internally makes note of
dependencies that the new dependent object has on "nonexistent" objects--schema objects
that, if they existed, would change the interpretation of the object's definition. Such
dependencies must be noted in case a nonexistent object is later created. If a nonexistent
object is created, all dependent objects must be invalidated so that dependent objects can be
recompiled and verified and all dependent function-based indexes must be marked unusable.

Therefore, in the previous example, as jward.emp is created, jward.dept_salaries is


invalidated because it depends on jward.emp. Then when jward.dept_salaries is used,
the database attempts to recompile the view. As the database resolves the reference to emp, it
finds jward.emp (public.emp is no longer the referenced object). Because jward.emp does
not have a sal column, the database finds errors when replacing the view, leaving it invalid.
DDBS Design: Fragmentation
Database Distribution

• In Shared-Nothing-Systems (DDBS): definition of physical distribution of data

• Impact:
– Communication efforts overall performance
– Load balancing
– Availability

Bottom Up vs. Top Down

• Bottom Up
– Subsumption of local conceptual schemata (LCS) into global conceptual
schema (GCS)
– Integration of existing DB schema integration (Federated DBS)

• Top Down
– GCS of local DB designed first
– Distribution of schema to different nodes
– Distribution Design

Distribution Design Tasks


R1
R1 Node 1
R2.1

R2

R3
Node 2

R3
R4.1

R4
R2.2
Node 3

R4.2

Primary Horizontal Fragmentation

• "‘Tupel-wise"’ decomposition of a global relation R into n fragments Ri

• Defined by n selection predicates Pi on attributes from R

Ri := σPi (R) (1 ≤ i ≤ n)

• Pi : fragmentation predicates

• Completeness: each tuple from R must be assigned to a fragment

• Disjointness: decomposition into disjoint fragments Ri ∩ Rj = ∅ (1 ≤ i, j ≤


n, i = j),
[
• Reconstructability: R = Ri
1≤i≤n
Primary Horizontal Fragmentation /2

• Example: fragmentation of P ROJ ECT by predicate on location attribute "‘Loc"’

P ROJECT1 = σLoc=’M’ (P ROJ ECT)


P ROJECT2 = σLoc=’B’ (P ROJECT)
P ROJECT3 = σLoc=’MD’ (P ROJ
ECT )
P ROJECT1 P ROJECT2
PNr PName Budget Loc
P2 Hardware Dev. 150.000 M PNr PName Budget Loc
P4 Customizing 250.000 B
PNr PName Budget Loc
P ROJECT3 P1 DB Development 200.000 MD
P3 Web-Design 100.000 MD

Hybrid Fragmentation

• Fragment of a relation → is relation itself


• Can be subject of further fragmentation

• Also possible: combination of horizontal and vertical fragmentation


PROJECT

vertical
P ROJECT1= πPNr, PName, Loc (P ROJ
EC T) P ROJECT2= πPNr, Budget
(P ROJECT) P ROJECT1=,σ1Loc=’M’ PROJECT 1 PROJEC
(P ROJECT1 ) P ROJECT2=,σ1Loc=’B’
(P ROJECT1 )
horizontal
P ROJECT3=,σ1Loc=’MD’ (P ROJ ECT1
)

PROJECT 1,1PROJECT 1,2

Fragmentation transparency

• Decomposition of a relation is for user/application not visble

• Only view on global relation


• Requires mapping of DB operations to fragments by DDBMS

• Example
– Transparent: select * from Project where PNr=P1
select * from Project1 where PNr=P1
if not-found then
– Without transparency: select * from Project2 where PNr=P1
if not-found then
select * from Project3 where PNr=P1

Fragmentation transparency /2

• Example (continued)
– Transparent: update Project set Ort=’B’ where PNr=P3
select PNr, PName, Budget
into :PNr, :PName, :Budget
from Project3 where PNr=P3
– Without transparency:
insert into Project2
values (:PNr, :PName, :Budget, ’B’)
delete from Project3 where PNr=P3

My Android application launches into BeginActivity which is a subclass of


SherlockFragmentActivity and shows it's first view using:

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

if (getSupportFragmentManager().findFragmentById(android.R.id.content) == null) {
Fragment f = LoginFragment.newInstance();

getSupportFragmentManager()
.beginTransaction()
.add(android.R.id.content, f, "loginfragment")
.attach(f)
.commit();
}
}

Algorithm H ORIZ F RAGM ENT

forall p ∈ P do
Q0 := Q ∪ {p}
compute M (Q0 ) and F (Q0 )
compare F (Q0 ) with F (Q)
if F (Q0 ) significant improvement over F (Q) then
Q := Q0
forall q ∈ Q \ {p} do /* unnecessary Fragmentation? */
Q0 := Q \ {q}
compute M (Q0 ) and F (Q0 )
compare F (Q0 ) with F (Q)
if F (Q) no significant improvement over F (Q0 ) then
Q := Q0 /* d.h., remove q from Q */
end
end
end
Here is my XML:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
android:layout_marginBottom="48dp"
android:onClick="goToAttract"
android:text="Button" /></RelativeLayout>
Database Design
database is a carefully designed and constructed repository of
facts and is part of larger whole known as an information system.
An IS provides for data collection, storage, and retrieval.
IS also facilitates the transformation of data into information and
the management of both data and information.
Components of an information system:
People
Hardware
Software
Database(s)
Application programs
Procedures
The Systems Development Life Cycle
The Systems Development Life Cycle (SDLC) traces
the history (life cycle) of an IS.
Database design takes place within the confines of an
IS
Five phases of SDLC: (Figure 6.2)
Planning

Analysis

Detailed Systems Design

Implementation
Maintenanc
The Systems Development Life Cycle

Planning
The planning phase yields a general overview of the company and
its objectives.
A feasibility study must address the following
issues if a new system is necessary:
Technical aspects of hardware and software requirements.
The system cost.

Analysis

Problems defined during the planning phase are examined in


greater detail:
What are the precise requirements of the current system’s end users?
The analysis phase is a thorough audit of user requirements.
The existing hardware and software are studied.
End users and system designer(s) work together to
identify processes and potential problem areas.

System design tools:


– Data flow diagram (DFD)
– Hierarchical input process and output (HIPO)
– Entity Relationship (E-R) diagrams

Implementation
The hardware, the DBMS software, and application programs
are installed; and the database design is implemented
The database is created, and the system is customized.
The database contents are loaded.
The system is subjected to exhaustive testing. The final
documentation is reviewed and printed.
End users are trained.

Maintenance
End users’ requests for changes generate system
maintenance activities
Three types of system maintenance:
Corrective maintenance in response to systems
errors.
Adaptive maintenance due to changes in the business
environment.
Perfective maintenance to enhance the system.
The Database Life Cycle
Analyze the Company Situation
What is the organization’s general operating
environment, & what is its mission within that
environment?

Define Problems and Constraints


How does the existing system
function? What input does the
system require? What documents
does the system generate?

Entity Relationship Modeling


and Normalization
1.Define entities, attributes, primary keys, and
foreign
Keys
Make decisions about the treatment of
multivalued attributes.

Make decisions about adding


derived attributes to satisfy
processing requirements

Anda mungkin juga menyukai