Click to See Complete Forum and Search --> : DTD help


funtik
11-27-2008, 05:45 PM
Hi!
I have database with tables Person(Name, Dept, ShoeSize) and Department(DName,Head, Tel).
I need to write DTD to transmit data to another site and DTD must satisfy the condition:
Each tuple is transmitted contiguously, but there are no XML elements corresponding to tuples or tables.

the matter is I really do not get clear picture of what I am asked.
I would appreciate if you can help me

rpgfan3233
11-27-2008, 11:55 PM
That is really confusing... I mean, an XML document with a DTD fitting that model would be easy, but writing a DTD that contains the data? That doesn't make *any* sense. DTDs aren't for data, they're for describing how elements work, and those elements contain/describe the data...

Are you sure that is what you're supposed to do? Is there any way to get some clarification?

funtik
11-28-2008, 07:46 AM
That is really confusing... I mean, an XML document with a DTD fitting that model would be easy, but writing a DTD that contains the data? That doesn't make *any* sense. DTDs aren't for data, they're for describing how elements work, and those elements contain/describe the data...

Are you sure that is what you're supposed to do? Is there any way to get some clarification?

Hi...the question looks like this:

Suppose you are given a database with tables Person(Name, Dept, ShoeSize) and Department(DName,Head, Tel).
(a) Write down three DTDs that could be used to transmit the contents of the database to another site. The DTDs can use the tags such as Person, Department, Name, DName, etc that are used to de fine the relational schema, as well as other tags, such as Person-table as needed. The DTDs
are described as follows:
i. An element is constructed for each table and they are transmitted one after the other.

ii. Person and Department tuples are intermixed, and there is an XML element for each tuple.
iii. Each tuple is transmitted contiguously, but there are no XML elements corresponding to
tuples or tables.
(b) Further suppose you know that Name and DName are keys for their respective tables and that Dept is non-null and references the foreign key DName. Construct a DTD in which Employee elements are inside the appropriate Department elements.

cheers