You are on page 1of 14

Learn SQL

CODECADEMY

Name: Puneeth Shastry Chandrashekaraiah Hanike (NGM – 40)


Title: Codecademy – Learn SQL
Date: 02nd – 04th February 2020
Organisers: Codecademy
Location: DCU Business School
POD Weight: 2
Description:
The task was an online SQL tutorial and the other was the use of SQL to evaluate
business metrics and they were combined to offer 2 PODS and a single reflection written to
analyze learning. It needs participants to register on their website with the organizers-Code
Academy. The study is divided into several parts and it tells the participant when each
section has been completed successfully and guides them to the next part of the study. At
the end of each exercise, this research has some kind of revisions to the category of test
participants on what they have just experienced. Even though it is not mandatory,
completing them is advisable so that what is learned gets stuck. It helps update the mind of
the learners on what they have just finished studying before going on as they will use the
information in the next parts to be followed. At this point, a new section of the study is
introduced to the participant, which they have the option of either continuing or log-off and
then returning later to restart the analysis. Below is an introductory example which shows
how it looks:

Figure: SQL Introductory Query Example


I was happy as I moved from section to section and was fulfilled and delighted when
I completed the tutorial successfully. Besides the excitement of participating in a new
activity, at the start of the MSBM program, I was not sure that it would be possible to learn
these new technical skills. Nevertheless, I have acquired a technical ability such as SQL
database skills that will assist my community in building the databases required for our final
practical project and possible future career as well as completing a POD. Overall, it was an
exciting experience and a fascinating one for me.
This SQL tutorial dealt with six major topics and many lessons per topic and these are
as follows:

No. Major Topics No. of Lessons/Topic


1 Manipulations 10
2 Queries 12
3 Aggregate functions 9
4 Multiple tables 8
5 Advanced aggregates 12
6 Common metrics 14

Table: SQL Online Study Guideline Source: Adapted from Codecademy (2019)
Personal Motivation and Relevance:
I choose this task because it is connected to the NGM module's digital theme and is
very important to e-commerce as it is often called the purchasing and sale of goods and
services or the transfer of funds or data via an electronic network, mainly the Internet
(Rouse, 2016). SQL Database statements are used to build or design databases that provide
underlying support to eCommerce sites for the storage, management, and manipulation of
data for knowledge and analysis purposes relating to their goods, services and/or other
ancillary operations that they conduct regularly using their framework (Curtis, 2000).
I participated in the online study and completed the course successfully, and felt that
I had acquired valuable information that would support my future career. As someone ready
to explore new frontiers, I feel that the skills gained from this activity with any major
eCommerce companies will be relevant to e-commerce, business analyst, or data analyst
roles, etc. Having failed to implement a database during my first semester of web
assignment and now gaining the knowledge or skills that will be used for my practical
project, SQL database skills have become a vital part of my PDP that I am interested in
developing as a result of my participation in this project.
Academic and Course Relevance:
Participating in this POD program is associated with the NGM learning outcome in
providing students with the opportunity to develop the skills required for successful careers
in management and contribute to business success. My participation in this activity also
allowed me to evaluate between digital platforms and network technologies using both
theoretical and practical assessment approaches based on my previous database experience
and now cloud computing that satisfies the learning outcome of the theme of digital
reflection.
Academic and Professional Literature:
SQL stands for Structured Query Language and according to Rouse (2016) "It is a
common interactive and programming language for extracting and updating information
from the database... which has specifications from both the American National Standard
Institute (ANSI) and the International Standard Organization (ISO) which means that many
database products follow its standard. Nonetheless, turning SQL from the usual role of data
storage to the vitally important role of data analysis makes it a powerful business tool. Big
data had nothing to do with SQL when it first emerged but lately, it seems to be
experiencing a revival as there is a massive swell of SQL-based applications designed to
support big data (Oracle, 2014).
Before continuing I think it is also important to understand some historical facts
about the history of SQL. SQL roots date back to the 1970s when IBM introduced the new
database program-creating System R. However, the SQL language was designed to handle
the data stored in System R and was known as SEQUEL at the time before it was eventually
renamed SQL. But in 1979, another company at the time known as Relational Software but
later Oracle saw SQL's commercial viability and launched their own modified SQL version,
which they called Oracle V2 (Ntchosting, 2016).
What can SQL do?
According to W3schools (2016), SQL can be used to access and control the database
by performing different operations, among which the following are listed:

 SQL can perform queries against a database.


 SQL can retrieve data from a database.
 SQL can insert records in a database.
 SQL can change records in a database.
 SQL can remove records from a database.
 SQL can create new databases.
 SQL can create new database tables.
 SQL can create stored procedures in a database.
 SQL can create views in a database.
SQL Language Elements:
The language is based on quite a few elements and all the language commands
provided in the parallel database systems are typically implemented through a collection of
specific SQLs command-line interface for the suitability of SQL developers. Ntchosting
(2016) states these elements are:

 Clauses – These are the components of statements and queries.


 Expressions – Expressions that can yield scalar values or tables consisting of columns
and rows of data.
 Predicates – Stipulate conditions that are used to reduce the effects of statements
and queries, or to alter the flow of the program.
 Queries – Queries are used to retrieve data according to the conditions in question.
 Statements – SQL statements are used to submit queries to a server where the
databases are stored from a client's system. The server processes the statements
retrieves the requested information and sends the client replies. It allows users to
execute different data manipulation operations.
Key Known SQL Operations:
SQL operations can be best explained by describing some of the processes as
follows:
SQL was designed to store data, but the contents of a SQL database are not set as it can be
modified by applying various simple commands at any time. The syntax is very clear and
self-explanatory which makes reading and understanding easier than other languages.
These commands can be classified as SQL data control, data definition, and data
manipulation under three headings (Ntchosting, 2016).
Data manipulation language - According to Chapple (2015), the database
information is extracted (selected), inserted and updated, and all users of the database will
use the command during normal operations. For a few examples of insert use, and select
commands can be checked at the progress page evidence.
Data specification - The user can identify new tables and elements in the existing
database. It also allows the user to stop the operation of a task. For a few examples using
creating, dropping, and truncating commands can be checked at the progress page
evidence.
Data management - SQL allows the user to specify the access to the actual ta of each
of the table users could have the table itself (Chapple, 2015; W3schools, 2016;
ITBUSINESSEDGE, 2016).
What is the use of SQL?
SQL is used in health care in cancer registries, in the business sector such as
inventories, trend analysis, etc., in education such as student registration & academic
records, etc., in the defence industry as well as in other applications in various sectors. It is
also worth mentioning that Database developers & administrators, business analysts, data
analysts are among the best-known users who work with SQL. Nonetheless, knowledge of at
least some basic SQL can be an advantage for people in many different positions, including
from web developers, web analysts to scientists at the doctoral level, with the most basic
tasks being to perform any question specifying “from” the table to collect data and may
include additional clauses such as “where” to narrow down the requestor what they want
(SoftwareEngineerInsider, 2016)
SQL Benefits & Drawbacks:
The benefits and drawbacks of using SQL under Edugrabs (2016) & More Process
(2013) are illustrated as follows:
Benefits:
1. High Speed - SQL Queries can be used to quickly and efficiently access large
amounts of information from a database.
2. Defined Specifications Are Existing - SQL Databases using long-established
standards accepted by ANSI and ISO. Non-SQL databases do not comply with any specific
guidelines.
3. SQL as a language is independent of how it's applied. A question returns the same
answer regardless of whether indexes were used for optimization or not.
4. No Coding Required - Using standard SQL, handling database systems is simple
without having to write a significant amount of code. Applications written in SQL can also be
ported across systems with ease. These porting may be required when the underlying DBMS
needs to be modified due to transaction volume changes or when a program built in one
environment is to be used on another DBMS.
5. ORDBMS introduction - SQL databases were historically synchronous with
relational databases. With the advent of object-oriented DBMS, the capabilities for storing
objects are expanded to relational databases.
6. Both as programming language and interactive language - SQL will
simultaneously do both the tasks of being both a programming language and an interactive
language.
7. Portable - SQL runs in mainframe systems, PCs, tablets, servers, and even mobile
phones. It operates in local, intranet, and Internet systems. Without any complications,
databases using SQL can be transferred from one system to another.
8. Easy to learn and understand-SQL consists mainly of English statements and an
SQL query is very easy to learn and to understand.
9. Support enterprise applications - SQL is the language of the database that
companies and enterprises around the globe use. It is a great language for a database for an
enterprise program.
10. Client / Server language - SQL is used for linking front end computers and back
end databases. Thus, providing client-server architecture.
Drawbacks:
1. Interfacing Challenges - Interfacing a SQL database is more complicated than
adding a few lines of code to it.
2. Scalability - Users need to scale relational databases on powerful, expensive and
hard to handle servers. It has to be distributed on multiple servers to accommodate the
relational database. The management of tables on various servers is a mess.
Comparison of SQL and No-SQL Database Management Systems:
This comparison is aimed at evaluating SQL and No-SQL database management
systems to gain better insight and draw a comprehensible conclusion (Tezer, 2014):
Structure and form of data being stored - SQL / Relational database structures are
focused on specified data holding attributes, but NoSQL databases usually allow free flow
operations.
Querying - Notwithstanding their licenses, all relational databases (DB) are following
the SQL standard to a certain extent, and are therefore being queried using SQL. NoSQL, on
the other hand, provides a distinctive way of working with the data it handles (Tezer, 2014).
Scaling - Both databases can easily scale vertically by increasing system resources,
with NoSQL being a much more modern or simplified implementation typically having a
much easier means of horizontal scaling (Tezer, 2014).
Durability - SQL databases are stronger than NoSQL solutions when it comes to data
durability and reliable transaction assurances (Tezer, 2014).
Support - The better they say the older. Relational database management systems
have been around for a long time so due to their extreme acceptance, they also have the
amount of free and paid support available to them. Therefore, if a problem arises, it is easy
to solve than recently known NoSQL databases particularly when the solution is complicated
in nature (Tezer, 2014).
Complex data retention and querying requirements – Relational databases are the
preferred solution for complex querying and data retention requirements. We are more
effective in this area and outshine (Tezer, 2014).
Most popular Database Management Systems using SQL:
Being an old language of the database, there are several Relational Database
Management Systems (RDBMS) developed using SQL. The following are among the most
common systems listed below (W3school, 2016):

 MS SQL Server
 IBM DB2
 Oracle
 MySQL
 Microsoft Access
Using SQL in the Web Site:
It is important to deploy an RDBMS database system when creating a website that
will pull data from the database: (MS Access, SQL Server, or MySQL). A language for
scripting servers such as PHP or ASP will be required. The SQL language would be used to
get the developer's required data. Finally, HTML / CSS will be used to design the website,
but in combination with the language of scripting chosen (W3schools, 2016).
A Comparison of Databases using SQL: Oracle vs MySQL vs SQL Server:
Figure: Comparison of SQL based Databases Source: Lee (2013)
SQL: Analysing Business Metrics:
Business Metric describes Rouse (2015) is a quantifiable metric used by businesses to
track, control and assess the success or failure of different business processes. The main
objective is to monitor the management of costs but also to convey the progress of an
organization towards certain long-term and short-term goals. It needs the input or help of
key business stakeholders on which indicators are most important to them. The company
measurement example could be the marketing department monitoring metrics related to
the performance of campaigns and statistics that define their scope, the sales teams control
leads and the executives concentrate on total financial statistics of an enterprise. All these
can effectively be achieved through the use of SQL.
Why SQL for Analyses of Business Metrics?
According to Segment (n.d) there are three major reasons why SQL is essential in
trying to make sense of the raw data of an organization and these are explained as follows:
Analysis of cohort activity and personalized sessions - SQL offers the finest insights
on business data or metrics analysis. For example, in attempting to do a cohort analysis of a
particular behaviour and to equate that activity with others to determine if there is a
behaviour that demonstrates increased activation and retention. This is where you need SQL
to figure that out. SQL can also define sessions to better understand the business, as
opposed to other market tools (Segment, n.d).
Drilling down into customer behaviour - SQL also offers a full range to get your data
as granular as possible. There is some line of questions that are considered ad-hoc questions
that can be answered easily with SQL, but that's hard with other tools on the market. For
example, how many users on my website created an account, added a product to their cart,
and then completed the purchase on their phone? (The Segment, n.d).
Building custom dashboards - SQL can be used with fully customizable metrics to
power real-time dashboards that are much more expressive to your business than normal
metrics (Segment, n.d).
Why SQL is becoming the recommended language for Big Data Analysis?
The word "big data" that emerged in the IT and business technology lexicon
describes Oracle (2014) was actually linked to no-SQL. Nevertheless, SQL is experiencing a
renaissance leading to the explosion of implementations based on SQL designed to support
big data. This is because SQL is now considered a language that is more technically superior
to big data. Four explanations for this:
1. SQL is a natural data-analysis language.
2. SQL is a powerful Question Writing language.
3. Can optimize SQL queries.
4. SQL is stretchable.
Evidence of Progress & Value:
I started an online course in SQL without language or program knowledge, but the
intention to use it for my final practice and career needs motivated me to pursue the
course. I eventually completed both courses at the end and was able to acquire the requisite
technical skills - Database and Data Analysis skills that I hope would support me not only in
my practical project but also in my future career.
I included excerpts from my lessons with some clarification showing my progress
rates from the beginning to my progress up to an intermediate point in the course, and
some point close to the completion. These extracts are included as screenshots below
explaining a few of the lessons completed during the process as evidence of progress. I have
registered with an online SQL group where I can extend my apprenticeship by assisting new
members who will seek help through the community portal on SQL and Data Analysis. It will
also help me to improve my acquired skills as the saying goes "practice makes good."
Although I am open to new frontiers, I believe that the skills acquired by conducting
this practice in Database & Data Analysis will hopefully help me as a potential Business
Analyst or Data Analyst in my practicum project and future career.
I was proud of what I was able to accomplish after this course and pleased that I
added another skill to my current skill set that could be the career changer. For my potential
careers, these technical skills are very important and the more skills I have gained, the more
my job prospects are improved.
Select Example - This command or statement is most commonly used in SQL. This
allows users to get specific information from an active database. See the example
underneath:

This command recovers all the information in the celebrity table as the asterisk used
in SQL literally means "pick all the information from the celebrity table".
Creating Example – Using this statement, you create a new table called Celebs that
holds three values.

This statement is specifically used to create a new table called Celebs which will hold
an id number with an integer as the type of data, name as text, and age as integer. The table
in the database will hold those values.
Insert Example - Use this to enter new data in the table row
This statement or command is used to insert new records or rows of data as shown i
n the table above. The insert into is a clause that adds the specified rows to the table of cele
--bs.

This sentence or order is used to filter the set of results within a given range. The
values might be numbers, messages, or dates. The above statement uses the "in" operator
to filter to include only films with years from 1990 to 2000.

This statement or command returns the mean number of downloads in a database


for an app. SQL uses AVG () to calculate the average value of a given column quickly.
This select statement or question was used to dig a bit deeper into a company's data
to get details that will help them to understand their consumer transactions based on the
dates they played games and display their retention metrics. And also, the number of
information that according to the command will be pulled from the database won't exceed
100.
Proof of Participation:
References:
Chapple (2015), The Fundamentals of SQL [Online]. Available at:
https://www.lifewire.com/sql-fundamentals-1019780 (Accessed 06 Feb 2020)
Edugrabs (2016), Introduction to SQL: Structured Query Language [Online]. Available at:
http://www.edugrabs.com/introduction-to-sql-structured-query-language/?upm_export=print
(Accessed 06 Feb 2020)
IT Business Edge (2016), What is SQL? [Online]. Available at:
http://www.sqlcourse.com/intro.html (Accessed 06 Feb 2020)
Lee (2013), Oracle vs. MySQL vs. SQL Server: A Comparison of Popular RDBMS [Online].
Available at: https://blog.udemy.com/oracle-vs-mysql-vs-sql-server/ (Accessed 06 Feb 2020)
Margaret Rouse (2016), SQL (Structured Query Language) – TechTarget [Online]. Available
at: https://searchsqlserver.techtarget.com/definition/SQL (Accessed 05 Feb 2020)
NTC Hosting (2016), SQL (Structured Query Language) [Online]. Available at:
https://www.ntchosting.com/encyclopedia/databases/structured-query-language/
(Accessed 06 Feb 2020)
Oracle (2014), Why SQL is becoming the go to language for Big Data analysis [Online].
Available at: https://blogs.oracle.com/datawarehousing/why-sql-is-becoming-the-goto-
language-for-big-data-analysis (Accessed 06 Feb 2020)
O.S. Tezer (2014), Understanding SQL and NoSQL Databases and Different Database Models
[Online]. Available at: https://www.digitalocean.com/community/tutorials/understanding-sql-and-
nosql-databases-and-different-database-models (Accessed 06 Feb 2020)

Rick Curtis (2000), E-commerce Database Design - Part I [Online]. Available at:
https://www.princeton.edu/~rcurtis/ultradev/ecommdatabase.html (Accessed 05 Feb 2020)
Segment (n.d,), When to use SQL for analysis [Online]. Available at:
https://segment.com/academy/intro/when-to-use-sql-for-analysis/ (Accessed 06 Feb 2020)

Software Engineer Insider (2016), What is SQL and its current applications to database
management? [Online]. Available at: https://www.softwareengineerinsider.com/programming-
languages/sql.html#.V02brJErKhc (Accessed 06 Feb 2020)

W3school.com (2016), Introduction to SQL [Online]. Available at:


https://www.w3schools.com/sql/sql_intro.asp (Accessed 06 Feb 2020)

You might also like