Please visit our sponsors !
The AppML Database Element
With AppML, the <database> element defines a database
connection.
The Database Element
AppML uses an <appml> document to describe an AppML application. Inside
the AppML
document a <database> element describes the connection to a database:
<appml>
<database>
<connection>music_db</connection>
<sql>select title,artist,year from cd_catalog</sql>
</database>
</appml>
|
A "view" of the database content is displayed below:
TITLE |
ARTIST |
YEAR |
Empire Burlesque |
Bob Dylan |
1985 |
Hide your heart |
Bonnie Tyler |
1988 |
Greatest Hits |
Dolly Parton |
1982 |
Database Sub Elements
The following sub elements can be used to add more information to the
application:
- connection
- maintable
- keyfield
- sql
The Connection Element
The AppML <connection> element defines the name of a database
connection.
AppML does not define how to connect to the database. It is up to the actual
Web Service to do a proper connection.
The Maintable Element
The AppML <maintable> element defines a database table.
The <maintable> element is used to define the main table of a database connection. Used
together with the <keyfield> element, it defines how to update a database.
AppML
also uses the <maintable> element to define a default sql statement if the
<sql> element is omitted.
This AppML description:
<appml>
<database>
<connection>music_db</connection>
<maintable>cd_catalog</maintable>
</database>
</appml>
|
Will default to this:
<appml>
<database>
<connection>music_db</connection>
<maintable>cd_catalog</maintable>
<sql>select * from cd_catalog</sql>
</database>
</appml>
|
The Keyfield Element
The AppML <keyfield> element defines the primary key of a database
table.
The <keyfield> can be used by a Web Service to define how to update a
database.
The SQL Element
The <sql> element is used to define a subset of records from a database.
Most Web Services will use the <sql> element to extract data from a
database. The content of the <sql> element can be any legal SQL
statement.
An XML Schema for AppML
If you have Internet Explorer, you can Click
Here to view the full XML Schema for an AppML document.
Jump to: Top of Page
or HOME or
Printer friendly page
Search W3Schools:
What Others Say About Us
Does the world know about us? Check out these places:
Dogpile
Alta Vista
MSN
Google
Excite
Lycos
Yahoo
Ask Jeeves
We Help You For Free. You Can Help Us!
W3Schools is for training only. We do not warrant its correctness or its fitness for use.
The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our
terms of use and
privacy policy.
Copyright 1999-2002 by Refsnes Data. All Rights Reserved
|