Data Manipulation and Querying with SQL
Name
Grand Canyon University
HIM-650: Health Care Data Management
Date
, 2
Data Manipulation and Querying with SQL
In June 1970, Dr. E. F. Codd published the paper, “A Relational Model of Data for Large
Shared Data Banks", in the Association of Computer Machinery (ACM) journal,
Communications of the ACM (Lorentz & Gregoire, 2003). IBM used Codd’s findings when they
started working on a new language for relational database management. Originally the language
was called Structured English Query Language (SEQUEL). The project had a few
implementations and revisions, and the language changed several times. The final name for the
language is SQL, which is still used today. SQL/DS (1981) and DB2 (1983) are some of the
commercial products developed by IBM. Other vendors including Oracle, Sybase and Ingres
announced their own commercial SQL-based products (Pickett, 2020).
SQL is a specialized programming language that is used for managing relational
databases and performing different operations on that data. SQL has many uses to include
modifying database tables and index structures. SQL is used to add, update, and delete rows of
data within a database. The retrieval of different subsets of information in a database for
transaction processing and analytics applications is also done in SQL (Boyini, 2018).
There are two main sets of commands that are used to create and modify databases in
SQL. The first set of commands are Data Definition Language, and they are used to develop and
delete databases and its objects. The second set of commands are Data Manipulation Language
and these are used to insert, modify, and delete data stored in a database (IAC Publishing,
2020).
SQL functions are sub-programs that are commonly used throughout SQL database
applications. These functions are used for processing and manipulation data. SQL functions may
have zero or more input parameters but can return only one value. The simplest way to classify
SQL functions is to divide them into built-in functions and user-defined functions. The built-in
, 3
functions are standard functions that are already provided by the SQL database system. ANSI
(American National Standards Institute) SQL standards defines most of the built-in functions.
These built-in functions can be divided further into aggregate functions or scalar functions.
User- defined functions, however, are functions that are created by the user for a specific
purpose. The user-defined functions can either return a single value or a set of values. There are
many advantages of using functions. A function needs to be written only once and can be reused
multiple times. This saves time and effort and supports modular programming. Functions
improve performance and efficiency of the database. SQL functions are compiled and cached
before use. Complex programming logic can be decomposed into a number of smaller and
simpler functions, thus making it easier to understand and maintain (What are SQL Functions? -
Use & Examples, 2019).
Six Queries of Data to the Provider Table