Semi-Structured Data and Databases




CS157a

Chris Pollett

Dec 4, 2019

Outline

Semi-Structured Data

Motivation of Semi-Structured Data

Semi-structured Data Representation

Stars, StarIn, and StarsOf as semi-structured data

Information Integration Via Semi-structured Data

The integration of two databases

XML

The Syntax of XML

XML Document Structure and Entities

Document Type Definitions

<!ELEMENT ..>

<!ATTLIST ..>

<!ENTITY ..>

Example DTD

<?xml version = "1.0" encoding ="utf-8" ?>
<!-- planes_for_sale.dtd  -->
<!ELEMENT planes_for_sale (ad+) >
<!ELEMENT ad (year, make, model, color, price?, seller) >
<!ELEMENT year (#PCDATA)>
<!ELEMENT make (#PCDATA)>
<!ELEMENT model (#PCDATA)>
<!ELEMENT color (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT seller (#PCDATA)>
<!ATTLIST seller license CDATA #REQUIRED >
<!ENTITY c "cessna" >

In-Class Exercise

Postgres

XML in Postgres