< Server-Side Scripting

This lesson introduces SQL-based database processing.

Objectives and Skills

Objectives and skills for this lesson include:

  • Understand relational database concepts
  • Understand SQL data manipulation language
  • Use an SQL database with server-side scripts

Readings

  1. Wikipedia: Database
  2. Wikipedia: Relational database
  3. Wikipedia: SQL

Multimedia

Additional items will be contributed by course participants

Tutorials

Before trying to work with any database using a programming language, you should first be familiar with that database's command language. The following tutorials will be helpful in understanding how to use SQLite.

Examples

The following examples use SQLite as the SQL database. A similar approach would work for almost any SQL-based database. SQLite is used because it requires no server configuration or maintenance. Performance would be adequate for small-scale projects. Larger projects should use a server-based database.

Activities

Complete the following activities using HTML, CSS, and a server-side scripting language. Apply best practices for user interface design and your selected scripting language, including modules, comments, indentations, naming conventions, and constants. Use HTML forms and input elements for input, server-side scripts for processing, and HTML elements for output. Use separate functions for each type of processing. Avoid global variables by passing parameters and returning results. Add comments at the top of the code modules and include references to any resources used. Add the completed code to your website as /lesson9.

  1. Create an application that allows the user to insert, update, and delete records in an SQL-based database. After each action, display the current records. Use any SQL database and data structure you like. Be sure to include date, text, and number field types in the data structure. If in doubt, any of the previous cyclone, earthquake, wildfire, or tsunami activities may be used as data examples.

Lesson Summary

Additional items will be contributed by course participants

Key Terms

Additional items will be contributed by course participants

Database query
A database query is a request to access data from a database to manipulate it or retrieve it.[1]
Structured Query Language (SQL)
Language used to communicate with a database.[2]
No Structured Query Langauge (NoSQL)
Term used for non-relational databases, an example being MongoDB.[3]

See Also

References

This article is issued from Wikiversity. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.