Introduction to SQL

Gautami ShettyGautami Shetty
3 min read

SQL

SQL stands for Structured Query Language

Data

  • Data is a raw fact which describes the properties of an object.

  • Properties is also known as attributes

  • Object is also known as entity

P.S. Focus on the concept not on how beautiful Julli looks

In this example, we have a beautiful woman named Julli. Julli is 21 years old, female, 5'5" tall, and weighs about 45 kg. These are some of the details about Julli. However, if we only mention "21 years old," "female," and "45 kg" without specifying what or who we are describing, the information is incomplete. These are raw facts, but about what? In this case, they describe the object—Julli.

So, this concludes that data is a raw fact which describe the properties of an object.


Database

Database is a place or a medium in which data is stored in systematic and organised order.

In the database, we will perform one operation called CRUD operation

  1. C - create (Insert)

  2. R - read (Retrieve)

  3. U - update (Modify)

  4. D - delete (Drop)


DBMS

  1. DBMS stands for DataBase Management System.

  2. DBMS is a software which is used to store data in a systematic and organised manner.

  3. The main features of DBMS are security and authentication.

  4. To communicate with DBMS we use Query Language.

  5. In DBMS the data is stored in file format.


RDBMS

  1. RDBMS stands for Relational DataBase Management System.

  2. RDBMS is also software which is used to store data in a systematic and organised manner.

  3. The main features of RDBMS are security and authentication.

  4. To communicate with RDBMS we use Structured Query Language.

  5. In RDBMS the data is stored in table format.


Relational Model

  1. Any DBMS software which follows relational model it will become RDBMS software.

  2. In relational model, we store the data in the form of table format.

💡
Relational Model was proposed by one of the data scientist called E. F. Codd


Table

  1. The combination of rows and columns is called as table.

  2. Table consists of 3 parts:

    1. Rows/ Records/ Tuples

    2. Columns/ Fields/ Attributes

    3. Cell


Rows

  1. Horizontal Portion of the table is called as Row

  2. Row is also called as Records or Tuples

Columns

  1. Vertical Portion of the table is called as Column

  2. Column is also called as Fields or Attributes

Cell

  1. The smallest unit of the table is Cell

  2. Intersection of rows and columns is called as Cell.


Rules of E. F. Codd

  1. The data entered in a cell must be a single value

  2. According to E. F. Codd rules, we can store data in multiple tables and if needed we can establish the relation between these tables using key attributes.

  3. In RDBMS, we can store data in tabular form, which includes Meta Data

    Meta data is the data about the data

  4. We can validate the data in two steps -

    1. By assigning it the data type

    2. By assigning it constraints

💡
The data types are mandatory and constraints are optional.
0
Subscribe to my newsletter

Read articles from Gautami Shetty directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Gautami Shetty
Gautami Shetty