define a foreign key and its use
define a primary key
describe the form a table has to be in for it to be in 1NF
each field has a unique name
no fields representing grouped data
data is atomic
has a primary key/ each record is unique
describe the form a table has to be in for it to be in 2NF
Is in First Normal Form
Every field is dependent on every part of the primary key - if primary key is not composite this will be met already
describe the form a table has to be in for it to be in 3NF
data is in the 2NF
non-key field depend only on the one primary key
what’s one advantage and one disadvantage in indexing a random field
pro - Searches of the field can be performed more quickly
con - The index takes up extra space
in the database
The user’s password is passed to a function that generates a hash and the result is stored in
passwordHash.
Describe what is meant by the term ‘hash’.
a result generated by applying an algorithm/numeric
process to a value
what is a pro of storing a password as a hash
hash functions are one way/can’t be reverse
if someone gains access to the database they cannot
access user’s password