Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lore: A Database Management System for XML

Similar presentations


Presentation on theme: "Lore: A Database Management System for XML"— Presentation transcript:

1 Lore: A Database Management System for XML
컴퓨터언어연구실 석사2학기 992COG10 김 혜 진

2 목차 Lore의 소개 Semistructured data OEM Data Model XML과 OEM Lorel
DataGuides Lore의 system architecture An XML document and its graph 실제 사용 예 Conclusion and Status

3 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 약 줄의 C++ 코드로 구성

4 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

5 The Semistructured Data Model-OEM

6 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.)

7 An XML document and its graph
DBGroup &1 Project Member {Name=”Smith”, Advisor=“m1”} Member Advisor Project <DBGroup> <Member Name=“Smith” Advisor=“m1”> <Age>28</Age> </Member> <Member ID=“m1” Project=“p1”> <Name>Jones</Name> <Advisor>Ullman</Advisor> <Project ID=“p1” Member=“m1”> <Title>Lore</Title> </Project> </DBGroup> &2 &3 &4 {ID=”m1”, Project=“p1”} {ID=”p1”, Member=“m1”} Title Age Name Advisor &8 &5 &6 &7 Text Text Text Text &9 &10 &11 &12 ”28” ”Jones” ”Ullman” ”Lore”

8 OEM이 XML과 다른 점 OEM은 subelement, attribute, IDREF를 섞어 놓음. OEM은 순서가 없다.
Lore를 통해 ordering을 보존 OEM은 schema-less: DTD가 없다.

9 LOREL - The LORE Language
Lore의 query language. 기본 원리 No errors 불규칙하고 불완전한 데이터를 깨끗하게 다룬다. 사용자는 전체 object 구조를 알 필요가 없다. OQL의 확장 class가 없고 엄격한 type-checking을 하지 않음 넓은 자동 형 변환(type coercion) atomic values 집합과 원소 heterogeneous sets very general path expressions

10 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” Room% : Room이라는 string과 match되는 label pattern. |: 두 label간의 disjunction을 나타낸다. ?: 이 label pattern이 optional함을 뜻함. Like %252: data 값이 252로 끝나야 함을 뜻한다. Clark이라는 name을 갖는 모든 group member를 Lore와 Tsimmis project의 member로 추가하라.

11 Lore’s XML Query Language
attribute와 subelement 사이의 구별 path expression qualifier: subelement; >, 구분 비교 서로 다른 종류의 비교가 가능. 예) 상수와 attribute 값, element text의 비교 범위 한정자 [2-4,7] 예)select y from DBGroup.Member x, x.Office[1-2] Order-by clause 질의 결과가 원래 XML 문서에 기초하여 질의 결과가 순서화 변형 및 구조적 결과 갱신 expressive하고 declarative한 질의 언어 지원 예) 모든 group member의 처음 두 Office element를 되돌린다.

12 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를 만들 수 있다.

13 Lore의 구조 API Query Compilation Data Engine Parsing Applications
Textual Interface HTML GUI API Results Lore System Query Compilation Queries Parsing Preprocessing (Lorel to OQL) Query Plan Generator Query Optimizer Non-Query Requests Lore 시스템에 접근: 직접 Lore Application Program Interface(API)를 통하거나 또는 application을 통해서 가능. textual interface: system 개발자들에 의해 쓰이는 단순한 것. system 기능과 작은 database를 탐구하기 위해 처음 단계로 쓰인다. graphical interface: end user를 위한 처음 단계 interface로서 query result를 browsing하는 강력한 tool, data의 구조를 보는 DataGuide 특징을 제공 예를 주어 간단한 query를 공식화한다. 이것은 자주 질문 되는 query를 절약하고, video, audio, Java 같은 멀티미디어 atomic type을 보기 위한 방법이다. 이러한 두 interface module은 다른 application을 따라, Lore와 API를 통해 소통한다. Query compilation layer parser, processor, query plan generator, query optimizer로 구성. Parser: query의 textual 표현을 받아들이고, 그것을 parse tree로 바꾸고, 그 parse tree를 preprocessor로 전해 준다. Preprocessor: Lorel query를 OQL-like query로 바꾸는 것을 조종 query generator: query plan은 변형된 query에서 만들어지고 query optimizer에게 전해진다. Query optimizer: query plan에서의 약간의 변형에 부가하여, index의 사용이 알맞은지 결정. 그러고 나면, optimized query plan은 Data Engine layer로 보내어진다. Data Engine External, Read-only Data Sources External Data Manager Object Manager Query Operators Utilities -DataGuide Mgr -Loader -Index Mgr Physical Storage

14 실행환경 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” 앞의 구조 이어서: Data Engine layer OEM object manager와 query operator, external data manager, 다양한 utility를 수용한다. object manager: OEM과 low level file construct 사이의 translation layer로 작용. object를 fetch하거나 두 object의 비교, 간단한 coercion의 수행, complex object의 subobject의 반복하는 등의 기본적인 것들을 지원 간단하게: 1) query가 parse된다. 2) parse tree가 preprocess되고 OQL-like query로 번역된다. 3) query plan이 만들어진다. 4) query optimization이 일어난다. 5) optimized query plan이 실행된다.

15 Query example in Lore- Textual Interface
Ultrasparc에서 실행한 결과 화면 [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> 앞의 구조 이어서: Data Engine layer OEM object manager와 query operator, external data manager, 다양한 utility를 수용한다. object manager: OEM과 low level file construct 사이의 translation layer로 작용. object를 fetch하거나 두 object의 비교, 간단한 coercion의 수행, complex object의 subobject의 반복하는 등의 기본적인 것들을 지원

16 Query example in Web- graphical interface(1)
Web 상에서의 Java로 이루어진 DataGuide에서 원하는 element를 선택.

17 Query example in Web - graphical interface(2)

18 Query example in Web - graphical interface(3)
주어진 조건을 나타내는 화면

19 Query example in Web - graphical interface(4)

20 Query example in Web - graphical interface(5)

21 사용한 XML 문서 Shakespeare's "A Midsummer Night's Dream”의 일부 <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, </p> <p>XML version by Jon Bosak, </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>

22 결론 XML을 지원하기 위해 Lore의 data model과 질의 언어를 migrate
문서와 복사본을 저장하고 그 둘 간의 mapping을 유지하면서 database에서 XML 문서의 부분을 그들의 component와 혼합하는 새로운 접근을 고려

23 참고문헌 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 , Tucson, Arizona, May 1997.

24 참고문헌 Dan Suciu, ”From Semistructured Data to XML,” VLDB’99, 1999.


Download ppt "Lore: A Database Management System for XML"

Similar presentations


Ads by Google