XML Storage - PowerPoint PPT Presentation

About This Presentation
Title:

XML Storage

Description:

Maya Ramanath. Database Systems Lab. SERC, IISc. How should we store ... NAME Maya /NAME ADDRESS INSTITUTE IISc /INSTITUTE CITY Bangalore /CITY ... – PowerPoint PPT presentation

Number of Views:54
Avg rating:3.0/5.0
Slides: 16
Provided by: mrsrip
Category:
Tags: xml | maya | storage

less

Transcript and Presenter's Notes

Title: XML Storage


1
XML Storage
  • Maya Ramanath
  • Database Systems Lab
  • SERC, IISc

2
How should we store XML?
  • File system
  • Text files - differently represented during
    processing
  • Text files - with additional indexes
  • Database systems
  • Relational
  • Object-oriented, etc.

3
File System
  • Advantages
  • Easy to store
  • Document granularity is maintained
  • Disadvantages
  • Query processing

4
Database Systems
  • Advantages
  • Well understood technology
  • Optimized for query processing
  • Disadvantages
  • XML does not directly map to any data model
  • Not amenable to a rigid schema

5
Example
  • ltSTUDENTgt
  • ltNAMEgt Maya lt/NAMEgt
  • ltADDRESSgt
  • ltINSTITUTEgt IISc lt/INSTITUTEgt
  • ltCITYgt Bangalore lt/CITYgt
  • lt/ADDRESSgt
  • lt/STUDENTgt
  • ltSTUDENTgt
  • ltNAMEgt Charuta lt/NAMEgt
  • ltADDRESSgt IIT, Mumbai lt/ADDRESSgt
  • lt/STUDENTgt

6
Example (contd.)
7
XML to Relational
  • 1. STUDENT1 (KEY, NAME, INSTITUTE, CITY)
  • STUDENT2 (KEY, NAME, ADDRESS)

STUDENT
NAME
ADDRESS
IIT, Mumbai
Charuta
8
XML to Relational (contd.)
  • 2. STUDENT (KEY, NAME)
  • ADDRESS1 (KEY, INSTITUTE, CITY)
  • ADDRESS2 (KEY, ADDRESS)
  • 3. STUDENT (KEY, NAME, INSTITUTE, CITY, ADDRESS)

STUDENT
NAME
ADDRESS
IIT, Mumbai
Charuta
9
STORED (Deutsch et al.)
  • A query language used to define mappings
  • Q FROM STUDENT X
  • NAME N,
  • ADDRESS INSTITUTE I, CITY C
  • STORE STUDENT(X, N, I, C)

10
STORED (contd.)
  • Q FROM STUDENT X
  • NAME N,
  • ADDRESS INSTITUTE I, CITY C
  • STORE STUDENT(X, N, I, C)
  • Mappings generated through data-mining algorithms
  • Non-conforming data stored in overflow graphs

11
XML to OO (Christophides et al.)
  • An OO schema is derived based on the DTD
  • lt!ELEMENT STUDENT (NAME, ADDRESS)gt
  • lt!ELEMENT NAME (CDATA)gt
  • lt!ELEMENT ADDRESS (INSTITUTE, CITY)gt
  • lt!ELEMENT INSTITUTE (CDATA)gt
  • lt!ELEMENT CITY (CDATA)gt

12
XML to OO (contd.)
class STUDENT public type tuple ( name
NAME, address ADDRESS ) class ADDRESS
public type tuple ( institute INSTITUTE,
city CITY ) class NAME inherit Text class
ADDRESS inherit Text class INSTITUTE inherit
Text class CITY inherit Text
13
Natix (U. Mannheim)
  • A basic record manager is used
  • Each node or set of nodes is stored in a record
  • Splitting strategies on the tree can be employed
    to optimize query processing

14
Natix (contd.)
15
Summary of issues involved
  • Determining the best mapping
  • Space occupied
  • Data fragmentation
  • Support for overflow data
  • Lossless?
  • Translation of XML queries to DB queries
  • Reconstruction of XML documents from the DB
Write a Comment
User Comments (0)
About PowerShow.com