In this chapter we will look at basic database application development.

In this chapter we will be looking at how database applications are built in client-server architectures. Client-server systems operate within a network. We have a front-end client and a back-end processor. There are two primary types of architectures: two-tiered architectures and three-tiered architectures.

In a two-tiered environment we have what are called “fat” clients. These computers contain the actual database applications, and can contain actual pieces of the database as well. The back-end servers contain the database, data dictionaries, etc. In a three-tiered architecture – we have “thin” clients. The thin client computers contain presentation logic that allows for input and output. The thin clients network to a middle layer of server that includes processing logic that includes I/O processing, business rules and data management. This middleware includes several classes of software that allow an application to interoperate with other software without the user understanding or needing to code the low-level operations required to achieve this interoperatility. These middleware products are called an application programming interface (API) and a database driver to connect to a specific type of database. The most common APIs are “Open Database Connectivity (ODBC)” and ADO.NET for Microsoft platforms, and Java Database Connectivity (JDBC0 for use with Java programs. The server includes storage logic of data storage and retrieval.

PARTITIONING AN APPLICATION

Many times it makes more sense to break up an application and partition it to either the client side or to one or more servers. This is usually done to bring the application closer to the “user” and save on network traffic.

WEB APPLICATION COMPONENTS

As we look at applications that are created to run on the web – we can use our traditional three-tiered architecture to explain how we would set up these applications. To create the web application site we use the three tiered architecture plus web functionality:

 

  1. Database server – this holds the DBMS. Oracle, Microsoft SQL Server, Informix, Sybase, DB2, Microsoft Access and MySQL are some of these DBMS.
  2. Web server – this provides basic functionality needed to receive and respond to requests from browser clients. These use HTTP or HTTPS as a protocol Apache is the most common Web server software.
  3. Application Server – software provides the building blocks for creting dynamic Web sites nad Web-based apploications. Some examples include .NET Framework from Microsoft, Java Platform, Enterprise Edition (Java EE), and ColdFusion. Languages such as PHP, Python and Perl can be used here.
  4. Framework – Web browser such as Microsoft’s Internet Explorer, Mozilla’s Firefox, Apple’s Safari, Google’s Chrome and Opera.

LANGUGAGES FOR CREATING WEB PAGES

The World Wide Web Consortium (W3C) is the chief standards body for HTTP and HTML. The W3C is an international consortium of companies. It develops standards for companies to use to create Web products.

HTML – Hypertext Markup Language is the fundamental authoring language to create documents for the web. HTML is a scripting language intended to define Web document structure and layout for display purposes that uses tags and attributes.

XML – also a scripting language used to capture data structures. It stands for Extensible Markup Language.

XHTML – Extensible Hypertext Markup Language extends HTML code to make it XML compliant. The W3C wants XHTML to replace HTML as the standard scripting language

STORED PROCEDURES

As mentioned previously – we can create stored procedures that are stored on the database server and can be used as needed. Some of the advantages of these stored procedures are:

  1. Performance improves for compiled SQL statements
  2. Network traffic decreases as processing moves from the client to the server
  3. Security improves if the stored procedure rather than the data is accessed and code is moved ot the server, away from direct end-user access
  4. Data integrity improves as multiple applications access the same stored procedure
  5. Stored procedures result in a thinner client and fatter database server

BENEFITS OF THREE-TIERED APPLICATIONS

  1. Scalability
  2. Technological flexibilitiy
  3. Lower long-term costs
  4. Better match of systems to business needs
  5. Improved customer service