Structured Query Language, or SQL, is a standard language for managing and manipulating databases. It is used to perform tasks such as update data on a database, or retrieve data from a database. Some common relational database management systems that use SQL are Oracle, Sybase, Microsoft SQL Server, Access, Ingres, and more.
SQL is a domain-specific language used in programming and designed for managing data held in a relational database management system (RDBMS), or for stream processing in a relational data stream management system (RDSMS). It is particularly useful in handling structured data, i.e., data incorporating relations among entities and variables.
SQL offers two main advantages: first, it introduced the concept of accessing many records with one single command; and second, it eliminates the need to specify how to reach a record, e.g., with or without an index.
While SQL is a language used for operating relational databases, NoSQL is a whole set of database systems that allows for non-relational operations. They are both used for storing data, but they have different design architectures, offer different features, and serve different purposes.
SQL databases are primarily called as Relational Databases (RDBMS); whereas NoSQL database are primarily called as non-relational or distributed databases. SQL databases are table based databases whereas NoSQL databases are document, key-value, graph or wide-column stores. SQL databases have predefined schema whereas NoSQL databases have dynamic schema for unstructured data.
SQL is case insensitive, which means that SELECT
and select
have the same meaning in SQL. However, it is common practice to write SQL keywords in uppercase.
In SQL, we have some unique sets of rules and guidelines called "Syntax". We cannot avoid these rules. If we do not follow these rules, we will get syntax errors. Here are some basic SQL syntax rules:
In the next units, we will delve deeper into SQL commands and how to create and modify tables.