In: Categories » Internet » Web services » Implementing the E Commerce Database Interface Solution
|
The primary function of a Web server is to send appropriate HTML code to the Web browser. Today’s trend is to serve content to the Web via an e-commerce database solution. In order to make this happen, the Web server must communicate with the database. The Web server must make requests to the database, interpret the database’s response, and pass on the appropriate data to the Web browser. In order for the Web server to communicate with a database, it must communicate through an Application Programming Interface (API). There are many different types of database access APIs available for the developer—ranging from proprietary to open standard APIs. A Web database developer has many options from which he can select the API that best meets the requirements of the project. However, the developer must be very careful in the selection of the API if he must support a heterogeneous environment. One API might not support all database or Web servers in the developer’s environment. Embedded SQLIn the early days of relational databases, the only portable interface for applications was Embedded Structured Query Language (SQL). There was no common function API and no standard Fourth Generation Language (4GL). Embedded SQL uses a language-specific Precompiler. SQL commands are embedded in a host programming language, such as C or COBOL. The Precompiler translates the embedded commands into host language statements that use the native API of the database. The problem with using Embedded SQL is that there must be a compiled version of the database interface for each database and operating system supported. This is not efficient or useful for heterogeneous environments. Also, the developer may run into problems with each database vendor’s C API. Not all database APIs are created equal. ODBCWhen building a Web site that must connect to many different databases, the first database connectivity standard normally considered is Open Database Connectivity (ODBC). ODBC is a logical choice, because it is a standardized API. It is a set of function calls based on the SQL Access Group (SAG) function set for utilizing an SQL database system (backend system). The SAG set implements the basic functionality of Dynamic SQL. Embedded SQL commands can be translated to call ODBC. Finally, there are ODBC drivers for every major database application. Applications access ODBC functions through the ODBC Driver Manager, which dynamically links to the appropriate ODBC driver. ODBC drivers translate ODBC requests to native format for a specific data source. The data source may be a complete RDBMS, such as FirstSQL, or it may be a simple file format, such as Xbase. In other words, most ODBC drivers are tied to a single data source. Some, like FirstSQL, support multiple data sources. The FirstSQL ODBC driver supports both a FirstSQL data source and an Xbase data source. Though its name begins with open, implying that it is not tied to a single vendor or even to a subset of RDBMS vendors, ODBC is controlled by a single vendor: Microsoft. Microsoft defines the specification of the API and supplies the basic driver manager software used on their operating systems. This control has some good aspects and some bad for the future of ODBC. Microsoft has made reasonable, useful extensions to the original SAG definitions in creating ODBC. Later releases have refined those extensions. Microsoft has committed to bringing future versions of ODBC more in line with SAG’s specifications and with existing standards. OLE DBIn a major strike against ODBC, Microsoft is touting their Object Linking and Embedding Data Base (OLE DB) facility as a replacement for ODBC. OLE DB could be viewed as an object layer placed on top of ODBC, but Microsoft is likely to provide direct OLE DB drivers for their database products and to de-emphasize and perhaps discontinue ODBC drivers for their products. OLE DB is not open or portable except between Microsoft operating systems (OSs), which is now a single Windows OS NT. Because of Microsoft’s total control of the specification and arbitrary complexities in the facility, OLE DB will not be supported by other operating systems—Operating System 2 (OS/2), Macintosh Operating System (MAC OS), and various flavors of Unix. ODBC, and Embedded SQL to a lesser degree, will remain as the only open and portable interfaces for SQL accessible databases. Unfortunately, the fate of ODBC is completely under the control of Microsoft. Java and JDBCJava Database Connectivity (JDBC) is an SQL-level API that allows you to embed SQL statements as arguments to methods in JDBC interfaces. To allow you to do this in a database-independent fashion, JDBC requires database vendors to furnish a runtime implementation of its interfaces. These implementations route your SQL calls to the database in the proprietary fashion it recognizes. As the programmer, though, you do not ever have to worry about how JDBC is routing SQL statements. With JDBC, you can run the same code no matter what database is present. A Java client/server application can make use of one of the following three major database architectures:
The majority of today’s databases are relational databases. Thus, the JDBC API is heavily biased to relational databases and SQL. There is an architectural conflict between Java and relational databases. Java is object-oriented, whereas relational databases are not object-oriented. Therefore, mapping between the Java objects to the SQL relationship must occur. It is up to the developer to do this mapping. The use of Java and JDBC has two distinct advantages for heterogeneous Web application development. It is database independent and facilitates distributed computing. A Java database application does not care what database engine is used. Therefore, the developer can change the database engine without having to change the Java application. In fact, the developer can write a class library that maps business objects to database entities in such a way that the application does not know that a database is in use. Using Java for distributed computing has the advantage that the user can download the Java code as he needs it. The administrator does not have to install the software on each user’s workstation. This model is very beneficial when it comes time to update the application. The administrator does not have to reinstall software. DBI-PERLPractical Extraction and Reporting Language (PERL) is most likely the most common scripting language used on the Web today. It is predominantly used with the Uniplexed Information and Computing System (Unix) operating system, even though it can be used with Windows NT®. PERL is well-suited for the Web because it is a language that was written to handle text and text files. The PERL community also needed an interface to databases. Because PERL is an open source application, the Database Interface (DBI) is perfect for this task.
In simple language, the DBI interface allows users to access multiple database types transparently. So, if you are connecting to an Oracle, Informix, mSQL, Sybase, or whatever database, you don’t need to know the underlying mechanics of the 4GL layer. The API defined by DBI will work on all of these database types. A similar benefit is gained by the ability to connect to two different databases of different vendors within the one PERL script (if you want to read data from an Oracle database and insert it back into an Informix database all within one program). The DBI layer allows you to do this simply and powerfully.
|
legal disclaimer
1) Our website is not responsible for the information contained by this article as well for any and all copyright infringements by authors and writers. E-articles is a free information resource. If you suspect this article for any copyright infringements, please read the Terms of service and contact us to investigate the problem.
2) The E-articles directory team is not responsible for inaccuracies, falsehoods, or any other types of misinformation this tutorial may contain and will not be liable for any loss or damage suffered by a user through the user's reliance on the information gained here. Please read the Terms of service
Useful tools and features
related articles
After businesses have built a Web site and implemented SSL certificates to authenticate themselves to customers and encrypt communications and transactions, they must address another crucial component of an e-commerce infrastructure. This involves enabling customers to easily pay for products and services online—and processing and managing those payments in conjunction with a complex network of financial institutions. Today’s fragmented Internet payment systems often connect online merchants to banks via p...
2. Why You Should Use Web Services
There are two main reasons to use web services, both remarkably straightforward: someone else has information you require, or you have information you wish to provide to others. When planning a new web service, remember that servers can either provide or accept information. Remember that web services can provide any level of security, from a completely open service open to all who request it, to a private service with transfers happening over SSL and client-side certificates to validate identities. Convincing the Boss...
3. How to Obtain Your SSL Certificate
To complete your SSL certificate enrollment, please visit one of many sites, for example: http://www.verisign.com/products/site. There, you will be instructed to complete the following steps. Generate Certificate Signing Request: Follow the instructions in your server software manual, or online at http://digitalid.verisign.com/server/enrollStep3.htm, to create a Certificate Signing Request (CSR) and a key pair. After the server software creates the two files, make backup copies of them o...
4. What are Web Services and How are they used
Web services are a collection of protocols that are used to exchange data between disparate applications or systems. The essence of web services is the open standards on which they are built, by leveraging public and common protocols like HTTP, along with the XML document model. Web services are easy to implement with existing technologies. Not only are you (as a PHP developer) already familiar with many aspects of web services and the tools required, but you already have the facilities required to deploy them. Why They Are U...
In physical transactions, the challenges of identification, authentication, and privacy are solved with physical marks, such as seals or signatures. In electronic transactions, the equivalent of a seal must be coded into the information itself. By checking that the electronic “seal” is present and has not been broken, the recipient can confirm the identity of the message sender and ensure that the message content was not altered in transit. To create an electronic equivalent of physical security, some vendors use adva...
6. External Blogging Personality Types
Instead of providing a dry list of the top ways you can use blogs, I’ve decided to look at blogging in a different way. I have taken the top seven types of business blogs and personified them as different characters, or locations, within a city. Let’s take a tour of this virtual city and visit some people and places your business may want to work with as it discovers, experiments with, and eventually embraces blogging: • The Barber Barbers can prove to be prominent citizens— they know the right...
7. What You Can Learn from Log Analysis: The Basics
Any software you might use to make sense of your Web site is likely to find its way onto a list of log analysis tools. There are a lot of tools and many more become available every day. The last time I looked, there were nineteen of them at this Yahoo! category: http://dir.yahoo.com/Computers_and_Internet/Software/Internet/World_Wide_Web/Servers/L og_Analysis_Tools/. But there were another forty-three at this site: http://dir.yahoo.com/Business_and_Economy/Business_to_Business/Communications_and_N etwork...
8. A Wealth of Measurement Methods on the Web
There's no end to the things you can measure. Studies can correlate employee punctuality to manufacturing output, press release flamboyance to investor turnover, and frequency of atdesk massages (remember those?) to grammatical errors per email. So let's start simple and start with the Four R's: ROI, ROA, ROE, and ORI. Return on Investment (ROI) I first heard the words return on investment when I opened an account at Palo Alto Savings with a $25 birthday fortune received from my grandmother. I'd ne...
9. What is bandwidth related to Web Hosting
In terms of web hosting the bandwidth is a measure of the data that sent to web surfer computer from web hosting company. If you have a big site that offer downloadable large files or thousands of visitors visit your website daily than you probably need more bandwidth. Web hosting companies offer variety of plans with different bandwidth option. Many web hosting company offer unlimited bandwidth feature but they will charge you higher. So, best is that if you go thro each features and plan and compare it with your web site req...










