1/12
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is a database?
a persistent organised store of data
What is the difference between a flat file database and a relational database?
In a flat file database, all data is stored in a single table, whereas in a relational database, data is spread out across multiple tables which are linked
What is an entity in a database?
An item of interest about which information is stored
What relationships are there in entity relationship diagrams?
One-to-one (e.g. husband and wife) , one-to many (e.g. mother and children), many-to-many (e.g. pupils and subjects). AIM is to split many-to-many relationships into the other relationships.
What’s the ONE RULE about naming entities in entity relationship diagrams?
Entity names should be singular
What is a primary key?
A unique identifier for each record in a table.
Define a record
a row in a file made up of fields
Define a foreign key
Attribute or field in one table, which links with the primary key of another table.
What is a secondary key?
An index other than the primary key used to search and sort through the database with more convenience and speed.
What are the SQL commands in their normal format to retrieve data.
SELECT (what you want), FROM (the database), WHERE (the conditions that apply)
How to delete a file is SQL
DELETE FROM(tablename) WHERE (conditions are met)
How to update a file in a table using SQL
UPDATE (table name )SET (fieldname= x, fieldname2=y the things that we want to chnage) WHERE (primary_key = x or the conditions that apply)
How to use a join statement.
SELECT FROM JOIN ON JOIN ON WHERE