web databse interfacing
Download
Skip this Video
Download Presentation
WEB DATABSE INTERFACING

Loading in 2 Seconds...

play fullscreen
1 / 35

WEB DATABSE INTERFACING - PowerPoint PPT Presentation


  • 70 Views
  • Uploaded on

WEB DATABSE INTERFACING. Colorado Technical University IT420. Web Database Software. HTTP - (Hyper Text Transfer Protocol) an application level protocol supporting platform-independent communications.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' WEB DATABSE INTERFACING' - jacqueline-talley


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
web databse interfacing

WEB DATABSE INTERFACING

Colorado Technical University

IT420

web database software
Web Database Software
  • HTTP - (Hyper Text Transfer Protocol) an application level protocol supporting platform-independent communications.
  • URL - (Uniform Resource Locator) naming mechanism used by HTTP clients to access data - Contain:
    • Retrieval protocol, Internet node desired
    • File System directory, File name of resource to be served
web database software contd
Web Database Software contd.
  • URL’s provide the naming scheme and location as well as the protocol needed to access the desired resource.
  • HTML - (Hyper Text Markup Language) hypertext and links combined into an ASCII text document that can be read by a Internet Browser.
  • The WEB has created the worlds largest set of “spaghetti code” to exist.
web appeal
Web Appeal
  • The main appeal for the Web consists of two capabilities of the HTTP protocol:
    • Capability to transfer complex data types.
    • Ability to communicate among HTTP clients and other protocols using different gateways, e.g gopher, SMTP, etc.
html page construct
HTML PAGE CONSTRUCT
  • All HTML pages must make use of the following three tags:
  • <HTML> Indicates that this is an HTML file. Format is as follows:
      • <HTML>
      • …your page…
      • </HTML>
html page construct cont d
HTML PAGE CONSTRUCT - Cont’d
  • <HEAD> Used to specify the prologue of the file. Usually, only a title is placed in the head tag. Format is as follows:
      • <HTML>
      • <HEAD>
      • <TITLE>This is the title.</TITLE>
      • </HEAD>
      • ………...
      • </HTML>
html page construct cont d1
HTML PAGE CONSTRUCT - Cont’d
  • <BODY> Used to bound remaining part of HTML document, e.g. text, links, JPGs, etc. Format is as follows:
      • <HTML>
      • <HEAD>
      • <TITLE>This is the title.</TITLE>
      • </HEAD>
      • <BODY>
      • ………...
      • </BODY>
      • </HTML>
incorrect nesting
Incorrect Nesting
  • <HTML>
  • <HEAD>
  • <BODY>
  • </HEAD>
  • </BODY>
  • </HTML>
html title
HTML TITLE
  • The <TITLE> tag is used to identify what the page describes.
  • This tag will also be used if someone saves the page as a bookmark.
  • Title can only contain plain text (No special markups allowed).
  • Since title is displayed in your browser, make it short so that it fits.
headings
HEADINGS
  • Headings are used to divide sections of text.
  • A maximum of six levels of headings can be used.
  • Headings are of the form
    • <H1>
    • Heading Text
    • </H1>
paragraphs
Paragraphs
  • Paragraphs markers are used to indicate the beginning and end of a paragraph. Markers are as follows:
    • <P>
    • paragraph text
    • </P>
    • The closing tag </P> is optional. The opening tag <P> is required.
page url links
Page/URL links
  • The format for a link is as follows:

<A> HREF=“../menu.html”>Go back to Main Menu</A>

File/URL to load

when link is selected.

Text that will be highlighted.

Opening Tag

Closing tag

html forms
HTML Forms
  • Creating forms consists of two major steps:
    • Create the form layout
    • Handle the data (scripts, mail, etc.)
  • Forms are created using the <FORM> and </FORM> tags
  • Do not nest <FORM> tags. It will not work.
html forms cont d
HTML Forms - Cont’d
  • Form Tag consists of two attributes:
    • Method - This can be either GET or POST. This determines how form is handled by script.
    • Action - Usually a pointer to a script. This can also be a pointer to a URL or instructions to mail a message.
  • Format is as follows:
    • <FORM METHOD=POST ACTION=“http://www.myserver.com/cgi-bin/script.cgi”>
    • ……..
    • </FORM>
submitting a form
Submitting a Form

<HTML><HEAD>

<TITLE> Sample Form</TITLE>

</HEAD><BODY>

<H2>What is your name?</H2>

<FORM METHOD=POST ACTION=“some action”>

<P>Enter your Name: <INPUT NAME=“theName”></P>

<P><INPUT TYPE=“SUBMIT” VALUE=“button name”></P>

</FORM>

</BODY></HTML>

common gateway interfaces cgi
Common Gateway Interfaces (CGI)
  • CGI - (Common Gateway Interface) an interface that provides for running external programs to an HTML document.
  • Gateway programs are often scripting languages like VBScript and Javascript.
  • Programming language support can be Visual Basic, C++ or even Perl programs.
  • Environment variables are used to send parameters to the script program.
cgi implementations
CGI Implementations
  • Two primary environment variables :
    • QUERY_STRING - anything following the first question mark in the URL accessing the gateway.
    • PATH_INFO - extra information embedded in the URL accessing the gateway.
cgi implementations contd
CGI Implementations contd.
  • HTTP request/response transactions use four steps:
    • Open a connection to the server
    • Issue the request to the server
    • Receive the results from the server
    • Close the connection.
  • HTTP is a stateless system.
cgi implementations contd1
CGI Implementations contd.
  • More complex methods can be setup for interaction with a server.
  • State information can be stored and passed between the client and server (Allows DB to maintain history).
  • State information can be appended to the results the client is passing the server.
  • The CGI script could open a database and keep it open during the session.
  • The CGI must track state, however.
  • States can also be tracked with cookies.
vb cgi example
VB CGI Example

HTTP

Client

VB CGI

Includes CGI32.BAS

Access

Database

database interface methods
Database Interface Methods
  • Below are just some other ways to access databases:
    • Cold Fusion
    • HTML forms interfacing to CGI.
    • ODBC
    • Database Markup Language (DBML)
cgi database scripting
CGI Database Scripting
  • Last but not least, SQL:
  • SQL statements are embedded in the database markup language.
  • <DBQUERY Name=“Employees” Datasource=“EmployeeData” SQL=“SELECT * FROM dbEmployees WHERE EmpID = ‘#form.EID#’ “>
  • This technique for generating a SQL statement for a database is proprietary to the vendor.
web server api s
Web Server API’s
  • Another way to access databases is with Server Applications Programming Interface (API) - native code proprietary to the Web server.
  • Best performance possible with server.
  • More difficult than CGI scripting, but much faster. Eliminates CGIs.
  • Supports - multithreading, process synchronization,error handling, and programming at protocol level.
  • Improperly written - can crash server.
isapi api
ISAPI API
  • ISAPI applications for Microsoft IIS server utilize DLL’s loading at the same address space as the Web server for better performance.
  • Integrated with other Microsoft applications such as Back Office.
  • GetExtensionVersion() - entry point for ISAPI - returns version number of the DLL.
  • HttpExtensionProc() - is the entry point called for every client request.
isapi api contd
ISAPI API contd.
  • WriteClient() or ServerSupportFunction() must then be called for a response to the client from HttpExtensionProc().
  • NSAPI - Netscapes server API cross-platform version works well as long as operating system calls are not made. NSAPI is more difficult.
  • The FORM tag links to the ISAPI DLL - <FORM ACTION= “http://207.217.22.134/scripts/amulet.dll” METHOD=????>. This is similar to linking to a CGI.
internet database connector
Internet Database Connector
  • Provides ODBC access for HTTP requests on an IIS server.
  • Httpodbc.dll - the IDC ISAPI dll for ODBC database access.
  • Two types of files control access:
    • .idc - contains necessary information to connect to he database.
    • .htx - HTML template for the file returned to the browser. ASP replaces this functionality.
server side includes
Server Side Includes
  • Allows small amounts of dynamic data to be inserted into an HTML document.
  • Costs a fair amount of server resources.
  • Tags are embedded into the HTML document and read by the server side implementation.
  • A typical example of an SSI is a web counter.
server side includes cont d
Server Side Includes - Cont’d
  • SSI requires high overhead (CPU and memory) because web server has to scan through entire HTML doc to find SSI commands.
  • SSI was founded as freeware.
  • <!--#SSIcommand tag1=“value1” tag2=“value2” -->
  • SSI commands are ignored by non SSI capable servers because of the comment line. SSI aware servers will pick these up.
  • This is a non-standard HTML document.
server side include commands
Server Side Include Commands
  • SSI consists of six commands:
    • CONFIG
    • INCLUDE
    • ECHO
    • FSIZE
    • FLASTMOD
    • EXEC
  • A product called WebQuest has added some additional commands to SSI.
java database connections
Java Database Connections
  • Java Applets connect to a database using API’s provided by the vendor (native) or utilizing JDBC (a common API layer in Java).
  • JDBC lets you hide the specifics of your database from the application.
  • JDBC is platform independent.
  • DAO is available for use in the windows environment to interface J++ with Access.
active server activex
Active Server & ACTIVEX
  • Active server scripting executes completely on the server and is based on VB scripting language.
  • ACTIVEX controls execute on the server and return requested information in the HTML stream mixed with the regular HTML.
active server activex cont d
Active Server & ACTIVEX - Cont’d
  • The following occurs when an ASP is first read by the server:
    • HTML and Client side scripting code found on page is passed to the browser.
    • If server-side script code is found, it runs on the server instead of being passed back to the browser.
  • The browser does not know that page was created dynamically, it just displays the HTML.
activex data objects
ActiveX Data Objects
  • ADO is an ACTIVEX Component module that utilizes the new OLE DB technology. Making remote objects look local.
  • ADO is the data access component of ASP.
  • ADO allows you to independently create objects where DAO and RDO require a hierarchy to be created for objects.
  • ADO allows you to have build an object based interface.
pop quiz
Pop Quiz
  • What components are needed for an HTML document?
  • What is the difference between POST and GET forms?
ad