lore: a database management system for xml
DESCRIPTION
Lore: A Database Management System for XML. 컴퓨터언어연구실 석사2학기 992 COG10 김 혜 진. 목차. Lore 의 소개 Semistructured data OEM Data Model XML 과 OEM Lorel DataGuides Lore 의 system architecture An XML document and its graph 실제 사용 예 Conclusion and Status. Lore 의 소개. Lore - PowerPoint PPT PresentationTRANSCRIPT
Lore: A Database Management System for XML
컴퓨터언어연구실 석사 2 학기992COG10
김 혜 진
목차
• Lore 의 소개• Semistructured data
• OEM
• Data Model
• XML 과 OEM
• Lorel
• DataGuides
• Lore 의 system architecture
• An XML document and its graph
• 실제 사용 예• Conclusion and Status
Lore 의 소개
• Lore– Lightweight Object Repository
– A DBMS designed specially for managing semistructured information.
– 처음에는 Lightweight 라는 말은 Lore 에 의해 사용되는 simple object model 과 , single-user, read-only access 를 지원하는 lightweight system 둘 다를 의미하며 사용
( 기존의 DBMS 를 heavyweight 라 표현 )
– Stanford 대학교에서 4 년 전부터 시작 .
– OEM 을 semistructured data model 로 삼았다가 , 최근 XML이 등장하면서 강한 유사성을 발견하고 , XML 로도 작업이 가능하도록 migration
Semistructured data
• Data 가 구조를 가졌다 해도 , 그 구조는 traditional database management system 에서 요구하는 구조처럼 엄격하거나 일정하거나 완벽하지는 않다 .
• Sources of semistructured data– integration of heterogeneous sources
– extraction from World-Wide Web
– XML
• also called unstructured data, loosely structured data
• self-describing : schema is contained within the data
The Semistructured Data Model-OEM
OEM
• OEM: Object Exchange Model
• simple nested object model
• object 들은 label 을 통해 self-describing
• 정해진 schema 는 없다 .
• Directed labeled graph– node 는 object
– labeled edge 는 object-subobject 관계를 나타냄 .
– Leaf 부분에서는 atomic value 를 갖는다 . (integer, real, string, gif, avi, etc.)
An XML document and its graph
<DBGroup>
<Member Name=“Smith” Advisor=“m1”>
<Age>28</Age>
</Member>
<Member ID=“m1” Project=“p1”>
<Name>Jones</Name>
<Advisor>Ullman</Advisor>
</Member>
<Project ID=“p1” Member=“m1”>
<Title>Lore</Title>
</Project>
</DBGroup>
&1
&2
&9
&5
&3 &4
&6 &7
&10 &11
&8
&12
DBGroup
ProjectMember
Advisor
Text
Age
Text Text Text
Advisor Member
Project
Name
”28” ”Jones” ”Ullman”
Title
{ID=”p1”,Member=“m1”}
{ID=”m1”,Project=“p1”}
{Name=”Smith”,Advisor=“m1”}
”Lore”
OEM 이 XML 과 다른 점
• OEM 은 subelement, attribute, IDREF 를 섞어 놓음 .
• OEM 은 순서가 없다 .– Lore 를 통해 ordering 을 보존
• OEM 은 schema-less: DTD 가 없다 .
LOREL - The LORE Language
• Lore 의 query language.
• 기본 원리– No errors
– 불규칙하고 불완전한 데이터를 깨끗하게 다룬다 .
– 사용자는 전체 object 구조를 알 필요가 없다 .
• OQL 의 확장– class 가 없고 엄격한 type-checking 을 하지 않음– 넓은 자동 형 변환 (type coercion)
• atomic values
• 집합과 원소– heterogeneous sets
– very general path expressions
LOREL: Query Examples
• Simple example
select DBGroup.Member. Name
where DBGroup.Member. Office(.Room%|.Cubicle)?
like “%252”
• declarative update language
update p.Member +=
(select DBGroup.Member
where DBGroup.Member. Name = “Clark” )
from DBGroup.Project p
where p.Title = “Lore” or
p.Title=“Tsimmis”
Lore’s XML Query Language
• attribute 와 subelement 사이의 구별– path expression qualifier: subelement; >, attribute;@ 로 구분
• 비교– 서로 다른 종류의 비교가 가능 .예 ) 상수와 attribute 값 , element text 의 비교
• 범위 한정자 – [2-4,7]예 )select y from DBGroup.Member x, x.Office[1-2]
• Order-by clause– 질의 결과가 원래 XML 문서에 기초하여 질의 결과가 순서화
• 변형 및 구조적 결과• 갱신
– expressive 하고 declarative 한 질의 언어 지원
DataGuide
• semistructured database 는 일반적으로 미리 정의된 고정된 schema 를 가지고 있지 않다 .
• DB 의 기초를 이루는 간결하고 정확한 구조적 정리• DataGuide: dynamic structural summary of
current DB– database 에서의 각 label path 가 정확히 DataGuide
에서 한번 나타남– 각 label path 는 original database 에서 존재하는 graph
– Schema 의 역할– database 가 변화하면 점진적으로 수용 .
• 향후 연구 : DTD 와의 결합– DTD 에 의해 지배되지 않는 부분들에 대해 적당한 곳에
적당한 link 와 함께 DataGuide 를 만들 수 있다 .
Lore 의 구조
Textual Interface
HTML GUI Applications
API
Parsing Preprocessing(Lorel to OQL)
Query Plan Generator
Query Optimizer
Query Compilation
ObjectManager
QueryOperators
Utilities-DataGuide Mgr
-Loader-Index Mgr
External DataManager
Data Engine
Results
Non-QueryRequests
Physical Storage
Lore System
External,Read-only
DataSources
Queries
실행환경
• graphical interface:
http://www-db.stanford.edu/lore/demo– The system is a C++ server that communicates to Lore via
standard Application Program Interface (API).
• textual interface:
5/5/99 Lore Version 5.0 release(Sun OS 용 )
Workstation: Sun 의 Ultrasparc 2.6 install
(XML 로 migrate 한 첫번째 version)
• 사용한 document: dream.xml
Shakespeare's "A Midsummer Night's Dream”
Query example in Lore- Textual Interface
[pllab]~/lore/bin >dbcreate dream
Database dream created successfully.
[pllab]~/lore/bin >dbload dream ../db_files/dream.xml
Registering Name: PLAY.
File ../db_files/dream.xml loaded successfully.
[pllab]~/lore/bin >lore dream
LORE: select PLAY.TITLE;
XML answer:
<TITLE>A Midsummer Night's Dream</TITLE>
•Ultrasparc 에서 실행한 결과 화면
Query example in Web- graphical interface(1)
• Web 상에서의 Java 로 이루어진 DataGuide 에서 원하는 element 를 선택 .
Query example in Web - graphical interface(2)
• 관련된 query 설정
Query example in Web - graphical interface(3)
• 주어진 조건을 나타내는 화면
Query example in Web - graphical interface(4)
• 직접 query 를 입력하는 경우
Query example in Web - graphical interface(5)
• 주어진 query 의 결과 화면
사용한 XML 문서
<PLAY>
<TITLE>A Midsummer Night's Dream</TITLE>
<fm>
<p>Text placed in the public domain by Moby Lexical Tools, 1992.</p>
<p>SGML markup by Jon Bosak, 1992-1994.</p>
<p>XML version by Jon Bosak, 1996-1997.</p>
<p>This work may be freely copied and distributed worldwide.</p>
</fm>
<PERSONAE>
<TITLE>Dramatis Personae</TITLE>
<PERSONA>THESEUS, Duke of Athens.</PERSONA>
<PERSONA>EGEUS, father to Hermia.</PERSONA>
<PGROUP>
<PERSONA>LYSANDER</PERSONA>
<PERSONA>DEMETRIUS</PERSONA>
<GRPDESCR>in love with Hermia.</GRPDESCR>
</PGROUP>
Shakespeare's "A Midsummer Night's Dream” 의 일부
결론
• XML 을 지원하기 위해 Lore 의 data model 과 질의 언어를 migrate
• 문서와 복사본을 저장하고 그 둘 간의 mapping 을 유지하면서 database 에서 XML 문서의 부분을 그들의 component 와 혼합하는 새로운 접근을 고려
참고문헌
• http://www-db.Stanford.edu/lore
• R. Goldman, J. McHugh, and J. Widom,” From Semistructured Data to XML: Migrating the Lore Data Model and Query Language,” Proceedings of the 2nd International Workshop on the Web and Databases (WebDB '99), Philadelphia, Pennsylvania, June 1999.
• J. McHugh, S. Abiteboul, R. Goldman, D. Quass, and J. Widom, “Lore: A Database Management System for Semistructured Data,” SIGMOD Record, 26(3):54-66, September 1997.
• S. Abiteboul, D. Quass, J. McHugh, J. Widom, and J. Wiener, “The Lorel Query Language for Semistructured Data,” International Journal on Digital Libraries, 1(1):68-88, April 1997.
• P. Buneman, “Semistructured Data, “ In Proceedings of the 6th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, pages 117-121, Tucson, Arizona, May 1997.
참고문헌
• Dan Suciu, ”From Semistructured Data to XML,” VLDB’99, 1999.