Software Requirements  «Prev  Next»
Lesson 4 Databases and Web sites
Objective Explain the characteristics and protocols of back-end Web databases.

Database Website Interaction

As a web developer within the ecommerce sector, it is crucial to understand the characteristics and protocols governing back-end web databases, which are foundational to managing the vast quantities of data generated and utilized by online retail platforms.

Characteristics of Back-End Web Databases:

  1. Scalability: E-commerce databases must handle a significant load, with the ability to scale up during peak traffic periods or as the business grows. This includes both vertical scaling (adding more power to the existing machine) and horizontal scaling (adding more machines to the database system).
  2. Performance: High performance is non-negotiable, as slow database responses can result in increased page load times, adversely impacting user experience and potentially sales.
  3. Reliability: Databases must provide consistent and reliable access to data, ensuring that transactions are processed accurately and without loss, even in the event of system failures.
  4. Security: Given the sensitive nature of transaction data, including personal and financial information, databases must incorporate robust security protocols to prevent breaches, unauthorized access, and data leaks.
  5. Data Integrity: The database must enforce data integrity constraints to ensure that all data is accurate, consistent, and valid across the database.
  6. Concurrency Control: They must efficiently manage concurrent access to data by multiple users or systems, often via locking mechanisms or multiversion concurrency control (MVCC) to prevent conflicts and maintain data accuracy.
  7. Transaction Management: Databases should support ACID (Atomicity, Consistency, Isolation, Durability) properties to ensure that all transactions are processed reliably.
  8. Data Redundancy and Backup: Regular backups and redundancy mechanisms, such as replication, are essential to prevent data loss and facilitate quick recovery in case of hardware failures or other issues.

Protocols of Back-End Web Databases:

  1. Structured Query Language (SQL): The primary language used for managing and querying data in relational databases.
  2. Hypertext Transfer Protocol (HTTP) and HTTPS: While not a database protocol per se, HTTP and HTTPS are often used in web applications for communication between the front end and the back end, with the latter including secure, encrypted data transfers.
  3. Data Access APIs: Application Programming Interfaces (APIs) like JDBC (Java Database Connectivity) for Java applications, and ODBC (Open Database Connectivity) for accessing databases in a language-independent way.
  4. RESTful APIs: Representational State Transfer (REST) APIs are commonly used for web services that allow the front end to communicate with the database indirectly through back-end logic.
  5. NoSQL Protocols: For NoSQL databases, which might be used in certain aspects of e-commerce for flexibility, different protocols are used, such as the Cassandra Query Language (CQL) for Apache Cassandra.
  6. Replication Protocols: These are used to synchronize data across different database servers or instances, ensuring consistency and availability.
  7. Database Connection Protocols: These include TCP/IP for standard network connections to databases, which can be secured with SSL/TLS for encryption.

As a back-end web developer, your expertise in leveraging these characteristics and protocols will directly contribute to building robust, secure, and efficient e-commerce systems that can support complex transactions and deliver seamless customer experiences. It is through this understanding that one can create back-end systems capable of withstanding the demanding environment of e-commerce operations.

Characteristics and Protocols of Database Websites

The different database models you just learned about each have their own benefits and drawbacks. Web-databasesion of a database model for a particular project will depend on what your clients have identified as the major purposes that their database will serve. Web sites of large organizations almost always have some kind of database features included. These database-driven Web sites are characterized by:
  1. Mechanisms to display data from the database
  2. Queries of the database using criteria from the user
  3. The ability to send formatted data from the user for storage in the database

E-Commerce sites are prime examples of database-driven Web sites. The data in an e-commerce site must be available to retrieve, display, and store data for commerce to occur. In addition, the data must be checked for required data and format, and security and integrity during its transport.

How do they communicate?

In order for a database to be an integral part of a website, there needs to be a permanent mechanism for communication between the web server and the database server and there must always be a way for the client machine to communicate with the web server which is being served remotely. The following series of images illustrates the communication process.


1) User clicks through browser.
1) User clicks through browser.

2) Browser sends http requests for information to web server.
2) Browser sends http requests for information to web server.

3) Web server receives the requests. CGI scripts, APIs, and custom middleware solutions are used to talk to the database server.
3) Web server receives the requests. CGI scripts, APIs, and custom middleware solutions are used to talk to the database server.

4) Database server engages database access protocoles to access the data in a database.
4) Database server engages database access protocoles to access the data in a database.

5) Data report returned to database server.
5) Data report returned to database server.

6) Database server sends report back out through middleware to Web Server.
6) Database server sends report back out through middleware to Web Server.

7) Web server receives report and transmits it on to user who requested it.
7) Web server receives report and transmits it on to user who requested it.

Server Side Interaction with Databases

The primary advantage of server-side programming technologies is their ability to utilize databases. Databases are very efficient and powerful tools used for storing and retrieving data. Most sophisticated Web applications utilize databases for storing their data. Server-side programming is also very reliable. Servers provide a more stable, secure, and controllable programming environment then the browser of the client.
Requisite technologies have converged sufficiently to allow dynamic access to databases usingWeb browsers. The Web has provided a global infrastructure, a set of standards, and a presentation format, while database technology has contributed storage techniques, query languages, efficient access to large bodies of highly structured data, and mechanisms for maintaining the integrity and consistency of data. Prior to theWeb, Internet access to databases was hampered by low bandwidth, the lack of a standardized interface, and platform dependencies . The emergence of the Web helped fix the interface and platform problems, and high-speed connections are helping to fix the bandwidth problem. Yet another problem to be solved was how to access databases dynamically, avoiding the problem of having to convert database data manually to text suitable for transmission using the hypertext transfer protocol (HTTP). This problem has been solved through the use of programs and scripts that convert relational data to hypertext markup language (HTML) for transmission over the Web.

Database Supporting Roles

Not every database application is directed toward public outreach and public access, although the public side often works in conjunction with the private side. This section briefly discusses types of databases and the support they provide to organizations. They are seldom used for transaction processing but can be useful as part of the informational services of an organization. They are of vital interest to libraries, information agencies, and information research units within organizations, and they make up an important component in corporate knowledge-management operations digital libraries and data mining. Back-office databases are part of an internal information system supporting the functioning of the organization. Some portions of the databases may be made available to Internet users, but they are less often used in transaction processing. Typically, back-office applications

Database Access Protocols

Protocol Description
ODBC The most common general database protocol is Open DataBase Connectivity (ODBC). This technology was developed jointly by IBM, Microsoft, and a number of other manufacturers in the late 1980s to make it easier to interoperate between their various database products. The snap-in components of ODBC are know as ODBC drivers, and they can be found or bought for virtually every common database platform. ODBC is slower than newer technologies such as OLE-DB, but has the widest support of both databases and applications that can use ODBC to access a database.
JDBC Sun released JDBC, the Java equivalent of ODBC, shortly after Java was released. This is the connection method of choice for Java applications, but drivers exist for fewer databases than with ODBC.
OLE-DB While OLE DB is still supported by Microsoft, it is considered a legacy technology and is not actively being developed. Microsoft recommends using newer technologies such as ADO.NET or ODBC for new development.

In the next lesson, you will learn the importance of data modeling