Databases and XML

A module of the BSc in Web Development

Niels Müller Larsen

2012-02-16


Table of Contents

Preface
Databases and XML?
This material
Who Am I
Introduction
Literature
Calendar
1. A Refresher on SQL and Databases
References for this Lesson
Database Reactivation
PHP - MySQL
Assignments
2. MySQL 5.0 Stored Procedures
References for this Lesson
Solutions to Last Weeks Assignments
Stored Procedures, Intro
Characteristics, Parameters
The First Procedure
Legal SQL in Procedure
Characteristics Clauses
Parameters
The New SQL Statements
Assignments
3. MySQL 5.0 Stored Procedures - II
References for this Lesson
Solutions to Last Weeks Assignments
Recap Loops
Error Handling
Cursor
Functions
DD
Style
Assignments
4. Triggers
References for this Lesson
Solutions to Last Weeks Assignments
MySQL 5.0 Triggers, Intro
Syntax
Privileges - Referring to OLD and NEW columns
Examples
5. Views, Intro
References for this Lesson
MySQL 5.0 Views, Intro
SQL Schema Part, First Example
Views? What for?
Formalities
Views as Opposed to Tables, Updatability
Views and Insertability
Assignments
6. An Extra Mouthful of SQL
References for this Lesson
Solutions to Last Weeks Assignments
Relational Algebra
Assignments
7. Introduction to XML
References for this Lesson
Solutions to Last Weeks Assignments
Introduction to XML
Let's Try It
XML Family
XHTML, Familiar?
Namespaces
Applying CSS for Browser Display
XSLT Intro
Assignments
Assignments
8. XML DTDs
References for this Lesson
Solutions to Last Weeks Assignments
Creating Formal Rules
Using DTDs
Odds and Ends on Elements
Attributes
Entities
Applying the DTD
Assignments
9. XML in The Browser
References for this Lesson
Solutions to Last Weeks Assignments
XPATH Briefly
XSLT in Practice
Assignments
10. XSLT Detailed
References for this Lesson
Solutions to Last Weeks Assignments
XPATH Again
XSLT Programmatically
Selections
Iterations
Assignments
11. XML and The DOM
References for this Lesson
Solutions to Last Weeks Assignments
Client Side Scripting
Utilizing the DOM
XSLT from JavaScript
Assignments
12. XML from PHP
References for this Lesson
Solutions to Last Weeks Assignments
SAX, Simple Accessible XML
DOM, Document Object Model
SimpleXML
Differentiating Between Methods
Assignments
A. Setting Up 3 Tier Client Server Environment
Apache, MySQL, PHP
B. Download, Installation and Setup of Java, aka the Sun JDK
Download and Install
Path Setup
Search Path for Linux, and MAC
C. Download, Installation and Setup of the Eclipse SDK
Download, Install, and Test
D. Solutions to Assignments
Assignments From Chapter 1
Assignments From Chapter 2
Bibliography

List of Figures

1.1. A simple ER diagram
1.2. Degrees of Relationships
1.3. Attributes
1.4. An ER diagram
6.1. Schematical Overview
7.1. A Bit of language History
7.2. Well-formedness As The Browser Sees it
7.3. Well-formedness As The Editor Sees it
A.1. Windows environment setup
A.2. Path edit
A.3. Creation of One of the Databases
A.4. After the creation
B.1. Windows environment setup
B.2. Linux/Mac Path Check Succesfully
B.3. Linux/Mac Path Unsuccesfull Check
C.1. Eclipse Splash Screen
C.2. Eclipse Workspace Designation
C.3. Eclipse Welcome
D.1. An ER diagram

List of Tables

1.
8.1.

List of Examples

3.1. Blueprint for t3/t13 and t4/t14
6.1.
6.2.
10.1. browsere.xml
10.2. List: browsere.xsl
10.3. Sorted List: browsere1.xsl
10.4. Numbereded List: browsere2.xsl
10.5. Selection if: browsere3.xsl
10.6. Selection choose: browsere4.xsl
10.7. Iteration for: browsere5.xsl
D.1. Declarations b.sql