How do SQL gateways work? Much like any gateway that is used in networking, a SQL gateway hides the
underlying physical access to data sources from the data requestor and manages database connections. It does this in a few steps:
- Takes an incoming query
- Makes sure the appropriate databases are connected
- Forwards the query, receives query results
- Forwards those to the requestor
In some ways, a SQL Gateway acts like message-oriented middleware.
As a website becomes more complex, a robust and efficient mechanism for the separation of
- content,
- presentation, and
- logic
is necessary.
Web Application Servers
Web application servers are Web sites that are more interactive, access large amounts
of data, and provide a rich functionality similar to that of desktop applications. Unlike desktop applications, where
all components are stored and executed on the same computer, Web applications usually follow a three-tier client/-
server architecture (see Figure 5) consisting of the Web browser, the Web server, and a database. All content and
logic are stored in the database and are retrieved and processed as necessary on the Web server. The presentation
information can be embedded with the content or stored as a separate style sheet on the database or the server.
Usually a Web application server interfaces with a relational database, which stores data in rows of tables.
The other major type of database is the
object-oriented database, which stores data by encapsulating them into objects. Relational databases are often more efficient and faster than equivalent object-oriented databases and support an almost universal database language, SQL (structured query language). The major disadvantage of developing with Web application servers, besides the inherent complexity, is the
necessity of learning a nonstandard or proprietary serverside programming interface or language. There are several
majorWeb application servers that support standard programming languages such as Java and C++, but each has
its own application programming interface (API).