Title: David G. Messerschmitt
1Chapter 15
- by
- David G. Messerschmitt
2Databases
- by
- David G. Messerschmitt
3Databases
- Treat data as a separate asset
- May be shared by multiple applications
- Provide protection and integrity features
appropriate to mission-critical data - Access control
- Integrity constraints
- Persistence
- etc.
4Two capabilities
Application I
Application II
Sharing two or more applications accessing the
same databases
Aggregation accessing multiple databases
Databases
5Relational table
Table
Employee
Name
Address
Dept
Record
Field
6Database operations
Employees
Departments
Each operation results in a new table, so they
can be concatenated
PROJECT
SELECT
7Multiple tables
PROJECT
SELECT
8Record at a time processing
Database
Application logic (system programming language)
SQL
9SQL interface
- Presents single abstract interface to the
application logic - Standardized, not vendor specific
- Stored procedures and extensions violate this
- Encapsulates various internal details
- Data partitioning and replication
- Host mapping
- File representation
- etc.
10Fields, columns, attributes
- Entries are simple data types or compositions of
those types - Integrity constraints
Records, rows
11Object/table correspondence
Class
Class implementation
Employee
Name
Address
Dept
Record-at-a-time program
Object instance data
Attribute
12Object attributes
- Rows can be considered object instances with the
same attributes - Restriction to simple data types
- No encapsulated state
- No methods
Object instances
13Object-relational database
- A column can store object instances of a given
class rather than data of a given simple or
compound data type - Because of the table structure, SQL can be
extended to this case - Standard SQL queries can be extended to methods
returning simple data types - Many other good ideas
14Benefits of ORDBMS
- Extension manage arbitrarily complex data types
- Migration preserve and extend existing databases
- Preserve SQL interface
- OR extensions in latest standard
- All the benefits/experience of earlier databases
- Access control, data integrity, persistence, etc.
- Killer app Behind Web/CGI
- Images, video, audio, animation, applets, etc.
15Markup languages
- by
- David G. Messerschmitt
16Definition
- A markup language describes the structure of a
document - Based on tags
- Tags denote structural elements like sections,
subsections, figures, etc - Internationally standardized, so application
independent
17Example HTML
- HEADgt
- ltMETA NAME"GENERATOR" CONTENT"Adobe PageMill
2.0 Win"gt - ltTITLEgtDavid G. Messerschmitt Homepagelt/TITLEgt
- lt/HEADgt
- ltBODY ALINK"c4124e" BACKGROUND"Images/backgroun
d.jpg"gt - ltH3gtnbsplt/H3gt
- ltBLOCKQUOTEgt
- ltH2gtltTABLE BORDER"5" CELLSPACING"2"
CELLPADDING"0"gt - ltTRgt
- ltTHgt ltP ALIGNLEFTgtltIMG SRC"Images/Messer.gif"
WIDTH"112" HEIGHT"168" ALIGN - "BOTTOM" NATURALSIZEFLAG"3"gtlt/THgtlt/TRgt
- lt/TABLEgt
- lt/H2gt
- ltH2gtltBRgt
- David G Messerschmittlt/H2gt
- ltH3gtRoger A. Strauch Professor of ltA
HREF"http//www.eecs.berkeley.edu/"gtElectrical - Engineering and Computer Scienceslt/Agtlt/H3gt
18Family lineage
SGML
XML
HTML
Emphasizes formatting and presentation
of documents
Emphasizes structure of documents
Purpose- and industry-specific extensions
19Data sharing among applications
- Options include
- Messages with defined formats
- Documents (eg. XML)
- Shared databases
- Remote method invocation middleware
- The first two are the most practical for
inter-enterprise applications