The Web and Data Management - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

The Web and Data Management

Description:

Magnification of a thumbnail image. Spatial zoom. X-ray ... form method='post' action='execsqlcmd.php' Enter SQL query br textarea name='sqlcmd' rows='5' ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 30
Provided by: richar864
Category:

less

Transcript and Presenter's Notes

Title: The Web and Data Management


1
The Web and Data Management
  • Experience is never limited, and it is never
    complete it is an immense sensibility, a kind of
    huge spider-web of the finest silken threads
    suspended in the chamber of consciousness, and
    catching every air-borne particle in its tissue.
  • Henry James

2
New data management role
  • Managing Web site data
  • Linking databases to the Web
  • Multimedia databases

3
Information presentation
  • Information architecture
  • The macro organization of information
  • Information design
  • The arrangement of information structures
  • Information arts
  • The arrangement of information elements on a page

4
Organization models
5
Navigation aids
  • Signs let visitors know where they
  • are
  • can go
  • Good examples are the London Underground and
    Paris Métro

6
The design process
  • Architecture
  • Outline the broad structure
  • Use an outliner
  • Design
  • Clarify the form of each section
  • Show linkages between pages
  • Information arts
  • Add the information elements to each page

7
The design process
  • Consistency
  • A consistent look and feel accelerates
    information finding
  • A performance
  • Web sites are expected to be entertaining as well
    as informative
  • The Web site defines the firm for many
    stakeholders
  • The shop window or building facade

8
Web site management
  • Creating and maintaining HTML
  • Use a special-purpose editor
  • Managing a Web site
  • Use a special-purpose tool such as Adobe GoLive

9
Site management
10
Site management
  • Visual site management
  • Automatic link changes
  • Link checker
  • Internal
  • External
  • Web site publishing

11
Some guidelines
  • All images in one file
  • Consistent naming
  • Lowercase

12
Resource Description Framework
  • We need a more precise description of what is on
    the Web
  • Move the Web from machine-readable to
    machine-understandable.
  • The RDF is a general framework for describing any
    Internet resource

13
Sample RDF
  • ltrdfRDF xmlnsrdf"http//www.w3.org/1999/02/22-r
    df-syntax-ns"
  • xmlnsdc"http//purl.org/dc/elements/1.0/"gt
  • ltrdfDescription rdfabout"http//www.wiley.com
    /college/watson"
  • dccreator"Richard T. Watson"
  • dctitle"Data Management"
  • dcdescription"Support for the 4th edition
    of Data Management Databases and Organizations
    by Richard T. Watson"
  • dcdate"2003-07-01" /gt
  • lt/rdfRDFgt

14
DBMS connectivity
  • The Web browser is the interface of choice
  • One-time installation
  • Global
  • Simple design is easy to learn
  • A standard interface makes new applications
    easier to learn

15
Three-tier architecture
DBMS server
Web browser
DBMS server
Web server
Web browser
DBMS server
16
Options
  • Common gateway interface (CGI)
  • Does not scale well
  • Proprietary Web server APIs
  • Ties to vendors software
  • ASP (active server pages)
  • SSJS (server side JavaScript)
  • Java servlets and JSP
  • Java is difficult to learn

17
PHP
  • An open source server side scripting language
  • A PHP application consists of HTML and PHP
    script, which are executed by the server before
    sending a page of HTML code to the browser
  • Works with any browser
  • Platform independent
  • Versions are available for most operating systems
    and Web servers

18
PHP
  • Less network traffic because the browser has to
    send fewer commands to the server
  • Simple interface to a DBMS
  • Code cannot be seen by the browser user and thus
    security is high

19
Simple PHP scriptsimple.php
  • lthtmlgt
  • lt?php
  • echo "PHP displays this message."
  • ?gt
  • lt/htmlgt

20
Connecting to a databaseconnect.php
  • lthtmlgt
  • lt?php
  • // Connection data
  • db_name "sample"
  • db_username "rwatson"
  • db_passwd "secret"
  • connect odbc_pconnect(db_name,db_username,d
    b_passwd)
  • ?gt
  • lt/htmlgt

21
Executing SQLexecsql.php
  • lthtmlgt
  • lt?php
  • // Connection data
  • db_name "sample"
  • db_username "rwatson"
  • db_passwd "secret"
  • connect odbc_pconnect(db_name,db_username,d
    b_passwd)
  • sql "select from shr"
  • echo sql
  • resultodbc_exec(connect,sql)
  • odbc_result_all(result)
  • ?gt
  • lt/htmlgt

22
SQL command entry formsqlcmd.html
  • lthtmlgt
  • lttitlegtSQL interfacelt/titlegt
  • ltbody bgcolor"white"gt
  • ltform method"post" action"execsqlcmd.php"gt
  • Enter SQL queryltbrgt
  • lttextarea name"sqlcmd" rows"5
  • cols"60"gtlt/textareagtltbrgt
  • ltinput type"Submit"gt
  • lt/formgt
  • lt/bodygt
  • lt/htmlgt

23
SQL command entry form
24
SQL executionexecsqlcmd.php
  • lthtmlgt
  • ltbody bgcolor"white"gt
  • lt?php
  • // Connection data
  • db_name "sample"
  • db_username "rwatson"
  • db_passwd "secret"
  • connect odbc_pconnect(db_name,db_username,d
    b_passwd)
  • querystripslashes(sqlcmd)
  • echo "Query " . htmlspecialchars(query) .
    "ltbrgt\n"
  • resultodbc_exec(connect,query)
  • odbc_result_all(result)
  • ?gt
  • ltform action"sqlcmd.html"gt
  • ltinput type"submit" value"New query"gt
  • lt/formgt
  • lt/bodygt
  • lt/htmlgt

25
Error detectionexecsqlerr.php
  • lthtmlgt
  • lt?php
  • // Connection data
  • db_name "sample"
  • db_username "rwatson"
  • db_passwd "secret"
  • connect odbc_pconnect(db_name,db_username,d
    b_passwd)
  • sql "select from shr"
  • echo sql
  • resultodbc_exec(connect,sql)
  • if(result 0) echo "SQL command error"
  • odbc_result_all(result)
  • ?gt
  • lt/htmlgt

26
Development with Java
  • Java is a platform-independent development
    language
  • Java options

27
JDBC
  • Java database connection
  • Enables development of applications that are OS
    and DBMS independent

28
Processing a SQL query
29
Conclusion
  • The Web is giving many applications a new face
  • It is relatively easy to create a Web interface
    to a database
  • There are many choices
  • Open standards are preferable for long-term
    investments
  • e.g., PHP or Java
Write a Comment
User Comments (0)
About PowerShow.com