An Overview of Database Access on

bubblesradiographerServers

Dec 4, 2013 (3 years and 10 months ago)

94 views



An Overview of Database Access on
the Web




Using ASP and Microsoft Database Technology

Sheffield Hallam University 2003

Structure of Session


Lecture:

An Overview of Database Access Over the Web

(30 mins)


Reading exercise

1 (20 mins):



A. Introduction to Client Server technology on the web



B. Introduction to HTML, Scripting Languages ASP technology



C. An introduction to ASP



D. Getting acquainted with Microsoft Access databases


Activity 1
: Experimenting with HTML (20 mins)


Activity 2
: Experimenting with ASP (25 mins)


Activity 3
: Playing with the Shopping Cart e
-
commerce
Site (15 mins)


Structure of Presentation


Introduce ASP and Microsoft Database
technologies


3 Tiered Network architecture


Example scenario


Simulate working example of ASP


Demonstrate Shopping Cart e
-
Commerce Site


Summarise Presentation


Discuss areas for further study


What is Microsoft Access?


Microsoft’s economical, Small
-
Scale RDBMS


Currently release is Access 2002 (XP)


Little brother to Microsoft SQL Server


Front
-
end GUI building functions


Moderate performance, 100 max simultaneous
users, good enough for smaller e
-
commerce projects


Intuitive GUI, VBA programming, can build self
-
contained database applications




Access 2002


Integrated Development
Environment

SQL Server


SQL Server is very popular


Similar functionality to Access


Many more advanced features e.g. stored
procedures, triggers


SQL suitable for larger scale e
-
commerce
i.e 1000’s simultaneous users


Well worth being familiar with it!

SQL Server 2000
-

IDE

What is ASP?


ASP stands for
Active Server Pages


Developed by Microsoft


Normally coded using VBScript


Language used to ‘script’ operations on the server


invisible to client machine


Highly popular, used by 1000’s Web sites e.g.
Halifax.co.uk


Enhances Web pages by adding dynamic content


What can ASP do (that HTML can’t)?


Interact with databases to read and write data


Read and write ‘cookies’ to a users computer


Track user activity within a Web site


Check user input (validation)


Talk to other applications on server e.g. Word


Talk to custom built applications on server


Send bulk email or automated email responses


Return dynamic HTML code back to the client


Read data from the end of a URL (called a query
string)

What is ASP used for on Web?


Search engines


Online banking


E
-
commerce


Web mail


Financial calculators


Online mortgage, credit, loan applications
etc


Sample of ASP code

<%



dim req, copyright


copyright =" This sample program Copyright SHU, 2003"


req=request.QueryString("action")






if req = "search" then




response.write(“Searching Database”)





call searchResponse()


end if

%>

Scenario


Phase Test Marks


Students take phase tests on a regular basis


The tutor logs the marks for these tests on a
table called
tblmarks,

on an Database called
phase


The course leader uses an ASP page to request
the mark of any student and a pass/ fail status

Scenario


Phase Test Marks

Test
Marks

Student
completes
Phase Test

Test
Marks

Tutor
records

marks


Student
Data

Course Leader
requests

mark



Database

phase

database



Request

Architecture


Model of Client
-
Server Architecture

Web Server

(e.g. Microsoft IIS)

Client

(e.g. Windows 2000)

The
Internet

Data
Out

Data
in

ASP
Pages

ASP
pages

Keyed
Data

Data

Req.Data

Request

Database

ASP 1
-

Phase Tests

ASP Code Walkthrough


ASP code is contained within
<%

tags


VBscript syntax almost identical to VB


ASP code reads
querystring

from URL to
determine actions


ASP dynamically returns HTML via
response.write
ASP seamlessly connects to SQL database


Uses server
-
side validation to check form data


Uses inline script e.g.
<%=copyright%>

to insert
data directly into HTML code


ASP 2


Small E
-
commerce Site

ASP 3


Pushing the limits of ASP

Summary of Lecture


Introduced ASP, HTML and Access
technology


Reviewed client
-
server architecture


Simulated how ASP can be used to retrieve
data from an SQL Server database


Explained ASP code in detail


Areas For Further Study


What are the pros and cons of using ASP?
-

How do alternatives compare e.g. JSP


How does the performance of ASP compare
to VB


why is there a difference?


How much of an improvement is ASP.net?


How much better is SQL Server 2000 than
Access?


In which business situations would you
choose SQL Server over Access?