eXtropia: the open web technology company
Technology | Support | Tutorials | Development | About Us | Users | Contact Us
Resources
 ::   Tutorials
 ::   Presentations
Perl & CGI tutorials
 ::   Intro to Perl/CGI and HTML Forms
 ::   Intro to Windows Perl
 ::   Intro to Perl 5
 ::   Intro to Perl
 ::   Intro to Perl Taint mode
 ::   Sherlock Holmes and the Case of the Broken CGI Script
 ::   Writing COM Components in Perl

Java tutorials
 ::   Intro to Java
 ::   Cross Browser Java

Misc technical tutorials
 ::   Intro to The Web Application Development Environment
 ::   Introduction to XML
 ::   Intro to Web Design
 ::   Intro to Web Security
 ::   Databases for Web Developers
 ::   UNIX for Web Developers
 ::   Intro to Adobe Photoshop
 ::   Web Programming 101
 ::   Introduction to Microsoft DNA

Misc non-technical tutorials
 ::   Misc Technopreneurship Docs
 ::   What is a Webmaster?
 ::   What is the open source business model?
 ::   Technical writing
 ::   Small and mid-sized businesses on the Web

Offsite tutorials
 ::   ISAPI Perl Primer
 ::   Serving up web server basics
 ::   Introduction to Java (Parts 1 and 2) in Slovak

 

Introduction to Databases for Web Developers
A Sample Database  
Okay, let's define a simple relational database that we can use to practice with...

We will define a database called "MY_COMPANY" with four tables, "CLIENTS", "EMPLOYEES", "PRODUCTS", and "SALES". These tables will look something like the following:

EMPLOYEES Table
EMP_NUM EMP_NAME EMP_COMMISSION EMP_SALARY
001 Lim Li Chuen 10% 90000
002 Lim Sing Yuen 20% 40000
003 Loo Soon Keat 20% 50000

CLIENTS Table
C_NUM C_NAME C_ADDR C_CITY C_STATE C_ZIP C_PHONE
001 Jason Lim 100 W 10th St LA CA 90027 456-7890
002 Rick Tan 21 Jack St LA CA 90031 649-2038
003 Stephen Petersen 1029#A Kent Ave. LA CA 90102 167-3333

PRODUCTS Table
P_NUM P_QUANTITY P_PRICE
001 104 99.99
002 12 865.99
003 2000 50.00

SALES Table
S_NUM P_NUM S_QUANITY S_AMOUNT E_NUM C_NUM
001 001 1 99.99 101 102
002 001 2 199.98 102 101
003 002 1 865.99 101 103

Previous | Next | Table of Contents