CREATE TABLE tblName
(
fieldName1 INT NOT NULL AUTO_INCREMENT,
fieldName2 VARCHAR(10)
);
Back
attributes of a table in 1NF
Front
- each row of data must contain atomic values
- each row of data must have a primary key
- the primary key must be given a value when the record is inserted
- the primary key must be compact
- primary key values can't be changed
Back
database
Front
a container that holds tables and other SQL structures
Back
table
Front
the structure inside a database that contains data
Back
to add a new column that is a primary key to a table
Front
ALTER TABLE tblName
ADD COLUMN fieldName1,
ADD PRIMARY KEY (fieldName1);
Back
to add values to an existing table
Front
INSERT INTO tblName
(fieldName1, fieldName2)
VALUES (value1, value2);
Back
SQL data types
Front
CHAR, VARCHAR, INT, BLOB, DATE, TIME, DEC
Back
RDBMNS
Front
relational database management system
Back
atomic data
Front
- data that is broken down into the smallest pieces
- can't have multiple columns with the same type of data