Fineuhl Flashcards
How does a database reach first normal form?
Each value must be scalar ( returns one value and there should be no repeating columns
How does a database reach 2nd normal form?
Every non key column must depend on the primary key
How does a database reach 3rd normal form?
1st and 2nd normal form must be met and all columns must refer to the primary key.
How do you enforce Referential integrity in the database.
Use declarative referential integrity or defining triggers.
What would violate referential integrity.
Deleting a row from a primary key table, inserting a row into a foreign key, update value of primary key or foreign key
what datatypes will store whole numbers, character
Integer-whole numbers. Decimal- decimal numbers.
Char-fixed string length. Varchar-max string length..
What relationship is most common.
One to one, one to many, many to many
One to many is the most common
What is used after Create database?
Go
What is a constraint?
A way to filter what data goes through.
(inline) InvoiceTotal MONEY NOT NULL CHECK(InvoiceTotal >= 0)
(bottom)
CHECK (InvoiceTotal >= 0)
Keyword for constraint on a column?
Check keyword
Customer order has to refer to Customer, what do you use?
A join/ foreign key
When referencing a table when making a database you must do what?
Create the referenced table before it is referenced.
Where do records come from?
tables
When planning the database, 100 east main street sc how do separate.
Street name, city, state, number
What do the CAST and CONVERT function do?
Cast changes one data type to another. Convert does the same thing but has more capabilities