DTD
<!ELEMENT University (Person)*>
<!ELEMENT Person (first_name, last_name, email, Status)>
<!ATTLIST Person Code ID #REQUIRED>
<!ELEMENT Status (Student | Professor)>
<!ELEMENT Student (year, Course*, home_address. rank)>
<!ATTLIST Student StudentId ID #REQUIRED
tutor CDATA #REQUIRED>
<!ELEMENT Professor(ptitle, Division, rank)>
<!ATTLIST Professor Prof_code ID #REQUIRED
Office_phone CDATA #IMPLIED>
<!ELEMENT Division (Location, fund, employeenr)>
<!ATTLIST Division description CDATA #REQUIRED
sector CDATA #REQUIRED>
<!ELEMENT Location (city, street, number, county)>
<!ATTLIST Location code_location CDATA #IMPLIED>
<!ELEMENT Course (name,room)>
<!ATTLIST Course taughtby IDREF #REQUIRED>
<!ELEMENT first_name (#PCDATA)>
<!ELEMENT last_name (#PCDATA)>
<!ELEMENT email (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT rank (#PCDATA)>
<!ELEMENT ptitle (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT fund (#PCDATA)>
<!ELEMENT employeenr (#PCDATA)>
<!ELEMENT city (#PCDATA)>
<!ELEMENT street (#PCDATA)>
<!ELEMENT number (#PCDATA)>
<!ELEMENT county (#PCDATA)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT room (#PCDATA)>
<!ELEMENT home_address (#PCDATA)>
|
ODL
interface university
(source semistructured univers_xml
extent university )
{
attribute person person ;
};
interface person
(source semistructured univers_xml
extent person
key (person_code))
{
attribute string person_code ;
attribute string first_name ;
attribute string last_name ;
attribute string email ;
attribute status status ;
};
interface status
(source semistructured univers_xml
extent status )
{
attribute student student ;
}
union status1
{
attribute professor professor ;
};
interface student
(source semistructured univers_xml
extent student
key (student_studentid)
candidate_key cK0 (student_tutor))
{
attribute string student_studentid ;
attribute string student_tutor ;
attribute string year ;
attribute set
|
Representation with a OEM-like data model
