F453 - databases Flashcards
What is the use of the primary key?
unique identifier of each record
What is the use of the foreign key?
primary key from one table…
…used as an attribute in another…
…to link tables/provide relationship between tables
What is the use of the secondary key
used to search for a group of records
What is a data dictionary?
a file containing descriptions of data in database
used by database managers…
…then altering database structure
Uses metadata to define the tables
What are the benefits of a relational database compared with a flat file database?
avoid data duplication/save storage data consistency data integrity easier to change data easier to change data format data can be added easily data security/easier to control access to data.
Explain why a foreign key is also a primary key, but a primary key need not be a foreign key
foreign key links tables (to represent many to one relationship)…
…so that only one record is accessed/to avoid duplicate data
eg primary key from B used as foreign key in C from (a)
primary key is in a table that may contain data not required in another table
eg primary key from C is not used in B and hence cannot be a foreign key
What’s the difference between char and varchar data types
CHAR is fixed length
VARCHAR is variable length
Why are different views of data made available to users in a database?
so users can access the data they need
users do not need specialist knowledge
to protect data
to prevent unauthorised access.
What are the consequences of a many-to-many relationship?
not allowed/not in 3NF
needs another table between Student & Subject…
…to avoid duplication of data/to change to 3NF
What is a report, and what are the key features?
presentation of selected data…
…usually in the form of a table/specific layout
may be defined in advance…
…so the user does not need to set it up
Features of report definition: a query, a display order