Databases Flashcards
define database
persistant organised (stored in records and fields) store of related data
define an entity
A real thing like people or customers (the table name in the database)
define a table
collection of data that relates to an entity (customers)
define a record
collection of data about one singular entity (rows)
define field
a unique piece of data about an entity i.e (student firstname) (collumns)
define a flat file database
a table with multiple entities
i.e table with data on both customer and item that they buy
why is a flat file database bad
because everytime a customer buys an item all their data needs to be re added to the table so if address changed it has to be changed on every order
when would an intersection table be used
in a many to many database
define primary key
A field which has a unique value for every record
A unque identifier
how does an intersection table work
uses the primary keys from the needed records in order to reference them i.e customer 3 bought procuct 17
define secondary key
a second unique identifier Not always present. film number (primary key) film name(secondary key)
define foreign key
primary key used in another table (intersection table?)
what is referential integrity
a given element that is referenced in another table is not deleted (not just records could be fields)
What does ACID stand for
atomicity consistency isolation durability
what does Atomicity mean (in ACID)
that a transaction is either entirely processed or not at all proccessed