Category Archive ECBA Resources

SQL Tutorial for Beginners Part 2

 

SQL Tutorial for Beginners

This is the second part of SQL Tutorial for beginners. In this first part of this SQL tutorial for beginners, you learnt about the basics of a database system and SQL.

In this part, we are going to learn about CREATE TABLE & INSERT/DELETE commands. These commands are SQL commands and are used to interact with the database. We are going to use W3 School Online SQL editor in this tutorial, so keep it open in another tab in your browser.

CREATE TABLE COMMAND

Create table command is used to create a table. We have discussed STUDENTS table in the part I of this tutorial. Let’s re-produce that table for our reference.

Tables in database

Tables in database

To create this table using SQL, we use CREATE TABLE command. The Syntax of this command is as follows:

CREATE TABLE <<TABLE_NAME>>

(

Column_name1 datatype,

Column_name2 datatype,

….

)

The datatype is the type of data, which will be stored in the column like Text, number or date etc. So to create the STUDENTS table, we can write the following CREATE TABLE command:

CREATE TABLE STUDENTS
(

student_name varchar2(100),
date_of_joining date,
course_name varchar2(100),
contact_number number(11)

)

You can type the above command in the SQL statement box and click on “Run SQL” button. You can see that a new entry will be created at the bottom “Your database” section on the right, as indicated in the image below:

Create table command

Create table commandCreate table command

One important aspect, you must remember, the table & column names must be a single word. We cannot use “Student name” as column name and that’s the reason, we have used “student_name” as column name.

Note: All Database systems will not allow duplicate names for tables and other database components.

Practice Exercises

You can see a lot of tables in the right side section of the W3 SQL editor. Click on them and try and create tables with similar column names but different table names.

INSERT Command

INSERT Command is used to put data into the table. It’s a simple command and the syntax is as shown below:

INSERT INTO <<table_name>> (column names….) values (….);

To understand it well, let’s again refer to our STUDENTS table above. Let’s try and put the first row into the table STUDENTS, which we have created in the previous section. Let’s say that we have to put the first row in the table STUDENTS, the INSERT command will be written as follows:

INSERT INTO STUDENTS VALUES (“Ramesh Chandra”, “01-Jan-2014”, “.NET”, 999999999);

Please note that we have used ” ” for text and date values but we have not used ” ” for contact number, which is a number column.

Practice Exercises

Refer to STUDENTS table and INSERT the remaining rows in the STUDENTS table.

DELETE Command

DELETE command is used to delete the rows from the tables. It’s again a simple command and its syntax is as follows:

DELETE FROM <<table_name>> condition;

It’s important to note that if we don’t use the condition, the DELETE command will delete all the rows from the table. We will see how to specify the condition in the last part of this tutorial.

What’s next: Part-III of this SQL tutorial, where we will discuss SELECT statement.

We are coming up with a more comprehensive tutorial for learning Business Analysis skills . That tutorial will provide steps to learn the business analyst skills with specific resources including videos and tutorials.

You may also like to look at our other tutorials and videos.

Business Analyst Tutorials

Finally,  SQL is an important skill for Business Analysts specially if you are looking to become a business analyst.

Techcanvass has multiple levels of training program for business analysts.

IIBA ECBA Business Analyst Training

Certified Agile Business Analyst (CABA) Training

Business Analyst in Risk Management

 

SQL Tutorial for Business Analysts

SQL Tutorial for Business Analysts

SQL is an important skill for every entry level business analyst. In this SQL tutorial for business analysts, you will learn the basics of SQL including database fundamentals, SQL structure and SELECT command. This is a 3-part tutorial series.

Introduction to SQL

Structured Query Language (SQL) is used to interact with databases. A database is nothing but a software system to store data for later usage. If you don’t save the data, you can’t use it later. For example, when you register on a website as a user, the website saves your data (like name, user id and password etc) so that you can login anytime after your successful registration.

When you enter your userid and password in the login box, it checks that data with the saved information and if the entered data is found and matched, you are allowed to enter the website and use its features.

SQL is the language, which programmers and IT professionals use to interact with database systems.

SQL and Database

SQL and Database

Formally, a database is known as a Database management system or relational database management system (RDBMS). Oracle, SQL Server and mySQL are some of the popular database systems. A database system has many components, which are associated with storage and management of data. A table is specifically used for storage of data whereas other components are used for related purposes.

Components of a database

Components of a database

A table is a combination of rows and columns (think of Microsoft Excel worksheet). To identify columns in Excel, we give it a name, similarly in database systems, we give names to table columns to identify them. See the STUDENTS table below, it has named columns to identify “WHAT IS WHAT”, sounds logical?

Tables in Database

Tables in Database

The STUDENTS table has 4 columns and 5 rows. Each column representing a specific aspect of STUDENT like name, date of joining etc. This table stores the details of STUDENTS, who have joined courses at Techcanvass.

Database Operations

How do you save data into table? If you want to know when did “Ramesh Chandra” joined, how can you do it? This is where SQL or Structured Query language comes into picture. SQL provides mechanism (known as Commands) to accomplish the tasks of saving, querying and performing other operations with the tables and other components of a database.

The most important commands are SELECT, INSERT, UPDATE, DELETE. There are many other commands like CREATE TABLE, DROP TABLE etc. SQL provides commands to deal with each of the components of database. You can refer to the diagram above named “Components of a database”. If you are not planning to become a SQL developer, you should only focus on learning the following commands:

  • CREATE TABLE
  • INSERT/DELETE
  • SELECT

We are going to focus on these 3 commands in this tutorial. In Part II of this tutorial, we are going to look at CREATE TABLE & INSERT/DELETE, while Part III will deal with SELECT command.

We are coming up with a more comprehensive tutorial for learning Business Analysis skills . That tutorial will provide steps to learn the business analyst skills with specific resources including videos and tutorials.

You may also like to look at our other tutorials and videos, specially for professionals, who are looking to become a business analyst.

Business Analyst Tutorials

Business Analyst Tutorials

 

Finally, SQL is an important skill for Business Analysts specially if you are looking to become a business analyst. Techcanvass provides a Certified Business Analyst (ECBA) training program, to know more about it you can click on the following image

Certified Business Analyst Training

Cheers

Basics of SCRUM and Kanban

In this webinar, the speaker explains the basics of SCRUM and Kanban. It’s a good starting point to learn these AGILE methodologies.

SCRUM and Kanban are two of the most used Agile frameworks in the market today. Organizations are increasingly adopting Agile to develop software projects. In this webinar, the topics covered are as follows:

  • Basics of Scrum
  • Basics of Kanban
  • Sizing for these projects

Here is the recording

Techcanvass conducts these online sessions on topics relating to Agile, Business Analysis, Selenium etc. If you would like to be updated always, please subscribe to Techcanvass channel on youtube

Techcanvass on Youtube