database final Flashcards
(53 cards)
entity is what
is some identifiable thing that users want to track
functional dependency
occurs when the value of one set of attributes determines the value of a second set of attributes
what is an example of functional dependency
studentID is a determinent of studentName
composite determinant
a determinant of a functional dependency that consists of more than one attribute for example student name and class name to determine grade
compostie key
is a key that consists of two or more columns
candidate key
is a key that determines all of the other columns in a relation from the candidate keys the designer selects one to be the PK
primary key
is a candidate key selected as the primary means of uniquely identifying a row in a relation
Surrogate Key
is an artificial column added to the relation to serve as the primary key this is created when a good PK cannot be found.
foreign key
is the primary key of one relation that is placed in another relation to for a link between the relations.
referential integrity constraints
is a statement that limits the values of the foreign key to those already existing as primary key values in the corresponding relation.
what is BSNF
boy scott normal form this is how every database should be performed
select statement
select
from
where
;
- in sql
means to select all columns
sql built in functions
count, sum, avg, min, max
quering multiple tables
must use joints by stateing the table and its fk = to table the the pk
how do you create a table in sql
use create table statement but dont specify any of the FK’s untill all tables have been created and the data has been input also makeing fk’s null makes life easier
alter table
used when inputing new column or fk’s
insert command
used to insert values into a table
update command
is used most often when you want to update an entry
data model
is a plan or blueprint for a database design
entity-relationship model
is a set of concepts and graphical symobols that can be used to create conceptual schemas.
what is and entity is a relationship model
this is a thing in which you want to store data like students, or employee, or courses
an attribute in entity relationship model
is what describes and entity characteristics these are the columns in the table
identifiers
are attributes that name or identify entity instances or the primary key these can be composite where it consists of 2 or more attributes