Web Application Development: Databases

A database is an organized collection of related data. A library is an example of a simple database, containing thousands of books. In addition, there is an index for these books in a card catalog.

The term database is applied loosely to two different things:

  1. A file containing information which is grouped into a number of categories.
  2. The program (application) which allows the information file to be created and organized.

How Do Databases Work?
Databases organize and display information in a way that helps you find the information you need quickly and efficiently. If you are looking for a telephone number for Albert Adams, you know that you can look under A as it is organized alphabetically. If you need to know what is showing on Channel X at 4:30 p.m. this afternoon, you will be able to find out quickly by looking up that Channel's chart for that particular time today.

What Can Databases Do?
Databases allow you to sort the same information in different ways, and to retrieve it in different ways. You may have a database of students in your class. If you have their ages, heights, birthdays, favorite color, hair color and eye color, then you can sort them using those categories. With the one class database, you can make a list of students in alphabetical order, in order of height, or in groups of hair or eye color. You could also make a list of all people who have brown hair and blue eyes, or you could make a list of all students who have purple as their favorite color. The way you organize your information is up to you.

Useful Databases
If you need to be able to sort information, compare information, and find facts, a database may help you do these tasks. To create a useful database you need to put in the information you wish to sort. Think carefully about the different fields (groups of information) that you wish to put in. Once you have entered the data, think of how you will organize it.

Terminology
Field - Category under which information is stored. There are a number of different types of fields including:

  • text, e.g. last name and first name
  • numeric, e.g. number of years as president
  • logical, e.g. yes/no
  • date e.g.. 1946 (birthdate)

Record - A collection of information on a single individual person or thing.

Index - A key which orders the information of a database in a particular way. Not all database applications allow for true indexing.

Planning
An effective database needs careful planning before creation. Make a point of outlining the purpose of your database and what information is needed to achieve this purpose. Sketch out a single record to design an easy to use system of recording your information.

Information entered into a poorly planned database can make information retrieval difficult later on and can also lead to duplication of information.


Commonly Used Databases for Web Development

Microsoft Access - For experienced database programmers and first-time database users alike, Microsoft Access version 2002 delivers powerful tools for managing and analyzing data. With XML support, developers can create sophisticated enterprise-wide database solutions that integrate easily with the Web.

Microsoft SQL Server - SQL Server 2000 provides extensive database programming capabilities built on Web standards. Rich XML and Internet standard support give you the ability to store and retrieve data in XML format easily with built-in stored procedures. You can also use XML updategrams to insert, update and delete data easily.

MySQL - Today MySQL is the most popular open source database server in the world with more than 4 million installations powering websites, datawarehouses, business applications, logging systems and more. Customers such as Yahoo! Finance, MP3.com, Motorola, NASA, Silicon Graphics, and Texas Instruments use the MySQL server in mission-critical applications.

PostgreSQL - PostgreSQL is a sophisticated Object-Relational DBMS, supporting almost all SQL constructs, including subselects, transactions, and user-defined types and functions. It is the most advanced open-source database available anywhere.


created: 2006-11-05
Google
web www.digitalvertebrae.com
Exercises
The exercises for this week are listed below and available in PDF or MS Word formats.
Functioning Form Mail with PHP
 
©2009 Web Site Development: an introduction