Docsity

Parallel and Distributed Databases, XML, and Object-Relational Data Management, Study notes of Principles of Database Management

Partial preview of the text

Download Parallel and Distributed Databases, XML, and Object-Relational Data Management and more Study notes Principles of Database Management in PDF only on Docsity!

Parallel/DistributedParallel/Distributed

Databases Databases

XML XML

Mihai Pop

CMSC

most slides courtesy of Amol Deshpande

AdminAdmin

n Project due today

n Sign up for demo, if you haven't already

n myphpbib.sourceforge.net - example publication DB and API

TopicsTopics

n Today

 Database system architectures (Chap. 20)

 (^) Client-server

 Parallel and Distributed Systems (Chap. 20, 21, 22)

 Object Oriented, Object Relational (Chap. 9)

 XML (Chap. 10)

n Next class…

 Data warehouses, Information Retrieval, Database Tuning?

Database System ArchitecturesDatabase System Architectures

n Centralized single-user

n Client-Server Architectures

 Connected over a network typically

 Back-end: manages the database

 Front-end(s): Forms, report-writes, sqlplus

 How they talk to each other?

 ODBC:
  • Interface standard for talking to the server in C  (^) JDBC:
  • In Java

 Transaction servers vs. data servers

Parallel DatabasesParallel Databases

n Why?

 More transactions per second, or less time per query

 Throughput vs. Response Time

 Speedup vs. Scaleup

n Database operations are embarrassingly parallel

 E.g. Consider a join between R and S on R.b = S.b

n But, perfect speedup doesn’t happen

 Start-up costs (starting 1000s of jobs is expensive)

 Interference (e.g. shared disk)

 Skew (not all jobs are the same size)

Parallel DatabasesParallel Databases

n Shared-nothing vs. shared-memory vs. shared-disk

Distributed SystemsDistributed Systems n (^) Over a wide area network n (^) Typically not done for performance reasons  For that, use a parallel system n Done because of necessity  Imagine a large corporation with offices all over the world  Also, for redundancy and for disaster recovery reasons n Lot of headaches  Especially if trying to execute transactions that involve data from multiple sites  Keeping the databases in sync

  • 2-phase commit for transactions uniformly hated  (^) Autonomy issues
  • Even within an organization, people tend to be protective of their unit/department  (^) Locks/Deadlock management  Works better for query processing  Since we are only reading the data

Next…Next…

n Object oriented, Object relational, XML

HistoryHistory

n In the 1980’s and 90’s, DB researchers recognized benefits of

objects.

n Two research thrusts:

 OODBMS: extend C++ with transactionally persistent objects

 (^) Niche Market  (^) CAD etc

 ORDBMS: extend Relational DBs with object features

 (^) Much more common  (^) Efficiency + Extensibility  (^) SQL:99 support

n Postgres – First ORDBMS

 Berkeley research project

 Became Illustra, became Informix, bought by IBM

ExampleExample n Create User Defined Types (UDT) CREATE TYPE BarType AS ( name CHAR(20), addr CHAR(20) ); CREATE TYPE BeerType AS ( name CHAR(20), manf CHAR(20) ); CREATE TYPE MenuType AS ( bar REF BarType, beer REF BeerType, price FLOAT ); n (^) Create Tables of UDTs  CREATE TABLE Bars OF BarType;  CREATE TABLE Beers OF BeerType;  CREATE TABLE Sells OF MenuType;

ExampleExample n UDT’s can be used as types of attributes in a table CREATE TYPE AddrType AS ( street CHAR(30), city CHAR(20), zip INT ); CREATE TABLE Drinkers ( name CHAR(30), addr AddrType, favBeer BeerType ); n Find the beers served by Joe: SELECT ss.beer()->name FROM Sells ss WHERE ss.bar()->name = ’Joe’’s Bar’;

An Alternative: OODBMSAn Alternative: OODBMS

n Persistent OO programming

 Imagine declaring a Java object to be “persistent”

 Everything reachable from that object will also be persistent

 You then write plain old Java code, and all changes to the persistent

objects are stored in a database

 When you run the program again, those persistent objects have the

same values they used to have!

n Solves the “impedance mismatch” between programming

languages and query languages

 E.g. converting between Java and SQL types, handling rowsets, etc.

 But this programming style doesn’t support declarative queries

 (^) For this reason (??), OODBMSs haven’t proven popular

n OQL: A declarative language for OODBMSs

 Was only implemented by one vendor in France (Altair)

Summary, cont.Summary, cont.

n ORDBMS offers many new features

 but not clear how to use them!

 schema design techniques not well understood

 (^) No good logical design theory for non-1st-normal-form!

 query processing techniques still in research phase

 (^) a moving target for OR DBA’s!

n OODBMS

 Has its advantages

 Niche market

 Lot of similarities to XML as well…

XMLXML

n Extensible Markup Language

n Derived from SGML (Standard Generalized Markup Language)

 Similar to HTML, but HTML is not extensible

 (^) Extensible == can add new tags etc

n Emerging as the wire format (data interchange format)