Gavin121 Posted March 22, 2006 Share Posted March 22, 2006 Hi, ive got the following task:Give the DTD for an XML representation of the following nested relational schema.Emp =(ename, ChildrenSet setof(Children), SkillsSet setof(Skills))Children =(name, Birthday)Birthday = (day, month, year)Skills = (type, ExamsSet setof(Exams))Exams = (year, city)I'm really lost on how to do this. Any help would be great. Ive read the tutorials. Just think i need some more help!Thanks! Link to comment Share on other sites More sharing options...
steve_marjoribanks Posted March 23, 2006 Share Posted March 23, 2006 Hi, ive got the following task:Give the DTD for an XML representation of the following nested relational schema.Emp =(ename, ChildrenSet setof(Children), SkillsSet setof(Skills))Children =(name, Birthday)Birthday = (day, month, year)Skills = (type, ExamsSet setof(Exams))Exams = (year, city)I'm really lost on how to do this. Any help would be great. Ive read the tutorials. Just think i need some more help!Thanks!<{POST_SNAPBACK}> Homework question is it?! You really should be able to do that just after reading the tutorial. Link to comment Share on other sites More sharing options...
Gavin121 Posted March 23, 2006 Author Share Posted March 23, 2006 Ok, this is what ive come up with:<!DOCTYPE root-element[element-delclarations]><?xml version = "1.0"?><!DOCTYPE Emp [<!ELEMENT Emp( ename, Children, Skills)><!ELEMENT ename (#PCDATA)><!ELEMENT Children(name, Birthday)><!ELEMENT name (#PCDATA)><!ELEMENT Birthday (day, month, year)><!ELEMENT day (#PCDATA)><!ELEMENT month (#PCDATA)><!ELEMENT year (#PCDATA)><!ELEMENT Skills (type, Exams)><!ELEMENT type (#PCDATA)><!ELEMENT Exams (year, city)><!ELEMENT year (#PCData)><!ELEMENT city (#PCDATA)>Is this ok? Have I done anything wrong?Thanks! Link to comment Share on other sites More sharing options...
boen_robot Posted March 23, 2006 Share Posted March 23, 2006 The only wrong I see here is the first line. It has to go(be removed). What it shows is DTD's basic syntax. It's not suppose to be part of the DTD. Also, at the end of the whole code, there's the "]>" missing. Link to comment Share on other sites More sharing options...
Gavin121 Posted March 23, 2006 Author Share Posted March 23, 2006 Ok, ive changed them. Did you have a look at the original question?Do you think it does what has been asked?I've added the XML aswell. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now