Unit 1 Flashcards
SQL includes commands to create database objects such as tables, indexes, and views, as well as commands to define access rights to those database objects.
data definition language (DDL):
SQL includes commands to insert, update, delete, and retrieve data within the database tables.
data manipulation language (DML):
SQL is a
nonprocedural language:
is a group of database objects—such as tables and indexes—that are related to each other. Usually, the ——- belongs to a single user or application.
Schema
They help distinguish the kinds of data that can be stored or processed inside our database objects.
Data Types
Fixed character length data, 1 to 255 characters
CHAR
Variable character length data,1 to 2,000 characters
VARCHAR
Numeric data. decimal(9,2)is used to specify numbers with two decimal places and up to nine digits long, including the decimal places. Some RDBMSs permit the use of a MONEY or a CURRENCY data type.
Decimal
Integer values only
INT
Small integer values only
SMALLINT
formats vary. Commonly accepted formats are: ’DD-MON-YYYY’, ’DD-MON-YY’, ’MM/DD/YYYY’, and ’MM/DD/YY’
DATE
is a collection of related data held in a table format within a database. It consists of columns and rows.
table
A column or combination of columns whose values uniquely identify each row in the table
PRIMARY KEY
A column or combination of columns used to establish and enforce a link between the data in two tables
FOREIGN KEY
Ensures that no duplicate values are entered in specific columns that do not participate in a primary key
UNIQUE