SQL (Structured Query Language) is a standard language used to manage and manipulate relational databases.
It allows users to perform operations like querying data, inserting, updating, and deleting records.
SQL is essential for database management, data analysis, and backend development, supporting systems like MySQL, PostgreSQL, Oracle, and SQL Server.
SQL
What is SQL?
Answer: Structured Query Language (SQL) is a standard computer language for relational database management and data manipulation.
2: What can we do with it?
Answer: Write a query against a database.
Retrieve data from a big database.
1: Insert Records.
2: Update Records.
3: Modify the data.
3: SQL is a non-procedural language:
Cannot write applications, software, etc.
Simple but powerful.
4: SQL is all about data:
1: Read/Retrieve data.
2: Write data.
3: Update data.
5: Difference between Database Administrator (DBA) and Data Scientists?
1: DBA:
1: Manages/Governs Entire Database.
2: Permits users.
3: Determines access to data.
4: Manages and creates tables.
5: Uses SQL to query and retrieve data.
2: Data Scientists:
End user of a database.
Uses SQL query to retrieve data.
6: Difference between DBMS and RDBMS?
DBMS | RDBMS |
RDBMS supports a distributed database. | RDBMS stores data in tabular form. |
Data elements need to access individually. | Multiple data elements can be accessed at the same time. |
No relationship between data. | It supports a single user. |
Normalization is not present. | Normalization is present. |
DBMS does not support a distributed database. | Data is stored in the form of tables, which are related to each other. |
It stores data in either a navigational or hierarchical form. | It uses a tabular structure where the headers are the column names, and the rows contain corresponding values. |
It supports a single user. | It supports multiple users. |
RBMS | RDBMS |
It is used for small organizations and deals with small data. | Data fetching is slower for a large amount of data. |
It is used to handle a large amount of data. | It supports multiple users. |
Data fetching is fast because of the relational approach. | There exist multiple levels of data security in an RDBMS. |
Examples: MySQL, PostgreSQL, SQL Server, Oracle, Microsoft Access, etc. | The data in a DBMS is subject to low security levels with regard to data manipulation. |
Low software and hardware necessities. | High software and hardware necessities. |
Examples: XML, Windows Registry, etc. | It deals with a small quantity of data. |
It deals with a large amount of data. | Data redundancy is common in this model. |
Data redundancy is common this model. | Keys and indexes do not allow Data redundancy. |
7: SQL Data Types:
1: Numeric:
bit, tinyint, smallint, int, bigint, decimal, numeric, float, and real.
2: Data/Time:
Data, Time, Data time, Timestamp, and Year.
3: Character/String:
Char/ Varchar, Varchar (max), and Text.
4: Unicode Character/String:
NChar, NVarchar, NVarchar(max), and NText.
5: Binary:
Binary, Varbinary, Varbinary(max), and Image.
6: Miscellaneous:
Clob, Blob, XML, and JSON.