Server-Side Scripting/SQL Databases

From Wikiversity
Jump to navigation Jump to search

This lesson introduces SQL-based database processing.

Objectives and Skills[edit | edit source]

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[edit | edit source]

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

Multimedia[edit | edit source]

Additional items will be contributed by course participants

Examples[edit | edit source]

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[edit | edit source]

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, or wildfire activities may be used as data examples.

Lesson Summary[edit | edit source]

Additional items will be contributed by course participants

Key Terms[edit | edit source]

Additional items will be contributed by course participants

See Also[edit | edit source]

References[edit | edit source]