faqts : Computers : Databases

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

11 of 16 people (69%) answered Yes
Recently 7 of 10 people (70%) answered Yes


Database: Internet: Create: How to create a database backed web site?

Jul 6th, 2008 13:31
Knud van Eeden, dman,

--- Knud van Eeden --- 23 December 2004 - 11:18 pm -------------------
Database: Internet: Create: How to create a database backed web site?
In general:
Steps: Overview:
1. In order to create database backed website you need each of the
   1. a web server
      1. Apache
      2. Microsoft Internet Information Server (IIS)
      3. ...
   2. a (scripting) computer language
      1. ASP
      2. Java (JSP)
      3. PHP
      4. Perl
      5. Python
      6. ...
   3. a database
      1. Borland InterBase
      2. DBase
      3. Firebird
      4. IBM DB2
      5. Microsoft Access
      6. Microsoft SQL server
      7. MySql
      8. Oracle
      9. Paradox
     10. Postgress
     11. Sybase
     12. ...
2. Install
   1. Install your Web Server
      1. Install your Web server on the
         appropriate computer
   2. Install your scripting language
      1. usually on that same computer
         1. Possibly install an executable
            in your cgi-bin directory
         2. Possibly install an extra
            scripting language module in
            your web server
         3. ...
   3. Install your database
      1. usually on that same computer
         (but in general on some computer)
3. Create a script file (which connects to the database)
   1. Create a scripting file which
      1. connects to the database
         1. IP address or URL of the computer on which your
            database runs
         2. port of the webserver on which your database
         3. username to connect to your database
         4. password to connect to your database
         5. ...
      2. gets your (SQL) query
         1. Passed as parameters in URL
         2. Passed via stream
         3. Stored in your script itself
         4. ...
      3. creates your (SQL) query
         1. Create operation:
            1. a database
            2. a table
         2. Set operation:
            1. Insert
         3. Get operation:
            1. Select
         4. Update operation
            1. Update
         5. Remove operation:
            1. Delete
         6. ...
      4. executes your (SQL) query
      5. shows the result of your (SQL) query
4. Store your script
   1. Store the script in the appropriate directory
      on the computer which runs the web server
      1. Possibly upload your script file to the remote
         1. Use an ftp client
            1. Microsoft ftp.exe
            2. Total Commander
            3. ...
5. Start
   1. Start your Web server
      1. Your web server is possibly connected to
         some port
   2. Start your scripting language
   3. Start your database
6. Run or test your script
   1. Connect to your script
      (e.g. connect to the computer on which your script
            and possibly database is installed)
      1. Start your viewing program
         1. Connect directly to your script file,
            which connects to your database
            1. Supply the address information of your script,
               which connects to your database
               1. Type the URL or IP address of that computer (e.g. in
                  your viewing program, e.g. a browser)
                  1. Possibly add address information of the script
                     language to that URL
                      e.g. if
                       1. ASP
                       2. CGI-bin
                       3. Java (JSP)
                       4. Perl
                       5. Python
                       6. PHP
                       7. ...
                  2. Possibly add the path and or name of your script
                     file to that URL
         2. Do not connect directly to your script file,
            which connects to your database
            1. Or use other means to connect to your script
               1. Create another script file
                  1. e.g. in HTML, which contains e.g. forms with
                     buttons to click on.
                     The 'ACTION=<your URL>' field of that form
                     contains the URL of your earlier script file,
                     which stays on the server)
                     1. React to events
                        1. Input information
                           1. Click on button
                           2. Fill text fields with data
                           3. Choose data from lists
                           4. Sends your data to that script file,
                              via the given URL
                           5. ...
   3. Your script file, on the server, handles the request
      1. extracts the data
         1. Via your URL (e.g. method="GET")
         2. As a text stream (e.g. method="POST")
         3. ...
      2. Processes the data
         1. Interacts with other programs
            1. Contacts the database
         2. ...
      3. Creates output which is sent back to the
   2. View the results of your script
      1. Usually (html) source code is created by your script, which
         is located on the server, which is sent back to your viewing
         program (e.g. a browser, MSDOS box, ...), which you then can
         view (e.g. a table of a database)
Internet: see also:
A gentle introduction to SQL
SQL in Perl on the Web
SQL from Java
Database: Internet: Database backed web site: Link: Overview: Can you 
give an overview of links?