• Unit 5: Introduction to SQL

    Structure Query Language (SQL) is a communication programming language that has been around for decades. It is the standard language for relational database management systems. Organizations cannot have an effective data management program without SQL. Therefore, organizations seek to hire personnel who understand basic SQL concepts. This unit will cover SQL, which is a database query language used for storing and managing data in relational database management systems (RDBMS).

    Completing this unit should take you approximately 6 hours.

    • 5.1: SQL

      The official SQL standard was adopted by the American National Standards Institute (ANSI) in 1986. Then, the International Organization for Standardization (ISO) adopted SQL IN 1987. SQL is a standardized programming language used to perform various operations that manage relational database management systems (RDBMS). For example, if you are asked to identify and calculate from a table of customers whose last name is "Jones", SQL is a programming language used to communicate this command or query to the database. 

      There are many advantages to learning SQL. SQL is a universal language and intersects almost every industry. SQL is open source and easier to learn compared to other programming languages. You can manage millions of rows of data using SQL. Remember, RDBMS are designed to store millions of rows of data, and SQL is the language that lets you manage enormous amounts of data.

      • 5.1.1: Functions

        Functions are codes used to execute a command in an SQL server. SQL servers support two types of functions. (1) User-defined functions: Codes created by the user, and (2) System-defined functions: System functions that are built into the database. 

        SQL servers use two types of user-defined functions. (1) Table Valued Functions: Functions created by the user. This is identified by the term "CREATE" in the code. (2) Scalar Valued Functions: This type of function returns a single value each time it is used. Comparatively, system-defined functions are used to insert records and are system-built functions. The key to remember is that functions can be designed by the user or prebuilt. 

        SQL functions are commonly used, stored, and reused throughout SQL database applications. All SQL database applications use these functions for processing and/or manipulating data.

      • 5.1.2: Queries

        A query is a question or inquiry to a set of data within a database, commonly referred to as a database query. SQL queries require a "SELECT" statement which informs the system to start looking for specific data. Therefore, SQL query statements retrieve records asked from a database table. The "SELECT" statement is probably the most commonly used SQL statement employed by end users of database systems and is worthy of your careful attention. SQL is an industry-standard language that consists of user-defined and system-defined functions and queries.

      • 5.1.3: MySQL

        First, MySQL and SQL are not the same. MySQL is one of the most used and popular RDBMS software in business. MySQL is second only to Oracle Database. Why is MySQL so important? It is easy to use, provides high performance, is an industry standard, and promotes data security. 

      • 5.1.4: Clauses and Operators

        An SQL clause is a statement written as "GROUP BY". It is normally accompanied by aggregate functions like SUM. This provides a means of grouping the results of a dataset within certain database columns. So, a clause can be used with any SQL query to specify a condition. 

        SQL operators test a value against a Boolean value or expression. These values use operators such as AND, OR, XOR, and NOT. These statements compare values, and SQL will return a TRUE, FALSE, or UNKNOWN result.

    • Study Guide: Unit 5

      We recommend reviewing this Study Guide before taking the Unit 5 Assessment.

    • Unit 5 Assessment

      • Receive a grade