0% found this document useful (0 votes)
5 views6 pages

Module 6 SQL Introduction

This document is a module on Structured Query Language (SQL) for an Advanced Database Systems course at Saint Joseph’s College of Baggao, Philippines. It covers the history, importance, and functionality of SQL in database management, emphasizing its role in data retrieval, manipulation, and integrity. The module also includes learning outcomes, resources, and activities for students to engage with SQL concepts and applications.

Uploaded by

Oni Chan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

Module 6 SQL Introduction

This document is a module on Structured Query Language (SQL) for an Advanced Database Systems course at Saint Joseph’s College of Baggao, Philippines. It covers the history, importance, and functionality of SQL in database management, emphasizing its role in data retrieval, manipulation, and integrity. The module also includes learning outcomes, resources, and activities for students to engage with SQL concepts and applications.

Uploaded by

Oni Chan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Tuguegarao Archdiocesan Schools System

Saint Joseph’s College of Baggao, Inc.


Baggao, Cagayan, Philippines
Transforming Lives, Shaping the Future

Module No. 6
STRUCTURED QUERY LANGUAGE (SQL)

Course Title: Advanced Database Systems Course IT 116


Code:
Instructor: SHERWIN M. CAACBAY, MIT Term & AY: 2nd Sem, AY 2020-
YSSANDREA KNERRE R. 2021
ZINAMPAN, MIT
Email [email protected] Contact No: 09551987227
Address: yssandreaknerrezinampan@gm 09394572402
ail.com

I. Overview
Structured Query Language (SQL) is a database language designed for
managing data held in a relational database management system. SQL was
initially developed by IBM in the early 1970s (Date 1986). The initial version,
called SEQUEL (Structured English Query Language) was designed to
manipulate and retrieve data stored in IBMfs quasi-relational database
management system, System R. Then in the late 1970s, Relational Software
Inc., which is now Oracle Corporation, introduced the first commercially
available implementation of SQL, Oracle V2 for VAX computers.

Today, data is the basis of any business. The world of enterprise computing is
the epitome of data-driven businesses. The importance of structured storage
of data is unquestionably in the focus. And at this time, with the computing
model quickly shifting towards the cloud, and storage costs falling rapidly,
enterprises are leveraging data more and more to tune their businesses.

It is, then, imperative that a ground-zero understanding of this structured


model of storage and retrieval of data is of paramount importance. A
beginner, however, naturally feels lost in the sea of information available out
in the wild world. This series, Introduction to SQL, comes to the rescue, by
starting at the very base of SQL. The very fabric and then, launching from
there, towards the bigger picture. MySQL is an SQL (Structured Query
Language) based relational database management system (DBMS). MySQL is
compatible with standard SQL and is frequently used by PHP and Perl.
Commercial version of MySQL is also provided (including technical support)
MySQL is a very popular, open source database. Officially pronounced “my
Ess Que Ell” (not my sequel). Handles very large databases; very fast
performance.

Why are we using MySQL?


 Free (much cheaper than Oracle!)
 Each student can install MySQL locally.
 Easy to use Shell for creating tables, querying tables, etc.
 Easy to use with Java JDBC

II. Intended Learning Outcome (ILOs)


At the end of the lesson, the student should be able to:
A. Relate the History of MySQL/MSSQL Server
B. Identify role and importance of SQL in database development

Page 1 of 6
Tuguegarao Archdiocesan Schools System
Saint Joseph’s College of Baggao, Inc.
Baggao, Cagayan, Philippines
Transforming Lives, Shaping the Future
III. Learning Resources & References
1. Book References-APA Style
 Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden, Modern
Database Management, 6th edition, 2002
2. Internet
 https://en.wikipedia.org/wiki/SQL
 http://etutorials.org/SQL/sql+bible/
Part+I+SQL+Basic+Concepts+and+Principl
es/
Chapter+1+SQL+and+Relational+Database+Management+Syste
ms+RDB
MS/Brief+History+of+SQL+and+SQL+Standards/
 https://www.mssqltips.com/sqlservertutorial/9220/sql-server-
architecture-overview/

IV. Lecture Content/Summary of Lesson

1.1 A brief history of SQL Standards

The relational database model was slowly but surely becoming the industry
standard in the late 1980s. The problem was, even though SQL became a
commonly recognized database language, the differences in major vendors'
implementations were growing, and some kind of standard became
necessary.

Around 1978, the Committee on Data Systems and Language (CODASYL)


commissioned the development of a network data model as a prototype for
any future database implementations.

This continued work started in the early 1970s with the Data Definition
Language Committee (DDLC). By 1982, these efforts culminated in the data
definition language (DDL) and data manipulation language (DML) standards
proposal. They became standards four years later — endorsed by an
organization with an improbably long name, the American National Standards
Institute National Committee on Information Technology Standards H2
Technical Committee on Database (ANSI NCITS H2 TCD).

Structured Query Language is a domain-specific language used in


programming and designed for managing data held in a relational database
management system (RDBMS), or for stream processing in a relational data
stream management system (RDSMS). It is particularly useful in handling
structured data, i.e. data incorporating relations among entities and
variables.

SQL offers two main advantages over older read–write APIs such as ISAM or
VSAM. Firstly, it introduced the concept of accessing many records with one
single command. Secondly, it eliminates the need to specify how to reach a
record, e.g. with or without an index.

Originally based upon relational algebra and tuple relational calculus, SQL
consists of many types of statements, which may be informally classed as
sublanguages, commonly: a data query language (DQL), a data definition
language (DDL), a data control language (DCL), and a data manipulation
language (DML). The scope of SQL includes data query, data manipulation
(insert, update and delete), data definition (schema creation and
modification), and data access control. Although SQL is essentially a
declarative language (4GL), it also
includes procedural elements.

Page 2 of 6
Tuguegarao Archdiocesan Schools System
Saint Joseph’s College of Baggao, Inc.
Baggao, Cagayan, Philippines
Transforming Lives, Shaping the Future
SQL was one of the first commercial languages to utilize Edgar F. Codd’s
relational model. The model was described in his influential 1970 paper, "A
Relational Model of Data for Large Shared Data Banks". Despite not entirely
adhering to the relational model as described by Codd, it became the most
widely used database language.

SQL became a standard of the American National Standards Institute (ANSI)


in 1986, and of the International Organization for Standardization (ISO) in
1987. Since then the standard has been revised to include a larger set of
features. Despite the existence of standards, most SQL code requires at least
some changes before being ported to different database systems. SQL was
initially developed at IBM by Donald D. Chamberlin and Raymond F.

Boyce after learning about the relational model from Edgar F. Codd in the
early 1970s. This version, initially called SEQUEL (Structured English Query
Language), was designed to manipulate and retrieve data stored in IBM's
original quasi-relational database management system, System R, which a
group at IBM San Jose Research Laboratory had developed
during the 1970s.

Chamberlin and Boyce's first attempt of a relational database language was


Square, but it was difficult to use due to subscript notation. After moving to
the San Jose Research Laboratory in 1973, they began work on SEQUEL. The
acronym SEQUEL was later changed to SQL because "SEQUEL" was a
trademark of the UK-based Hawker Siddeley Dynamics Engineering Limited
company.

After testing SQL at customer test sites to determine the usefulness and
practicality of the system, IBM began developing commercial products based
on their System R prototype including System/38, SQL/DS, and DB2, which
were commercially available in 1979, 1981, and 1983, respectively.

In the late 1970s, Relational Software, Inc. (now Oracle Corporation) saw the
potential of the concepts described by Codd, Chamberlin, and Boyce, and
developed their own SQL based RDMS with aspirations of selling it to the U.S.
Navy, Central Intelligence Agency, and other U.S. government agencies. In
June 1979, Relational Software, Inc. introduced the first commercially
available implementation of SQL, Oracle V2 (Version2) for VAX computers.

By 1986, ANSI and ISO standard groups officially adopted the standard
"Database Language SQL" language definition. New versions of the standard
were published in 1989, 1992, 1996, 1999, 2003, 2006, 2008, 2011[14] and,
most recently, 2016.

1.2 The Role of SQL in Database Architecture

How SQL Works?

Figure given here shows how SQL works. The client system in the figure has a
database that stores essential information. If business environment, the
database might store production, sales, payroll or inventory data. On a
personal computer system, the database might store personal data, lists of
people and their contact information, or data derived from a bigger computer
system.

Page 3 of 6
Tuguegarao Archdiocesan Schools System
Saint Joseph’s College of Baggao, Inc.
Baggao, Cagayan, Philippines
Transforming Lives, Shaping the Future

The database is controlled by a computer program dubbed a database


management system (DBMS), which is a relational database management
system (RDBMS) in case of the SQL.

When data is to be retrieved from a computer database, the SQL language is


used to transfer the request, which is then processed by the DBMS to invoke
the requested data, and return it to you.

This process of requesting data from a database and receiving results is


termed as a database query - hence the name “Structured Query Language”.

The Role of SQL

SQL is way more than a mere query tool, though retrieving data from a
computer database was SQL’s originally intended purposes and it still is the
most important function for which the database language is employed by
almost all leading IT enterprises.

However, having said that, SQL is extensively employed to control all


important functions a user can perform through a database management
system, including:

1. Data definition. SQL allows a database administrator to define the


organization and structure of stored data and the relationships
amongst different stored data items.
2. Data retrieval. SQL helps an application or user program to fetch
stored data from a computer database and make use of it.
3. Data manipulation. SQL helps an application or user program to
update the computer database by removing old data, modifying
hitherto stored data, and adding new data.
4. Access control. SQL can also be deployed for restricting user
permission for adding, retrieving or modifying stored data, thence
protecting data from unauthorized access.
5. Data sharing. SQL is used by concurrent users to coordinate data
sharing to ensure the users don’t interfere with one another.
6. Data integrity. SQL is also used in a database to define integrity
constraints to prevent data corruption by system failure or
inconsistent update.
SQL is, therefore, a comprehensive language and a resourceful, powerful tool
to control and interact with a computer database system.
SQL can’t exactly be termed as a complete language like C, C++, Java,
Python or COBOL. In SQL, there’s no IF statement to test conditions; also, it
does not have any FOR, GOTO, or DO statement to control program flow. SQL
is, instead, a database sub-language that comprises of nearly forty
statements specialized to perform database management tasks.

Page 4 of 6
Tuguegarao Archdiocesan Schools System
Saint Joseph’s College of Baggao, Inc.
Baggao, Cagayan, Philippines
Transforming Lives, Shaping the Future
A user can embed these SQL statements in any other complete language like
C or COBOL for extending the compatibility of that language with the
database.
As an alternate, a programmer can explicitly send them to a database system
for processing, by using a CLI (Call Level Interface) from a computer language
like C, C++ or Java.
Finally, SQL isn’t predominantly a structured language, particularly when
equated to extremely structured languages, for example Pascal, Java, or C.
SQL statements instead look like English sentences, completed by "noise
words" that essentially add no meaning to the statement and are used only
for making the sentence more readable.
Moreover, the SQL language has a few inconsistencies, along with some
special rules to avoid the construction of SQL statements that look fairly legal
but do not generally make much sense. Regardless of these widespread
inaccuracies in its name, SQL has surfaced as the standard relational
database language. SQL is relatively easy to learn yet an immensely powerful
language at the same time.
SQL is not itself a standalone product or a complete database. You cannot
step into a computer store and ask for "SQL." Instead, SQL is an integral part
of a database management system, a language and a tool to communicate
with the DBMS.
SQL is:
 Structured Query Language
 The standard for relational database management systems (RDBMS)
 SQL-92 Standard
Purpose:
 Specify syntax/semantics for data definition and manipulation
 Define data structures
 Enable portability
 Specific minimal (level 1) and complete (level 2) standards
 Allow for later growth/enhancement to standard

Databases and SQL Server Databases Architecture

SQL Server consists of a set of various components which fulfill data storage
and data analysis needs for enterprise applications. Database architecture:
All the data is stored in databases which is organized into logical components
visible to the end users. It’s only the administrator who needs to actually deal
with the physical storage aspect of the databases, whereas users only deal
with database tables.

Every SQL Server instance has primarily 4 system databases i.e. master,
model, tempdb and msdb. All other databases are user created databases as
per their needs and requirements.

A single SQL Server instance is capable of handling thousands of users


working on multiple databases.

V. Learning Activities
Exercise 1. Answer the following questions.
1. Construct a brief timeline of the history of SQL.

Page 5 of 6
Tuguegarao Archdiocesan Schools System
Saint Joseph’s College of Baggao, Inc.
Baggao, Cagayan, Philippines
Transforming Lives, Shaping the Future
2. Explain the role of SQL in Database Architecture.
3. Enumerate at least three (3) functions of SQL and discuss each.

VI. Assessment

Case Study 1. Read the scenario below for a Hospital Management System
Database.

A patient will have unique Patient ID. Full description about the patient about
personal detail and phone number, and then Disease and what treatment is
going on. The doctor will handle patients, one doctor can treat more than 1
patient. Also, each doctor will have unique ID. Doctor and Patients will be
related. Patients can be admitted to hospital. So different room numbers will
be there, also rooms for Operation Theaters and ICU. There are some nurses,
and ward boys for the maintenance of hospital and for patient take care.
Based upon the number of days and treatment bill will be generated.

In above scenario, design an entity relationship diagram applying the


different symbols/cardinality used in ERD.

Entities: PATIENT, DOCTOR, ROOM, BILLING, TREATMENT

VII. Assignment
Have an advance reading on SQL Environment.

Page 6 of 6

You might also like