Database Application Design February 18, 2000 Handout #7 (C) 2000, The

Download Report

Transcript Database Application Design February 18, 2000 Handout #7 (C) 2000, The

February 18, 2000
Database Application Design
Handout #7
(C) 2000, The
University of Michigan
1
Course information
•
•
•
•
•
•
Instructor: Dragomir R. Radev ([email protected])
Office: 305A, West Hall
Phone: (734) 615-5225
Office hours: Thursdays 3-4 and Fridays 1-2
Course page: http://www.si.umich.edu/~radev/654w00
Class meets on Fridays, 2:30 - 5:30 PM, 311 WH
(C) 2000, The
University of Michigan
2
E-R design using ERWin
(C) 2000, The
University of Michigan
3
E-R Win
• Logical and Physical Display
• Connection to different DBMS servers
including Oracle, Access, MS SQL Server,
etc.
(C) 2000, The
University of Michigan
4
Database applications using
Internet Technology
(C) 2000, The
University of Michigan
5
The Internet
•
•
•
•
TCP/IP
WWW
HTTP
HTML/SGML
(C) 2000, The
University of Michigan
6
<HTML>
<HEAD>
<TITLE>Newspapers</TITLE>
</HEAD>
<BODY>
<H1>Newspapers</H1>
<H2>American</H2>
<UL>
<LI><A
<LI><A
<LI><A
<LI><A
</UL>
HREF="http://www.nytimes.com">New York Times</A>
HREF="http://www.washingtonpost.com">Washington Post</A>
HREF="http://www.chicagotribune.com">Chicago Tribune</A>
HREF="http://www.freep.com">Detroit Free Press</A>
<H2>Foreign</H2>
<UL>
<LI><A HREF="http://www.lemonde.fr">Le Monde</A>
<LI><A HREF="http://www.clarin.com">Clar&iacute;n</A>
<LI><A HREF="http://www.the-times.co.uk">The Times</A>
</UL>
</BODY>
(C) 2000, The
University of Michigan
8
Internet Standards
•
•
•
•
HTTP
CGI
URL
MIME
(C) 2000, The
University of Michigan
9
MIME types
application/pdf
application/postscript
application/zip
audio/basic
audio/x-aiff
audio/x-wav
image/gif
image/ief
image/jpeg
image/tiff
text/html
text/plain
video/mpeg
video/quicktime
type=audio/x-pn-realaudio
(C) 2000, The
University of Michigan
pdf
ai eps ps
zip
au snd
aif aiff aifc
wav
gif
ief
jpeg jpg jpe
tiff tif
html
txt
mpeg mpg mpe
qt mov
exts=ra,ram
10
Intranets
• Local systems
• Firewalls
(C) 2000, The
University of Michigan
11
Network Database Applications
• Static publishing
• DB query publishing
• Application Publishing
(C) 2000, The
University of Michigan
12
Three-tier architecture
Browser
Browser
HTTP server
DB server
DB
Browser
(C) 2000, The
University of Michigan
13
Languages used for Internettechnology applications
• Scripting languages: JavaScript, VBScript,
Jscript
• Java
• Visual Basic, C++, ActiveX
(C) 2000, The
University of Michigan
14
Markup languages
• HTML
• DHTML
• XML - related to XSL
(C) 2000, The
University of Michigan
15
<?xml version="1.0"?>
<!DOCTYPE staff SYSTEM "staff.dtd"> 1
<staff>
<employee id="m.weiss" > 2
<name><family>Weiss</family> <given>Michael</given></name>
<email>[email protected]</email>
<link subordinates="n.balaba b.esfandiari e.kiantan t.ware"/> 3
</employee>
<employee id="n.balaba">
<name><family>Balaba</family> <given>Natalia</given></name>
<email>[email protected]</email>
<link manager="m.weiss"/>
</employee>
<employee id="b.esfandiari">
<name>
<family>Esfandiari</family> <given>Babak</given>
</name>
<!-- This URL is mail address.-->
<url href="mailto:[email protected]"/>
<link manager="m.weiss"/>
</employee>
<employee id="e.kiantan">
<name><family>Kian-Tan</family> <given>Eng</given></name>
<link manager="m.weiss"/>
</employee>
<employee id="t.ware">
<name><family>Ware</family> <given>Tom</given></name>
<link manager="m.weiss"/>
</employee>
</staff>
SOURCE:
http://www.magma.ca/~mrw/xml
/Example_XML_document.html
<?xml encoding="US-ASCII"?>
<!ELEMENT staff (employee)+> 1
<!ELEMENT employee (name,email*,url*,link?)> 2
<!ATTLIST employee id ID #REQUIRED> 3
<!ELEMENT family (#PCDATA)> 4
<!ELEMENT given (#PCDATA)>
<!ELEMENT name (#PCDATA|family|given)*> 5
<!ELEMENT email (#PCDATA)>
<!ELEMENT url EMPTY> 6
<!ATTLIST url href CDATA #REQUIRED> 7
<!ELEMENT link EMPTY>
<!ATTLIST link
manager IDREF #IMPLIED
subordinates IDREFS #IMPLIED> 8
(C) 2000, The
University of Michigan
17
<rule> 1
<target-element type="example"/> 2
<I> 3
<children/>
</I>
</rule>
<rule>
<target-element type="para">
<element type="example"/> 4
</target-element>
<H2 color="red">
<children/>
</H2>
</rule>
http://www.magma.ca/~mrw/xml/Live_demo_XML_renderer.html
(C) 2000, The
University of Michigan
18
The role of Web servers
• Maintaining state
• Server-side scripting
(C) 2000, The
University of Michigan
19
Managing multi-user databases
(C) 2000, The
University of Michigan
20
Concurrency control
• Atomic transactions (LUWs = logical units
of work)
• Concurrent transaction processing
• Lost update problem
(C) 2000, The
University of Michigan
21
Resource locking
• Locks: implicit, explicit
• Serizalizable transaction
– 2PL: growing phase, followed by a shrinking
phase
• COMMIT and ROLLBACK
• DEADLOCKS
(C) 2000, The
University of Michigan
22
Readings for next time
• Kroenke
– Chapter 12: Managing Multi-User Databases
• YRK (optional)
– Chapter 11: PHP and other support for database-driven
HTML
(C) 2000, The
University of Michigan
23