Understanding Database Technologies

A database is a collection of related data and consists of types of data, called fields, and the data itself, frequently referred to as records. You will also often see people refer to a database field as a column and the data itself as a row. That's because most databases can display data in a table, which is a collection of columns, one for each database field, and rows, one for each record.

An example might be a database table called Addresses. In that table, you might have a column called LastName, a column called FirstName, a column called Address1, and so on. You would then have one row for each person in your Addresses table.

Accessing Databases with FrontPage

graphics/new_icon.jpg

Technologies for accessing databases over the Internet have been available for a long time. Database integration with FrontPage debuted with FrontPage 97 and a technology known as IDC/HTX. Since that time, data access has come a long way, and FrontPage 2003 provides data access using both Active Server Pages (ASP) and the latest technology in data access, ASP.NET.

Active Server Pages (ASP)

ASP pages consist of HTML code and server-side script written in either VBScript or JScript. When an ASP page is requested, the Web server processes the script in the file and dynamically generates HTML code that is then sent back to the browser. ASP pages can be used to access data in a data source or to display other dynamic information such as the user currently logged in to the Web site.

NOTE

VBScript is a subset of Microsoft Visual Basic and is most commonly used to write ASP pages. JScript is Microsoft's flavor of JavaScript.


ASP.NET

ASP.NET is very different from ASP in most respects. ASP.NET is not a scripting language. Instead, ASP.NET applications are written using full-fledged programming languages. ASP.NET developers can choose to use Visual Basic .NET, Microsoft's newest version of Visual Basic, or C# (pronounced C-sharp), Microsoft's newest programming language.

ASP.NET applications run on the .NET Framework. The .NET Framework provides developers with a powerful base on which to develop applications. ASP.NET applications are object-oriented applications, which means that developers create sections of specialized code called objects that provide the functionality for the application. This approach is commonly considered the most productive way to write applications because each type of functionality in the application is isolated to the code that defines the object. If a problem is encountered or if code has to be rewritten, the developer only has to address the code that defines the object.

ASP.NET also provides developers with a more secure development environment because the code used to write the application does not have to be deployed to the Web server. With classic ASP, the programming code is inline within the HTML document. With ASP.NET, the programming code can be compiled into a single file and then the Web server can use that file to run the application. Not only does this keep your code more secure, but also the separation of the user-interface HTML code from the programming code allows you to let designers worry about the user-interface while programmers add the code necessary to make it all work.

For those FrontPage developers who are not inclined to write any code, ASP.NET also brings radical improvements. Because FrontPage 2003 now has support for ASP.NET, users of FrontPage can take advantage of the enhanced user-interface elements that ASP.NET provides (see Figure 34.1). Instead of displaying database results in a table, FrontPage users now have access to an ASP.NET control called the DataGrid. The DataGrid gives FrontPage users access to many options to control the appearance of their data. As an added benefit, FrontPage developers can open their FrontPage Web sites in Microsoft Visual Studio .NET and make changes there as well. For more information on developing with Visual Studio .NET, check out Special Edition Using Visual Basic .NET.

Figure 34.1. The ASP.NET DataGrid provides you with more control over appearance than classic ASP.

graphics/34fig01.gif

graphics/troubleshooting_icon.jpg

If you browse to an ASP.NET page on Internet Information Services 6 and receive a 404 error, see "ASP.NET Generates 404 Error in IIS 6" in the "Troubleshooting" section of this chapter.


For more information on ASP and ASP.NET and the requirements for each, see "Data Access Technologies," p. 679.


For more information on accessing data with ASP and ASP.NET, see "FrontPage and Databases," p. 705.


Types of Data FrontPage Can Access

FrontPage can access data from the following databases:

  • Microsoft Access A database stored in a single file with a .mdb file extension.

  • Microsoft SQL Server A professional level database server that is very robust and designed to operate under heavy loads

  • Oracle A non-Microsoft database technology that is comparable to Microsoft SQL Server

  • Other Open Database Connectivity (ODBC) compliant data sources

FrontPage's database features are designed explicitly to connect to Microsoft Access, Microsoft SQL Server, or Oracle using Microsoft's ODBC driver for Oracle. However, if you want to connect to another ODBC-compliant data source, FrontPage will allow you to manually specify a connection string for that data source. A connection string contains information about a data source, such as what type of data source it is, how the connection to it should be established, what settings to use for the connection, and any authorization information required for the connection.

TIP

The documentation for your specific data type should contain example connection strings. As long as the connection string is ODBC-compliant (and the documentation should specify this), it should work with FrontPage.


Choosing a Database Type

When choosing the type of database to use, several factors need to be considered. Perhaps the most important is how many users you expect to access your data simultaneously. Many Web developers will tend to dissuade you from using Microsoft Access as a data access platform because it does not provide a robust solution for high volume Web sites. However, for many personal sites, a Microsoft Access database is a perfectly viable option and offers some advantages.

NOTE

If your Web site is hosted on SharePoint Services, the only database type available to you is SQL Server. If you want to use a Microsoft Access database as your data source, you must not run Windows SharePoint Services on your Web site.


Being able to back up your database simply by copying one file is very attractive to those who are not experts in the area of database management. Microsoft Access also requires significantly less technical expertise to administer than SQL Server or Oracle. Many Web developers may also not have access to a SQL Server or Oracle database. Even if they do have access to it on the production Web server, many Web developers are not running SQL Server or Oracle on their local machines to use for testing while developing the application. In these cases, Microsoft Access might be an attractive alternative.

In cases in which you expect high volume or anticipate that you might have more than 10 or so users simultaneously accessing data on your Web site, you might want to consider moving to a more robust solution, such as Microsoft SQL Server. In addition to being a more robust database engine and management system, SQL Server also provides numerous other benefits. With a small amount of study, a developer can learn how to use data from other data sources to populate a SQL Server database and to transform that data in any way necessary. SQL Server also provides development tools and comprehensive documentation that can aid a developer in building a Web application.

NOTE

For more information on using SQL Server in your applications, read Microsoft SQL Server 2000 Programming By Example from Que Publishing.


Many hosting companies now provide access to a SQL Server database for very little money. Most of the time, this means that they are running not only your database, but many other databases as well on the same SQL Server. In these cases, performance might suffer, but you likely won't notice too much of a slowdown. Most of the time, performance is very acceptable.

TIP

Many development languages that Microsoft ships come with a version of SQL Server, usually Microsoft Desktop Engine, or MSDE. MSDE is a scaled-down version of SQL Server designed for developers.




Special Edition Using Microsoft Office FrontPage 2003
Special Edition Using Microsoft Office FrontPage 2003
ISBN: 0789729547
EAN: 2147483647
Year: 2003
Pages: 443

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net