101.school
CoursesAbout
Search...⌘K
Generate a course with AI...

    How Databases work

    Receive aemail containing the next unit.
    • Introduction to Databases
      • 1.1What is a Database?
      • 1.2Importance of Databases
      • 1.3Types of Databases
    • Database Models
      • 2.1Hierarchical Model
      • 2.2Network Model
      • 2.3Relational Model
      • 2.4Object-oriented Model
    • Relational Databases
      • 3.1Introduction to Relational Databases
      • 3.2Tables, Records, and Fields
      • 3.3Keys and Indexes
    • SQL Basics
      • 4.1Introduction to SQL
      • 4.2Basic SQL Commands
      • 4.3Creating and Modifying Tables
    • Advanced SQL
      • 5.1Joins
      • 5.2Subqueries
      • 5.3Stored Procedures
    • Database Design
      • 6.1Normalization
      • 6.2Entity-Relationship Diagrams
      • 6.3Data Integrity
    • Transaction Management
      • 7.1ACID Properties
      • 7.2Concurrency Control
      • 7.3Recovery Techniques
    • Database Security
      • 8.1Security Threats
      • 8.2Access Control
      • 8.3Encryption and Authentication
    • NoSQL Databases
      • 9.1Introduction to NoSQL
      • 9.2Types of NoSQL Databases
      • 9.3Use Cases for NoSQL
    • Big Data and Databases
      • 10.1Introduction to Big Data
      • 10.2Big Data Technologies
      • 10.3Big Data and Databases
    • Cloud Databases
      • 11.1Introduction to Cloud Databases
      • 11.2Benefits and Challenges
      • 11.3Popular Cloud Database Providers
    • Database Administration
      • 12.1Roles and Responsibilities of a Database Administrator
      • 12.2Database Maintenance
      • 12.3Performance Tuning
    • Future Trends in Databases
      • 13.1In-memory Databases
      • 13.2Autonomous Databases
      • 13.3Blockchain and Databases

    SQL Basics

    Introduction to SQL

    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.

    Understanding SQL: Definition and Importance

    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.

    SQL vs NoSQL: Differences and Similarities

    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 Syntax: Basic Rules and Structure

    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:

    • SQL is not case sensitive. Usually, SQL keywords are written in uppercase.
    • SQL statements are dependent on text lines. We can place an SQL statement on one or multiple text lines.
    • You can perform most of the actions in a database with SQL statements.
    • SQL depends on tuple relational calculus and boolean algebra.

    In the next units, we will delve deeper into SQL commands and how to create and modify tables.

    Test me
    Practical exercise
    Further reading

    Good morning my good sir, any questions for me?

    Sign in to chat
    Next up: Basic SQL Commands