Database Role in Internet Applications
Overview of current trends in database use for web applications
To understand how to really unleash the power of DBMS today, we should go back to the screenshot of Ebay that we saw in the first chapter. Ebay has a database of items and status that is connected to the web. How was this done? Let us try to get a clear theoretical picture of how DBMS are connected to the web and analyze some of the technologies that are used to connect databases to the Internet. Later, we can try connecting our Healthy Gym database to the web.
Figure 9a: 3-Tier Architecture
First, let us take a comprehensive look at how business systems like Ebay are designed. The picture above represents a 3-tier, or three-layered design. The lowest layer - the one on the right - contains the database and all the connected queries, stored Procedures etc. In previous discussions, we have learned that the data server - a computer or set of computers that contain the actual data - earlier. Here, the data server usually belongs to this layer. The application layer contains a lot of programs that both talk to the Internet and to the database. Some programs write html files that form web pages using data that they obtain from the database; others read filled data in forms and enter this data into the database. They may use insert statements or stored procedures. These programs are stored in a web server - a computer or set of computers that store web related data and protocols. There may be an application server also if the business logic of the system is very complex - in a shares or mutual funds company for instance, the calculation of certain figures may be very complex and it makes sense to separate them from the programs that generate web pages containing these calculated figures. The final layer is the web browser such as Internet Explorer. This layer actually prints out the web pages. Form validation sometimes takes place on this end. Now, let us look at some of the key terms that are in use in this context. Understanding these terms will help us understand the exercise that forms the last half of this chapter