Vikas Rajput Profile picture
Oct 9 10 tweets 2 min read Twitter logo Read on Twitter
SQL Commands in a Nutshell:
DDL (Data Definition Language): Concerned with the structure or schema of the database.

CREATE: Used to create objects like tables, views, indexes, etc.

ALTER: Used to modify existing database objects. For example, it can add, delete, or modify columns in an existing table.
DROP: Used to delete database objects. For example, DROP TABLE deletes an existing table.

TRUNCATE: Used to remove all records from a table, including all spaces allocated for the records.
DML (Data Manipulation Language): It deals with data manipulation and the management of data within the database.

INSERT: Adds new rows/records to a table.

UPDATE: Modifies existing rows/records in a table.
DELETE: Removes rows/records from a table.

MERGE: Used to insert, update, or delete records from a table based on certain conditions.
DQL (Data Query Language): It used to retrieve data from a database.

SELECT: Retrieves data from one or more tables. This command can be combined with various clauses (e.g., WHERE, GROUP BY, HAVING) to filter, group, and sort the retrieved data.
DCL (Data Control Language): It deals with permissions and rights that can be granted or revoked.

GRANT: Provides specific privileges to users or roles.

REVOKE: Removes specific privileges from users or roles.
TCL (Transaction Control Language): It used to manage transactions within a database, ensuring data integrity.

COMMIT: Saves all the transactions to the database since the last COMMIT or ROLLBACK command.
ROLLBACK: Restores the database to the last committed state. It undoes any changes made since the last COMMIT.

SAVEPOINT: Sets a point within a transaction to which you can later roll back.

SET TRANSACTION: Configures the properties of a transaction.
Thanks for reading!

Announcement 📢

Now you can speak to me, if you're feeling stuck within your tech career then you can book a 1:1 session with me to get personalized help.

For more details log on to topmate.io/vikasrajputin

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Vikas Rajput

Vikas Rajput Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @vikasrajputin

Sep 18
SOLID principle is one of the most important design principles in OOP languages like Java, Python, C#, etc.

Sadly, most of the programmers find it super difficult to understand.

Here's the simplest guide to understand SOLID principles:
1. Full form

S = Single Responsibility Principle
O = Open/Closed Principle
L = Liskov Substitution Principle
I = Interface Segregation Principle
D = Dependency Inversion Principle

(we will use Java to understand them)
2. Single Responsibility

A class should always have one responsibility and there should be only a single reason to change it.
Read 18 tweets
Sep 15
Mostly, we can store our data using two popular ways:

1) SQL
2) NoSQL

Here's a quick guide to help you choose which one suits your needs best:
1. SQL

- Used to store relational data, where one set of data is related to another

- It is strictly structured in nature, so before using it we need to specify what exact structure we need to use
2. NoSQL

- Used to store unstructured data, where each set is not expected to be related to each other

- It's not strict in nature and its schema can be changed at runtime as well
Read 10 tweets
Sep 13
JWT is now become the de-facto standard for authenticating Modern APIs.

This guide will make it dead simple for you to understand JWT:
1. JWT stands for JSON Web Token
2. It's a token that is used to authenticate and authorize users in an application.

"authenticate" means who they're.
"authorize" means what they can access.

The token itself contains, all the necessary information about the user, like user ID and role, etc, in a JSON.
Read 9 tweets
Sep 11
No matter if you're learning SQL for Data Science or Software Development.

You should master SQL "Normalization".

Here's a simple guide to get you started:
1. Introduction

Normalization is a process to eliminate redundant data, prevent data anomalies, and ensure data integrity.

It makes your life super easy to manage, store and query data effectively in longer run!

Normalization happens in multiple stages:

1NF, 2NF, 3NF
2. Realworld Example

To understand normalization, let's consider a simple restaurant database example.

We have one table "Orders" with columns: OrderID, CustomerName, Dish, Chef, DishType, Price. Image
Read 11 tweets
Sep 6
Singleton Design Pattern is the most widely used pattern in all the programming languages (Java, Javascript, Python, etc)

Here's what it means in the simplest terms:
1. Singleton design pattern ensures that a class has only one instance and provides a global point of access to that instance.
2. To implement the singleton pattern in Java, we need to create a class with a private constructor to prevent other classes from instantiating it.

We also need to create a static method that returns the instance of the class.

Eg: Image
Read 8 tweets
Sep 4
To master SQL, you need to have an extremely good understanding of SQL statements:

They're mainly divided into 5 categories: DDL, DQL, DML, DCL, TCL

Here's the simplest guide to learn DDL:
1. Create statements

This DDL statement is used to create a new table, database, view, or other database objects.

For example, to create Employees table we can use below query: Image
2. Alter statements

This statement helps in modifying the structure of a database object. For eg: we can add columns, changing their datatype, etc.

Let's add Salary column in the Employees table using below query: Image
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(