Databases Flashcards
What is normalistaion?
Every non key attribute is dependent on the key, the whole key, and nothing but the key
What is 1st normal form?
No repeated attributes
What is 2nd normal form?
All attributes are dependent on the key
What is 3rd normal form?
No attribute must be dependent on any non key attribute
Describe the SELECT function in SQL
SELECT
FROM
WHERE
ORDER BY
Describe the INSERT function in DML
INSERT INTO table_name (column1, column2…)
VALUES (value1, value2)
Describe the UPDATE function in DML
UPDATE table_name
SET coulmn1 = value, column2 = value2….
WHERE some_column = some_value
Describe the DELETE function in DML
DELETE FROM table_name
WHERE some_column = some_value
a) Describe the CREATE TABLE function in DDL
b) What are some datatypes that can be used in table creation?
CREATE TABLE ( field name 1 (datatype), field name 2 (datatype), field name 3 (datatype), PRIMARY KEY (field name) )
Varchar(x), int, yes/no, date, money