0% found this document useful (0 votes)
36 views2 pages

Relational Databases

SQL allows users to write queries to define and retrieve subsets of data from relational databases. SQL operates through simple, declarative statements to manage data stored in tables which are organized into rows and columns. A SQL statement always ends with a semicolon and is made up of clauses like CREATE TABLE which perform specific tasks like creating a new table with columns of defined data types.

Uploaded by

John Mancia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views2 pages

Relational Databases

SQL allows users to write queries to define and retrieve subsets of data from relational databases. SQL operates through simple, declarative statements to manage data stored in tables which are organized into rows and columns. A SQL statement always ends with a semicolon and is made up of clauses like CREATE TABLE which perform specific tasks like creating a new table with columns of defined data types.

Uploaded by

John Mancia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL (pronounced “S-Q-L” or “sequel”) allows you to write queries which define

the subset of data you are seeking. Unlike Excel and Sheets, your computer and
SQL will handle how to get the data; you can focus on what data you would like.
You can save these queries, refine them, share them, and run them on different
databases.

SQL, Structured Query Language, is a programming language designed to


manage data stored in relational databases. SQL operates through simple,
declarative statements.

Relational Databases
A database is a set of data stored in a computer. This data is usually structured
into tables. Tables can grow large and have a multitude of columns and records.

A relational database is a database that organizes information into one or more


tables.

A table is a collection of data organized into rows and columns. Tables are
sometimes referred to as relations.

All data stored in a relational database is of a certain data type. Some of the most
common data types are:

 INTEGER, a positive or negative whole number


 TEXT, a text string
 DATE, the date formatted as YYYY-MM-DD for the year, month, and day
 REAL, a decimal value

Statements
The code below is a SQL statement. A statement is text that the database recognizes as a
valid command. Statements always end in a semicolon ;.

CREATE TABLE table_name (


column_1 data_type,
column_2 data_type,
column_3 data_type
);
Let’s break down the components of a statement:

1. CREATE TABLE is a clause. Clauses perform specific tasks in SQL. By convention, clauses
are written in capital letters. Clauses can also be referred to as commands.

You might also like