1 / 10

Translating Relational Schemas to XML Schemas

Translating Relational Schemas to XML Schemas. Dongwon Lee, Murali Mani, Frank Chiu, Wesley. W. Chu UCLA. Our goals. Map from relational to XML model automatically. Maintain semantic constraints during the mapping.

gzifa
Download Presentation

Translating Relational Schemas to XML Schemas

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Translating Relational Schemas to XML Schemas Dongwon Lee, Murali Mani, Frank Chiu, Wesley. W. Chu UCLA

  2. Our goals. • Map from relational to XML model automatically. • Maintain semantic constraints during the mapping. • Existing work such as XML Extender (from IBM), db2XML, XML-DBMS, SilkRoute, EXPERANTO rely on user-specified mapping, and do not maintain semantic constraints.

  3. NeT: Nesting-based Translation • Nesting on a single attribute, X C, where C is column set of a table t “groups” the tuples of t with the same value for (C – X). • NeT is especially useful to: • Remove redundancies due to MVDs. • Group on attributes to get a more intuitive schema. • Semantic constraints are maintained.

  4. nestC(t) t nestA(nestC(t))

  5. NeT optimization • Perform minimum number of nesting. • Properties used for optimization: • Idempotency of nesting: we need not perform nesting more than once on any single attribute. • Nesting need not be done on an attribute that does not participate in any one candidate key. • Experimental results: NeT almost always decreases the data size tremendously – for one particular data set, size of the nested table is 6% of the size of the original table.

  6. CoT: Constraint-based Translation: Step 1 • Consider IND s[]  t[], where   X,   Y,  is primary key, and  is non-nullable. • If  is unique, M(t) = (Y, s?), else M(t) = (Y, s*) • M(s) = (X - ) • Key for s is (Ks - ) M(professor) = (Pname, Age, student*) M(student) = (Sname, Course) <professor> <Pname>Muntz</Pname> <Age>60</Age> <student> <Sname>John</Sname> <Course>DB</Course> </student> <student> <Sname>John</Sname> <Course>N/W</Course> </student> </professor> student <professor> <Pname>Chu</Pname> <Age>55</Age> </professor> professor

  7. CoT: Step 2 • Consider tables, s, t1, t2 with column set X, Y1, Y2, and INDs s[]  t1[1], and s[]  t2 [2], where 1, 2 are primary keys and  ,  are non-nullable • Translate one IND as in Step1, and translate the other to IDREF as: M(t1) = (Y1, s*), M(t2) = (Y2), M(s) = (X -  - ), A(t2) = {ID_t2::ID}, A(s) = {Ref_t2::IDREF} <professor> <Pname>Muntz</Pname> <Age>60</Age> <student Ref_course=“DB”> <Sname>John</Sname> </student> <student Ref_course=“N/W”> <Sname>John</Sname> </student> </professor> <course ID_course=“DB”/> <course ID_course=“N/W”/> <professor> <Pname>Chu</Pname> <Age>55</Age> </professor> course

  8. CoT: Step 3 • Consider a relational schema with tables {t1, t2,…,tn} and INDs ti[i]  tj[j] • Construct an IND-graph • Identify top-nodes as: • Nodes that do not have any IND are top-nodes • In a strongly connected component formed from table-set, S, if there is no IND from a node in S to a node outside S, then one of the nodes in S must be a top-node. • Perform BFS and translate the IND as in Step 1 or Step 2.

  9. M (course) = (Cid, Title, Room, course*) M(prof) = (student*) M(student) = (Sid, Name) M(emp) = (Eid, Name, dept*, proj*) M(dept) = (Dno) M(proj) = (Pname) A(emp) = {ID_emp::ID, Ref_proj::IDREF} A(prof) = {Ref_emp::IDREF} A(proj) = {ID_proj::ID} IND-Graph

  10. Conclusions • Automatically map from relational to a good XML model. • Maintain semantic constraints. • Remove some of the redundancies that could have been present in the relational model.

More Related