Table Components Flashcards
What are some characteristics of a table?
It must contain at least one column, but it can contain zero rows.
Each column has to have a defined data type.
Columns can be set to allow or prevent null values.
What is a primary Key?
The Primary Key is a column or set of columns that makes a record unique in a table.
What is a Foreign Key?
A Foreign Key references the primary key in another table
Can a table have multiple Foreign Keys?
Yes!
Do the values need to be unique in a foreign key?
no
Do the values need to be unique in a primary key?
Yes
What is an Identity Column?
A numeric column that automatically increments when a new record is added to a table.
What is a NULL value?
An undefined value (not a blank value). Like a question that hasn’t been answered.
What is an exact numeric?
Its a data type like a bit, int, decimal, numeric, or money that stores numbers of various precision
What is a bit?
Can only can values like 1 or 0
What is an int?
Can only contain whole numbers (can be negative)
what is a decimal (p,s)
Can contain whole or decimal numbers. The p parameter specifies the total number of digits that the number can hold, and the s parameter specifies the number of digits to the right of the decimal point (scale).
How many decimal places can the decimal (p,s) go?
38
How many decimal places can the money numeric go?
4 decimal places
What is an approximate numeric?
Float and Real are approximate numerics. They are used when the precision of a number may exceed 38 places. They may not return an exact value.