Learning SQLite Flashcards
(25 cards)
What is a relational database?
A database that organizes information into one or more tables.
What is a table?
A collection of data organized into rows and columns.
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
REAL, a decimal value
What is a SQL statement?
A string of characters that the database recognizes as a valid command and always ends in a semicolon ;
What is a clause?
Perform specific tasks in SQL. By convention, these are written in capital letters and can also be referred to as commands.
What is a parameter?
A list of columns, data types, or values that are passed to a clause as an argument.
UPDATE clause
A clause that edits a row in the table.
SET clause
A clause that indicates the column to edit.
DELETE FROM clause
A clause that lets you delete rows from a table.
WHERE clause
A clause that lets you select which rows you want to delete.
What are constraints?
Used to tell the database to reject inserted data that does not adhere to a certain restriction.
What is SQL?
A programming language designed to manipulate and manage data stored in relational databases.
What is a relational database?
A database that organizes information into one or more tables.
CREATE TABLE clause
A clause that creates a new table.
INSERT INTO clause
A clause that adds a new row to a table.
SELECT clause
A clause that queries data from a table.
ALTER TABLE clause
A clause that changes an existing table.
UPDATE clause
A clause that edits a row in a table.
DISTINCT statement
Used to return unique values in the output. It filters out all duplicate values in the specified column(s).
%
A wildcard character that matches zero or more missing letters in the pattern.
ORDER BY
A clause that indicates you want to sort the result set by a particular column.
LIMIT clause
A clause that lets you specify the maximum number of rows the result set will have.
CASE
A statement that allows us to create different outputs (usually in the SELECT statement). It is SQL’s way of handling if-then logic.
Aggregates
Calculations performed on multiple rows of a table.