Sistem Manajemen
Basis Data Web
Tim Penyusun :
Pengajar Universitas Gunadarma 2008
Outline
• Web sebagai Platform Aplikasi
Basis Data
• Data semi terstruktur
• Pengenalan XML
Internet
• Interconnected Networks
– Kumpulan dari jaringan komputer di seluruh dunia yg saling
ter-hubung via TCP(Transmission
Control Protocol), IP(Internet Protocol)
– TCP bertanggungjawab menjamin pengiriman pesan dari satu komputer dgn yg lain, secara benar.
– IP mengelola pengiriman dan
penerimaan paket data antara satu mesin dgn yg lain.
Sejarah Internet
• Mulai dibangun pada thn 60an & 70an oleh Departemen Pertahanan AS.
– disebut ARPANET (Advanced
Research Projects Agency NETwork)
– Poyek membangun jaringan yg dapat menahan serangan secara fisik.
• 1982: TCP/IP diadopsi sebagai protocol standar untuk ARPANET
• 1986: proyek dipindahkan dari militer ke pemerintahan/universitas dengan dana
National Science Foundation
– Disebut NSFNET (National Science
Intranet & Extranet
• Intranet : suatu web site atau kumpulan web site dari suatu
organisasi, yg dapat diakses hanya oleh anggota dari organisasi
tersebut (via firewall)
• Extranet : intranet yg dapat diakses sebagian oleh pengguna (diberi
eCommerce & eBusiness
• eCommerce
Pelanggan dapat menempatkan & membayar pesanan via web site • eBusiness
Integrasi yg lengkap dari tehnologi internet ke dalam infrastruktur ekonomi bisnis
• Ecosystem
Proses bisnis secara keseluruhan
Web
• Sistem berbasis hipermedia, yg menyediakan ‘point and click’ berarti browsing informasi pada internet menggunakan hyperlink
• Informasi pada halaman Web terdiri atas teks, grafik, gambar, & suara. • Terdapat pula hyperlink ke halaman
web lainnya, dimana pengguna dapat menelusuri dengan cara non-sekuensial melalui informasi.
• Dokumen2 web ditulis meng-gunakan HTML.
Web (lanj.)
• Web terdiri atas jaringan komputer yg dpt berperan sebagai
– Server, menyediakan informasi;
Contoh, Apache HTTP Server, Microsoft Internet Information Server, Netscape Enterprise Server, WebLogic Server & NCSA HTTPd
– Client (browsers), memohon informasi.
Contoh, Microsoft Internet Explorer, Netscape Navigator & NCSA Mosaic
Web (lanj.)
• Protocol yg mengatur pertukaran informasi antara server & browser web adalah HTTP
• Lokasi dengan dokumen2 diiden-tifikasikan sebagai URL.
HyperText Transfer Protocol
(HTTP)
• Protokol yg digunakan untuk men-transfer halaman web melalui
internet.
• Berbasis paradigma
request-response :
– Connection - Client berkoneksi dengan
Web server.
– Request - Client mengirim permohonan ke web server.
– Response – web server mengirim respon (dokumen HTML) pada client. – Close - Koneksi ditutup oleh web
MIME types
Multipurpose Internet Mail
Extensions
• Digunakan oleh HTTP header utk menentukan penanganan tipe
media yg multipel
• Contoh:
teks/html (dokumen html; *.html)
HTTP Request
HTTP header mengindikasikan :
1. Tipe permohonan
– GET: mendapat sumber yg diminta
– POST: mentransfer data ke data yg
posted data pada sumber tertentu
– HEAD: sama seperti GET tapi hanya
mengembalikan HTTP header
– PUT (HTTP/1.1): upload sumber ke
server
– DELETE (HTTP/1.1): menghapus
sumber dari server
– OPTIONS (HTTP/1.1):memohon
pilihan konfigurasi server
2. Nama sumber 3. Versi HTTP
HTTP Response
HTTP header mengindikasikan:
1. Versi HTTP 2. Status respon
3. Informasi utk mengontrol perilaku respon
HyperText Markup Language
(HTML)
• Bahasa yg memformat dokumen
digunakan utk merancang halaman web.
• Bahasa yg sederhana, punya
kekuatan, bahasa dokumen yg tidak bergantung pada platform tertentu. • HTML merupakan aplikasi dari
Standardized Generalized Markup Language (SGML), sistem yg
mendefinisikan tipe dokumen yg terstruktur & markup language utk merepresentasikan instance2 dari tipe2 dokumen tsb.
Uniform Resource Locators
(URLs)
• URL terdiri atas 3 bagian:
– protokol yg digunakan utk koneksi
– Nama host
– Nama path pada host dimana sumber disimpan.
• Can optionally specify:
– port through which connection to host should be made,
Kebutuhan Untuk Integrasi
Web-DBMS
• Kemampuan utk mengakses data yg berharga dengan cara yg aman. • Konektivitas data & vendor yg tidak
bergantung sehingga terdapat
kebebasan untuk memilih DBMS. • Ability to interface to database
independent of any proprietary browser or Web server.
• Connectivity solution that takes
advantage of all the features of an organization’s DBMS.
• Open architecture to allow
interoperability with a variety of systems and technologies. For example:
– different Web servers;
– Microsoft's (Distributed) Common Object
Model (DCOM/COM);
– CORBA/IIOP (Internet Inter-ORB protocol); – Java/Remote Method Invocation (RMI).
• Cost-effective solution that
allows for scalability, growth, and changes in strategic directions,
Arsitektur
Arsitektur
Three-Tier Client-Server
• Client side presented two
problems preventing true
scalability:
– ‘Fat’ client, requiring considerable resources on client’s computer to run effectively.
– Significant client side
administration overhead.
• Advantages:
– ‘Thin’ client, requiring less expensive hardware.
– Application maintenance centralized.
– Easier to modify or replace one tier without affecting others.
– Separating business logic from database functions makes it easier to implement load balancing.
Advantages of Web-DBMS
Approach
Web sebagai platform sistem basis data • DBMS advantages
• Simplicity
• Platform independence • Graphical User Interface • Standardization
• Cross-platform support
• Transparent network access • Scalable deployment
Disadvantages of Web-DBMS
Approach
• Reliability • Security • Cost • Scalability • Limited functionality of HTML • Statelessness • Bandwidth • PerformancePendekatan2 Untuk
Mengintegrasikan Web &
SMBD
• Scripting Languages.
• Common Gateway Interface (CGI). • HTTP Cookies.
• Extending the Web Server.
• Java, JDBC, SQLJ, Servlets, and JSP.
• Microsoft Web Solution Platform: ASP and ADO.
Scripting Languages
(JavaScript and VBScript)
• Scripting languages can be used to
extend browser and Web server with database functionality.
• As script code is embedded in HTML, it
is downloaded every time page is accessed.
• Updating browser is simply a matter of
changing Web document on server.
• Some popular scripting languages are:
JavaScript, VBScript, Perl, and PHP.
• They are interpreted languages, not
compiled, making it easy to create small applications.
Common Gateway Interface
(CGI)
• Specification for transferring
information between a Web server and a CGI program.
• Server only intelligent enough to
send documents and to tell browser what kind of document it is.
• But server also knows how to launch other programs.
• When server sees that URL points to a program (script), it executes
script and sends back script’s output to browser as if it were a file.
• CGI defines how scripts
communicate with Web servers. • A CGI script is any script designed
to accept and return data that
conforms to the CGI specification. • Before server launches script,
prepares number of environment variables representing current state of the server, who is requesting the information, and so on.
• Script picks this up and reads STDIN.
• Then performs necessary
processing and writes its output to STDOUT.
• Script responsible for sending MIME header, which allows browser to
differentiate between components. • CGI scripts can be written in almost
any language, provided it supports reading and writing of an operating system’s environment variables.
• CGI is the de facto standard
for interfacing Web servers
with external applications.
• Possibly most commonly
used method for interfacing
Web applications to data
sources.
• Advantages:
Keuntungan CGI
• Communication between client and database server must always go through Web server.
• Lack of efficiency and transaction support, and difficulty validating
user input inherited from statelessness of HTTP protocol.
• HTTP never intended for long exchanges or interactivity.
• Server has to generate a new process or thread for each CGI script.
HTTP Cookies
• Cookies can make CGI scripts more
interactive.
• Cookies are small text files stored on
Web client.
• CGI script creates cookie and has Web
server send it to client’s browser to store on hard disk.
• Later, when client revisits Web site and
uses a CGI script that requests this cookie, client’s browser sends information stored in the cookie.
• Cookies can be used to store
registration information or preferences (e.g. for virtual shopping cart).
Referensi
1. Korth, H.; Database System Concept,
Mc Graw Hill, 4th edition, New York, 2002