Database Design And Development Flashcards
What are end user requirements?
What the people who it’s designed for want
What are functional requirements in a database?
Things it’s expected to do with the information it has
How do you find functional requirements from end user requirements?
Rephrase the statements as what SQL queries you’d need
What is an entity?
A table
What is an attribute?
A field
What is a primary key?
Unique field in a table
What is a foreign key?
Is the primary key of another table, it links tables together
What is entity occurrence?
The data in the fields
What is a compound key?
If no fields contain a unique value, a combination of columns can be used a primary key
What is a data dictionary?
Designed for entities, laid out as a table containing the definition of each attribute
What are the different cardinalities?
One to one = 1 school is managed by 1 headteacher, 1 headteacher manages 1 school
One to many = 1 school employs many teachers, each teacher is employed by 1 school
Many to many = each student has many subjects, each subject is taken by many students
What is an entity relationship diagram?
Shows the cardinality between different entities
Helpful tips for entity relationship diagrams?
It’s always one to many
If one entity contains a foreign key that one is on the “many” side of the relationship
Underlined = primary key
*(Next to the attribute) = Foreign key
What is an entity occurrence diagram?
The attributes in the tables are listed and the ones that it’s linked to are joined with a line
What are wildcards?
They’re used to replace one or more characters, it uses the LIKE operator in the WHERE clause. Used for incomplete information.
How many characters they replace:
* = 0, 1 or many
? = 1
What is the SELECT query?
SELECT = Fields to show
FROM = What tables/queries it’s from
WHERE = conditions and equijoins
GROUP BY = columns with the same info is grouped together
ORDER BY = sort by a feild ascending or descending
What is an UPDATE query?
UPDATE
SET = what you’re changing
WHERE = the condition
What is a DELETE query?
DELETE
FROM = what tables/queries it’s from
WHERE = conditions
What is an INSERT query?
INSERT INTO = all of the fields in the table
VALUES = all values being entered in the same order as the coressponding feilds
What makes something fit for purpose?
It meets the end user requirements and the functional requirements