Download presentation
Presentation is loading. Please wait.
1
B.Sc. Multimedia ComputingMedia Technologies Database Technologies
2
Agenda Database Definitions & Standards Architectures Server-Side Scripting Perl ASP JSP PHP Servlet XML
3
Structured Query Language SQL stands for Structured Query Language SQL is a standard computer language for accessing and manipulating databases. SQL allows you to: access a database execute queries against a database retrieve data from a database insert new records into a database delete records from a database update records in a database
4
SQL Database Tables A database most often contains one or more tables. Each table is identified by a name (e.g. "Customers" or "Orders"). Tables contain records (rows) with data. Below is an example of a table called "Persons": LastName FirstName Address City DaviesOla 20 Oldfield Way Bristol HansonNorman33 ParkSideLondon Asperone Michelle15 MargoletteParis The table above contains three records (one for each person) and four columns (LastName, FirstName, Address, and City).
5
SQL Queries SQL can query a database and have a result set returned. A query like this: SELECT LastName FROM Persons Gives a result set like this: LastName Davies Hanson Asperone
6
SQL Data Manipulation Language (DML) SQL (Structured Query Language) is a syntax for executing queries. But the SQL language also includes a syntax to update, insert, and delete records. These query and update commands together form the Data Manipulation Language (DML) part of SQL: * SELECT - extracts data from a database table * UPDATE - updates data in a database table * DELETE - deletes data from a database table * INSERT INTO - inserts new data into a database table
7
Layered Architecture local computer client browser Internet remote webserver
8
N-Tier Architecture database server 011020
9
Server-Side Scripting Advantages No special client side software required Robust security model via encryption (https) Typical Activities Design and Author scripts For particular requirements To sell or provide for wider community Use existing scripts Script will need to be configured (setup) for individual use Access to cgi-bin required on host server
10
Server-Side Scripting - PERL Perl = Practical Extraction & Reporting Language Perl has powerful text-manipulation functions Used to process World Wide Web electronic forms Provides a Common Gateway Interface (CGI) for access to systems, databases, and users Freely available for several platforms, Windows, MAC, Unix, etc.
11
PERL Example - File Uploader $Data = "/Library/WebServer/Documents/remote"; #On your server, create a directory where this program will write the files # Make sure you CHMOD this directory to 777. If you do NOT specify a $Data #directory, the program will attempt to write to the web root directory. #NOTE: YOU SHOULD ALWAYS SPECIFY A DIRECTORY TO STORE THE UPLOAD @good_extensions = (); #If you want to limit the types of extension that can be uploaded, specify them #here by adding them to the array. For example, if you wanted to permit only #the upload of gif's, jpg's and png's, then you would set the above array to #look like this: #@good_extensions = ('gif', 'jpg', 'jpeg', 'png'); #
12
PERL Example - File Uploader $max_size = 5000; #Set the maximum size of each file that is permitted. For example, # if you only want #files to be uploaded that are under 50Kb in size, set the value to: #$max_size = 50; #If you set the value to zero, remove it or comment it out, then # the size of the #uploaded file will NOT be checked.
13
Microsoft ASP ASP = Active Server Pages Microsoft's technology that enables HTML pages to be dynamic and interactive by embedding scripts either VBScript or Jscript Jscript is Microsoft's alternative of JavaScript. Since the scripts in ASP pages (suffix.asp) are processed by the server. Any browser can work with ASP pages regardless of its support for the scripting language ASP runs inside the Microsoft IIS Server
14
Java Server Pages Many Web pages that are built by CGI programs are mostly static, with the dynamic part limited to a few small locations. JSP is a technology that lets you mix regular, static HTML with dynamically-generated HTML. Similar to ASP but advantages are: Written in Java, not Visual Basic or other MS- specific language Portable to other operating systems and non- Microsoft Web servers
15
JSP Example Welcome to Our Store Welcome to Our Store Welcome, To access your account settings, click here. Regular HTML for all the rest of the on-line store's Web page.
16
PHP PHP Hypertext Preprocessor (Personal Home Page) (P-H-P) PHP started out as a wrapper around the Perl language. PHP is a server-side scripting language for HTML. Adds dynamic features to HTML pages or use it to create entire dynamic sites that generate HTML on the fly in response to user input. Syntax is a combination of C, Java, and Perl.
17
XML XML= Extensible Markup Language Markup? ‘Markup is a term applied to any set of codes or tags added to the contents of a document in order to indicate its meaning or presentation.’ XML is a meta language for constructing markup languages that reflect individual needs
18
XML XML is a markup language much like HTML XML was designed to describe data XML tags are not predefined. You must define your own tags XML uses a Document Type Definition (DTD) or a Schema to describe the data XML with a DTD or XML Schema is designed to be self descriptive
19
XML Example - Empire Burlesque Bob Dylan USA Columbia 10.90 1985
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.