Anda di halaman 1dari 35

Modern Databases

Database Systems Lecture 18


Natasha Alechina
In This Lecture

'Modern' Databases
Distributed DBs
Web-based DBs
Object Oriented DBs
Semistructured Data and XML
Multimedia DBs
For more information
Connolly and Begg chapters 22-28
Ullman and Widom chapter 4
'Modern' Databases
Other Sorts of DB
We have looked There are several
mainly at relational other types of DB in
databases use today
Relational model Distributed DBs
SQL Object DBs
Design techniques Multimedia DBs
Transactions Temporal DBs
Many of these topics Logic DBs
relied on relational
concepts

'Modern' Databases
Distributed Databases
A distributed DB Distributed database
system consists of management system
several sites (DDBMS)
Sites are connected A DBMS (or set of
by a network them) to control the
Each site can hold databases
data and process it Communication
It shouldnt matter software to handle
where the data is - interaction between
the system is a single sites
entity

'Modern' Databases
Client/Server Architecture
The client/server Server
architecture is a Hosts the DBMS and
general model for database
systems where a Stores the data
service is provided Client
by one system (the User programs that
server) to another use the database
(the client) Use the server for
database access

'Modern' Databases
Distributed Databases

Client(s)
Server Client(s)
Server

Network
Client(s)
Server

Client(s)
Client(s)
Server
Server

'Modern' Databases
Web-based Databases
Database access Typical operation
over the internet Client sends a request
Web-based clients for a page to the web
Web server server
Database server(s) Web server sends SQL
to database
Web server serves The web server uses
pages to browsers results to create page
(clients) and can The page is returned to
access database(s) the client

'Modern' Databases
Web-based Databases
HTTP request Client
(Browser)

SQL query Web


Server HTML page

Database
Server SQL result

'Modern' Databases
Web-based Databases
Advantages Disadvantages
World-wide access Security can be a
Internet protocols problem if you are not
(HTTP, SSL, etc) give careful
uniform access and Interface is less
security flexible using
Database structure is standard browsers
hidden from clients Limited interactivity
Uses a familiar over slow connections
interface

'Modern' Databases
Object Oriented Databases
Relational DBs Object Oriented DBs
The database cant Use concepts from
see datas internal object oriented
structure so cant use design/programming
complex data OO concepts
Relational model gives Encapsulation
a simple, and quite Inheritance
powerful, structure - Polymoprhism
but is quite rigid
OODBMS

'Modern' Databases
Object Oriented Databases
An object oriented An object oriented
database (OODB) is DBMS
a collection of Manages a collection
persistent objects of objects
Objects - instances of Allows objects to be
a defined class made persistent
Persistent - object Permits queries to be
exist independently of made of the objects
any program Does all the normal
DBMS things as well

'Modern' Databases
OODB example
In lecture 10 we had OODB solution
a store with different We make an abstract
sorts of products Product class
Books Book, CD, and DVD
CDs are each a concrete
subclass of Product
DVDs
The database is a
This lead to missing persistent collection of
data among the Products
various types

'Modern' Databases
OODB Example
Product Product is abstract
Price You cannot make a
Title Product directly
Shipping You can, however,
make a Book, CD, or
DVD, and these are
Products
Book CD DVD
Author Artist Producer
Publisher Director

'Modern' Databases
Object Oriented Databases
Advantages Disadvantages
Good integration with There is no underlying
Java, C++, etc theory to match the
Can store complex relational model
information Can be more complex
Fast to recover whole and less efficient
objects OODB queries tend to
Has the advantages of be procedural, unlike
the (familiar) object SQL
paradigm

'Modern' Databases
Object Relational Databases
Extend a RDBMS An object relational
with object concepts database
Data values can be Retains most of the
objects of arbitrary structure of the
complexity relational model
These objects have Needs extensions to
inheritance etc. query languages (SQL
You can query the or relational algebra)
objects as well as the
tables

'Modern' Databases
Semistructured data
Semistructured Data : A new data model
designed to cope with problems of
information integration.
XML : A standard language for describing
semistructured data schemas and
representing data.

'Modern' Databases
The Information-Integration
Problem
Related data exists in many places and could, in
principle, work together.
But different databases differ in:
Model (relational, object-oriented?).
Schema (normalised/ not normalized?).
Terminology: are consultants employees?
Retirees? Subcontractors?
Conventions (meters versus feet?).
How do we model information residing in
heterogeneous sources (if we cannot combine it all in
a single new database)?

'Modern' Databases
Example
Suppose we are integrating information about bars in
some town.
Every bar has a database.
One may use a relational DBMS; another keeps the
menu in an MS-Word document.
One stores the phones of distributors, another does
not.
One distinguishes ales from other beers, another
doesnt.
One counts beer inventory by bottles, another by
cases.

'Modern' Databases
Semistructured Data
Purpose: represent data from independent sources
more flexibly than either relational or object-oriented
models.
Think of objects, but with the type of each object its
own business, not that of its class.
Labels to indicate meaning of substructures.
Data is self-describing: structural information is part of
the data.

'Modern' Databases
Graphs of Semistructured
Data
Nodes = objects.
Labels on arcs (attributes, relationships).
Atomic values at leaf nodes (nodes with no arcs out).
Flexibility: no restriction on:
Labels out of a node.
Number of successors with a given label.

'Modern' Databases
Example: Data Graph
root Notice a
new kind
beer beer of data.
bar
manf manf prize
name A.B.
name
servedAt year award
Bud
Mlob 1995 Gold
name addr

Joes Maple The beer object


for Bud
The bar object
for Joes Bar
'Modern' Databases
XML
XML = Extensible Markup Language.
While HTML uses tags for formatting (e.g., italic), XML
uses tags for semantics (e.g., this is an address).
Key idea: create tag sets for a domain (e.g., bars), and
translate all data into properly tagged XML documents.
Well formed XML - XML which is syntactically correct;
tags and their nesting totally arbitrary.
Valid XML - XML which has DTD (document type
definition); imposes some structure on the tags, but
much more flexible than relational database schema.

'Modern' Databases
XML and Semistructured
Data
Well-Formed XML with nested tags is exactly the same
idea as trees of semistructured data.
XML also enables non-tree structures (with references
to IDs of nodes), as does the semistructured data
model.

'Modern' Databases
Example: Well-Formed XML
<? XML VERSION = 1.0 STANDALONE = yes ?>
<BARS>
<BAR><NAME>Joes Bar</NAME>
<BEER><NAME>Bud</NAME>
<PRICE>2.50</PRICE></BEER>
<BEER><NAME>Miller</NAME>
<PRICE>3.00</PRICE></BEER>
</BAR>
<BAR>
</BARS>

'Modern' Databases
Example
The <BARS> XML document is:

BARS

BAR BAR
BAR
NAME ...
BEER
BEER
Joes Bar
PRICE NAME PRICE
NAME
Bud 2.50 Miller 3.00
'Modern' Databases
XPATH and XQUERY
XPATH is a language for describing paths in XML
documents.
Really think of the semistructured data graph and its
paths.
Why do we need path description language: cant get
at the data using just Relation.Attribute expressions.
XQUERY is a full query language for XML documents
with power similar to OQL (Object Query Language,
query language for object-oriented databases).

'Modern' Databases
Multimedia Databases
Multimedia DBs can They can be used in
store complex a wide range of
information application areas
Images Entertainment
Music and audio Marketing
Video and animation Medical imaging
Full texts of books Digital publishing
Web pages Geographic
Information Systems

'Modern' Databases
Querying Multimedia DBs
Metadata searches Content searches
Information about the The multimedia data
multimedia data is searched directly
(metadata) is stored Potential for much
This can be kept in a more flexible search
standard relational Depends on the type
database and queried of data being used
normally Often difficult to
Limited by the determine what the
amount of metadata correct results are
available

'Modern' Databases
Metadata Searches
Example - indexing We can then search
films we might store for things like
Title Films starring Kevin
Year Spacey
Genre(s) Films directed by
Actor(s) Peter Jackson
Director(s) Dramas produced in
2000
Producer(s)
We dont actually
search the films

'Modern' Databases
Metadata Searches
Advantages Disadvantages
Metadata can be Metadata cant always
structured in a be found
traditional DBMS automatically, and so
Metadata is generally requires data entry
concise and so It restricts the sorts of
efficient to store queries that can be
Metadata enriches the made
content

'Modern' Databases
Content Searches
An alternative to Example of content
metadata is to based retrieval
search the content Find images similar to
directly a given sample
Multimedia is less Hum a tune and find
structured than out what it is
metadata Search for features,
It is a richer source of such as cuts or
information but transitions in films
harder to process

'Modern' Databases
Content-Based Retrieval
QBIC (Query By Image Content)
from IBM - searches for images
having similar colour or layout

'Modern' Databases http://wwwqbic.almaden.ibm.com/cgi-bin/stamps-demo


Content-Based Retrieval
Image retrieval is
hard
It is often not clear
when two images are
similar Do we look for?
Image interpretation Images of roses
is unsolved and Images of red things?
expensive Images of flowers?
Different people Images of red flowers?
expect different things
Images of red roses?

'Modern' Databases
Other Topics
Temporal DBs Logic DBs
Storing data that A database is a set of
changes over time facts and rules for
Can ask about the manipulating them
history of the DB (like a Prolog
rather than just the program)
current state The DBMS maintains
System time vs real and controls these
time facts and rules
A query is made by
applying the rules to
the facts

'Modern' Databases
Next week
Wednesday 12-1: Revision and module
evaluation lecture
If you have suggestions for revision
questions, please email me!
Monday the 28th 9-10: Java and SQL
lecture (optional not in the exam)

'Modern' Databases

Anda mungkin juga menyukai