4. An ODBMS supports Java and allows you to use a custom interface
2. Database model characteristics
Most transactions over an intranet, extranet, or the Internet involve accessing or modifying the contents of a database. Apart from the actual database, database-driven web sites require various other components.
In addition to data storage, you require a query language or other method of accessing and retrieving data from a database. This access method is called the process logic.
You also need a user interface that provides access to run process logic and present the returned data in a well-organized and readable form.
The distribution of the data storage, process logic, and user interface elements of a database is often organized according to four database models.
1-tier
The 1-tier database model is the classic model for database access.
In this model, one computer is responsible for the user interface, process logic, and data storage functions.
2-tier
The 2-tier database model divides the database management functions between the server and the client. In this model, the server is responsible for data storage and the client is responsible for the user interface.
The process logic can run on either computer.
3-tier
In the 3-tier database model, the user interface runs on the client. The process logic runs on an application server, and the database resides on a database server.
The thin client solution is an example of a 3-tier model. In this solution, the web browser accesses a database server via a web server.
The 3-tier model is useful in environments where the stored data is sensitive. The database can be stored behind a firewall with access from external sources limited to a single web server.
n-tier
The n-tier database model is one where the application program is distributed among three or more separate computers in a distributed network.
92
The first tier consists of the user interface software, usually called the front end. The data servers, often referred to as the back end, make up the third tier. The second tier is where the business logic is handled. Additional tiers in the application are usually added between the web server and that data server. These tiers are referred to as middleware.
Because the n-tier model uses multiple computers to manage the process logic, the system load remains balanced. This means that no computers become overloaded with requests for
database access.
The n-tier model also leads to performance enhancement because each service runs on a system dedicated to performing that function. There is always a computer available to manage the process logic if one of the other computers fails.
Graphic
The diagram of an n-tier database model shows a computer connected through the Internet to three web servers. These, in turn, are connected to a database server.
Question
Your database access solution consists of a database server, multiple clients that each provide a user interface, and an application server that performs the process logic.
What kind of database model have you implemented?
Options: 1. 1-tier 2. 3-tier 3. 2-tier
Answer
Option 1: Incorrect. A 1-tier model comprises a single computer that is responsible for the user interface, process logic, and data storage functions.
Option 2: Correct. The 3-tier model consists of one or more clients as the first tier, an application server for the second tier, and a database server as the third tier.
Option 3: Incorrect. The 2-tier model consists of a client and a server. The server is responsible for data storage and the client is responsible for the user interface.
93
2. 3-tier3. Database connectivity standards
To access a data store, you need to create a data access application that includes data query statements and you need to implement a database application programming interface, or API. You can use different APIs to access data stores. These include Open Database Connectivity, known as ODBC, Object Linking and Embedding Database, referred to as OLE DB, and Java Database Connectivity, known as JDBC.
The ODBC standard was developed by Microsoft. Its main purpose is to provide a consistent application programming interface, known as an API, to many different types of RDBMS applications.
ODBC resides between the RDBMS and the application being used to access and manipulate data. A driver for the RDBMS must be installed and registered with the operating system in order for an ODBC-compliant application to interact with it.
The ODBC driver receives instructions from applications. These requests are translated into a form that the database understands before being issued to it.
OLE DB was developed by Microsoft and is similar to ODBC except that it can access data sources other than databases.
The JDBC standard was developed by JavaSoft, a subsidiary of Sun Microsystems. It helps the database to understand and reply to the client's data requests. Unlike ODBC, which is largely related to Microsoft operating systems, JDBC is platform independent.
Methods to enable database access and data management include
ColdFusion
ColdFusion was developed to facilitate server-end database access. It uses its own proprietary language, ColdFusion Markup Language, which is known as CFML. ColdFusion files are called templates and use the .cfm extension.
The main advantage of ColdFusion is its simplicity. Whereas many scripting languages are derived from difficult programming languages, ColdFusion uses the syntax of HTML tags, so it's easy for non-programmers to use. The tags, all starting with the letters CF, are parsed and executed by the server before the page is returned to the client.
ADO.NET
ADO.NET is the Microsoft standard for accessing data sources such as SQL Server and XML. Active Server Pages, or ASP.NET, works with ADO.NET to provide web sites with data access capabilities.
94
Scripting languages play an important role in web database interfacing. Their strengths lie in their portability and ease of use. CGI programming with Perl is one of the most common methods for accessing and displaying data from a relational database on the Web. Perl stands for Practical Extraction and Report Language. Other scripts include PHP and MySQL.
save as HTML
Many current database products allow you to save a database as an HTML file. As a result, you can publish the database tables directly to a web server as HTML. This method is limited and does not offer much functionality.
ADO.NET distinguishes between data access and data manipulation so that they can be used separately or together. It includes .NET framework data providers that can connect to databases and execute commands as well as retrieve results.
Different providers can be used with ADO.NET to access SQL Server or Oracle data sources or sources exposed by ODBC, or OLE DB.
It's possible for Perl scripts to retrieve database information indirectly from a text file. However, it's more efficient to employ Perl extension products to gain dynamic database access.
PHP, or Hypertext Preprocessor, is another popular language for building dynamic web pages. It is widely regarded as a more efficient language than Perl for making your HTML pages
communicate with a database. A common database that is used with PHP is MySQL. In combination, MySQL and PHP are often used for blogs, bulletin boards, and calendar applications.
Question
Which technologies can be used to connect to a database?
Options: 1. ADO.NET 2. ColdFusion 3. PHP 4. XML
Answer
Option 1: Correct. ADO.NET is the Microsoft standard for accessing databases. ASP.NET works with ADO.NET to provide web sites with data access capabilities.
Option 2: Correct. ColdFusion was developed to facilitate server-end database access. It uses its own proprietary language known as CFML.
95
Option 3: Correct. PHP is commonly used to access MySQL data.
Option 4: Incorrect. A data source can be in XML format and can be accessed using a data access technology and a data provider such as OLE DB.
Correct answer(s):
1. ADO.NET 2. ColdFusion 3. PHP
Summary
Most transactions over an intranet, an extranet, or the Internet involve accessing or modifying a database. Databases can be non-relational, relational, or object-oriented.
Database systems may be organized in a 1-tier, 2-tier, 3-tier, or n-tier model. DBMS is software that allows you to store, access, and edit data in an organized and secure way. It allows you to work with hierarchical and network database types. You manage relational and object-oriented databases using RDBMS and ODBMS.
You manage object-oriented databases using an object database. Two standards govern these forms of access. They are the ODBC and the JDBC standard. You can use several methods and applications for database access and management.