Databases Reference
In-Depth Information
<!ELEMENT book>
<!ELEMENT booknumber (#PCDATA)>
<!ELEMENT bookname (#PCDATA)>
<!ELEMENT publicationyear (#PCDATA)>
<!ELEMENT pages (#PCDATA)>
<!ELEMENT publishername (#PCDATA)>
F IGURE 14.8
XML Document Type Definition (DTD) for
Good Reading Bookstores' BOOK data
<book>
<booknumber>374566</booknumber>
<bookname>Catch-22</bookname>
<publicationyear>1955</publicationyear>
<pages>443</pages>
<publishername>Simon and Schuster</publishername>
F IGURE 14.9
XML for a Good Reading Bookstores' book
capable of indicating the meaning of data. It is this capability that XML, which is
also derived from SGML, focuses on. Figure 14.8 shows how the attributes in the
BOOK table in Good Reading's database, Figure 14.5, would be represented in an
XML ''document type definition'' (DTD). Figure 14.9 shows some actual BOOK
table data described by XML based on the DTD of Figure 14.8. Notice that each
actual attribute in Figure 14.9, each piece of data, is accompanied by tags indicating
its meaning . This XML ability to handle different kinds of data is put to good
use by Baptist MD, as noted earlier, and is indeed important in the Web database
environment. But beyond this ability of XML to represent data in a generalized way
that incorporates the meaning of the data with the data itself, what does XML have
to do with database management?
Finally, the answer to this question goes straight to the heart of e-commerce
and the countless databases that support it. Modern companies are interconnected
in automated '' supply-chains '' in which their information systems applications
send data to each other over telecommunications networks. This is not a new
concept. For many years this activity has been accomplished with ''electronic data
interchange'' (EDI) . For example, an automobile manufacturer's parts inventory
management system might recognize that it is starting to run short of tires on the
assembly line. When the number of tires falls below a pre-set ''reorder point'' it
automatically sends a message to an application in the tire manufacturer's computer
ordering more tires. This type of process could also apply to Good Reading
Bookstores and the publishers or book wholesalers that supply its stores. But a
classic problem in EDI has been the different data formats in the supply-chain
partners' databases. In order to automatically exchange data in an EDI arrangement,
two companies have to go to a lot of trouble to match up attribute names, types,
lengths, and so forth, with each other. Furthermore, a particular company has to go
through this with each of its supply-chain partners. It can be done and it is done,
but it is a grueling, time-consuming process.
The beauty of XML in this regard is that it provides an independent layer of
data definition that is separate from the particular formatting of each company's
Search WWH ::




Custom Search