1 / 27

Database & Server-side Scripting

Database & Server-side Scripting. Tutorial 10. Creating Database. Microsoft Access Example Create a blank database Create a table in database. Creating Database . Setting attribute. Creating Database. Setting primary key. Query Database. Query Database - Design View.

ilario
Download Presentation

Database & Server-side Scripting

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Database & Server-side Scripting Tutorial 10 ine1020 Introduction to Internet Engineering

  2. Creating Database • Microsoft Access Example • Create a blank database • Create a table in database ine1020 Introduction to Internet Engineering

  3. Creating Database • Setting attribute ine1020 Introduction to Internet Engineering

  4. Creating Database • Setting primary key ine1020 Introduction to Internet Engineering

  5. Query Database ine1020 Introduction to Internet Engineering

  6. Query Database - Design View ine1020 Introduction to Internet Engineering

  7. Query Database – Design View ine1020 Introduction to Internet Engineering

  8. Query Database – SQL ine1020 Introduction to Internet Engineering

  9. Application or Browser ADO OLE DB ODBC Relational data sources Mainframe/legacy data Non-relational data sources Database Access • Microsoft Universal Data Access (UDA) • Easy to use programming interface • Access for relational & non-relational database ine1020 Introduction to Internet Engineering

  10. Application or Browser ADO OLE DB ODBC Relational data sources Mainframe/legacy data Non-relational data sources Database Access • OLE DB (Object Linking and Ebedding DB) • Open specification • Core architecture ine1020 Introduction to Internet Engineering

  11. Application or Browser ADO OLE DB ODBC Relational data sources Mainframe/legacy data Non-relational data sources Database Access • ODBC (Open Database Connectivity) • Access data from a variety of DBMS through a single interface ine1020 Introduction to Internet Engineering

  12. Application or Browser ADO OLE DB ODBC Relational data sources Mainframe/legacy data Non-relational data sources Database Access • ADO (ActiveX Data Objects) • Ease to use, high performance, low memory overhead ine1020 Introduction to Internet Engineering

  13. Registering a Database • Specific instructions for Windows 98/2000/XP: • double-click the ODBC Data Sources (32 bit) icon in the Windows Control Panel to display the ODBC Data Source Administrator dialog. - Click the System DSN tab to view a list of all systems DSNs. - Select the name to the right of Microsoft Access Driver (*.mdb) from the list. ine1020 Introduction to Internet Engineering

  14. Registering a Database • Click Add… to display the Create New Data Source dialog. Select Microsoft Access Driver (*.mdb) and click Finish to display the ODBC Microsoft Access Setup dialog. ine1020 Introduction to Internet Engineering

  15. Registering a Database • Enter the Data Source Name and Description field. Click the Select… button to display the Select Database dialog. Select the database that you want. Click OK to close this dialog. ine1020 Introduction to Internet Engineering

  16. Registering a Database ine1020 Introduction to Internet Engineering

  17. Registering a Database • The Banking DSN is now listed. ine1020 Introduction to Internet Engineering

  18. Active Server Pages (ASP) • Server-side scripting • ASP file contains HTML and scripting code • VBScript de facto language for ASP scripting • Other languages can be used • JavaScript • .asp file extension • Send dynamic Web content • HTML • DHTML • ActiveX controls • Client-side scripts • Java applets ine1020 Introduction to Internet Engineering

  19. Active Server Pages (ASP) • ASP requires • Web server • Personal Web Server (PWS) • Internet Information Server (IIS) • How ASP works ? • Client sends request • Server receives request and directs it to ASP • ASP processes, then returns result to client • Server processes ASP file • Parsed (top to bottom) by ActiveX component asp.dll • Parsed each time requested • Web server must support ASP by providing component such as asp.dll ine1020 Introduction to Internet Engineering

  20. Active Server Pages (ASP) • ASP has several built-in objects • Request object • Access information passed by HTTP GET or POST • Used to access cookies • Response object • Sends information such as HTML or text to client • Server object • Provides access to server methods and properties • Provides method CreateObject • Used to instantiate other objects ine1020 Introduction to Internet Engineering

  21. Active Server Pages (ASP) • Scripting delimiters • <% and %> • Indicate code is to be executed on server, not client • @LANGUAGE • Specify scripting language (default VBScript) • <% @LANGUAGE = “VBScript” %> • Each time page refreshed, server loads and interprets ASP ine1020 Introduction to Internet Engineering

  22. ASP/ADO Data.html <HTML> <HEAD> <TITLE>Sample Database Query</TITLE> </HEAD> <BASEFONT FACE = "ARIAL,SANS-SERIF" SIZE = 2> <FONT SIZE = +2> <STRONG>Querying an ODBC database.</STRONG> </FONT><BR> <FORM METHOD = "POST" ACTION = "data.asp"> <INPUT TYPE = "TEXT" NAME = "QUERY" SIZE = 40 VALUE = "SELECT * FROM Info"><BR><BR> <INPUT TYPE = "SUBMIT" VALUE = "Send Query"> </FORM> </BODY> </HTML> ine1020 Introduction to Internet Engineering

  23. ASP/ADO Data.asp ine1020 Introduction to Internet Engineering

  24. ASP / ADO ine1020 Introduction to Internet Engineering

  25. Dreamweaver MX • Database Window ine1020 Introduction to Internet Engineering

  26. Dreamweaver MX • Recordset ine1020 Introduction to Internet Engineering

  27. Dreamweaver MX • Server Behaviors • Repeat regions • Dynamic text ine1020 Introduction to Internet Engineering

More Related