Database Reference
In-Depth Information
This PHP page is very straightforward, but it is interesting because it includes two SQL
statements. First, we use an SQL CALL statement to invoke the stored procedure and pass the
necessary parameters to it. Then we use an SQL SELECT statement to retrieve the values we
need for the construction of our Web page acknowledging the addition of a new customer. The
rest of the page reuses the same elements we have used in the previous examples.
It is also interesting that in this page we have made use of both an SQL view
(CustomerInterestsView) and an SQL stored procedure (InsertCustomerAndInterests). This
page illustrates the power of both these SQL structures and how we can use them in a Web
database processing environment.
These examples give you an idea of the uses of PHP. The best way to learn more is to write
some pages yourself. This chapter has shown all the basic techniques that you will need. You
have worked hard to get to this point, and if you are able to understand enough to create some
of your own pages, you have come very far indeed since Chapter 1.
The Importance of XML
Database processing and document processing need each other. Database processing needs
document processing for transmitting database views; document processing needs database
processing for storing and manipulating data. However, even though these technologies need
each other, it took the popularity of the Internet to make that need obvious. As Web sites
evolved, organizations wanted to use Internet technology to display and update data from
organizational databases. Web developers began to take a serious interest in SQL, database
performance, database security, and other aspects of database processing.
As the Web developers invaded the database community, database practitioners wondered,
“Who are these people, and what do they want?” Database practitioners began to learn about
HyperText Markup Language (HTML), the language used to mark up documents for display by
Web browsers. At first, the database community scoffed at HTML because of its limitations, but
it soon learned that HTML was the output of a more robust document markup language called
Standard Generalized Markup Language (SGML) . SGML was clearly important, just as im-
portant to document processing as the relational model was to database processing. Obviously,
this powerful language had some role to play in the display of database data, but what role?
In the early 1990s, the two communities began to meet, and the result of their work
is a series of standards that concerns a language called Extensible Markup Language
(XML) . XML is a subset of SGML, but additional standards and capabilities have been
added to XML, and today XML technology is a hybrid of document processing and data-
base processing. In fact, as XML standards evolved, it became clear that the communities
had been working on different aspects of the same problem for many years. They even
used the same terms, but with different meanings. You will see later in this chapter how
the term schema is used in XML for a concept that is completely different from the use of
schema in the database world.
XML provides a standardized yet customizable way to describe the content of documents.
As such, it can be used to describe any database view, but in a standardized way. As you will
learn, unlike SQL views, XML views are not limited to one multivalued path.
In addition, when used with the XML Schema standard, XML documents can automati-
cally be generated from database data. Further, database data can automatically be extracted
from XML documents. Even more, there are standardized ways of defining how document
components are mapped to database schema components, and vice versa.
Meanwhile, the rest of the computing community began to take notice of XML. SOAP ,
which originally meant Simple Object Access Protocol , was defined as an XML-based stan-
dard for providing remote procedure calls over the Internet. Initially, SOAP assumed the use of
HTTP as a transport mechanism. When Microsoft, IBM, Oracle Corporation, and other large
companies joined forces in support of the SOAP standard, this assumption was removed, and
SOAP was generalized to become a standard protocol for sending messages of any type, using
any protocol. With this change, SOAP no longer meant Simple Object Access Protocol, so now
SOAP is just a name and not an acronym.
 
 
Search WWH ::




Custom Search