what is a database
structured collection of items of data
how can a database be accessed
through different application programs
what is a relational database
where data items are linked by internal pointers
what is a table
group of similar data
what is a record
row in a table in a database
what is a field
column in a table in a database
what is a tuple
one instance of an entity represented in a row
what is an entity
anything that can have data stored about it
what are attributes
an individual data item stored for an entity
what is an example of attribute database for a human
name, address, date of birth
what is a candidate key
an attribute or smallest set of attributes in a table
what key represents no tuple having the same value
candidate key
what is a primary key
a unique identifier for a table
what is a secondary key
a candidate key that is an alternative to the primary key
what is a foreign key
a set of attributes in one table that refer to the primary key in another table
what is a relationship
one table in a database has a foreign key that refers to a primary key in another table in the database
what is referential integrity
does not contain any values of a foreign key that are not matched to the corresponding primary key
what is an index
built from one or more columns in a database table to speed up searching for data
what is entity-relationship model
a graphical representation of a database and the relationships between the entities
what does ER stand for
entity relationship
what is normalisation
organising data to be stored in a database into two or more tables and relationships between the tables
what does normalisation help with
data redundancy minimisation
what is first normal form
status of a relational database in which entities do not contain repreated groups of attributes
what does 1NF stand for
first normal form
what is second normal form
status of a relational database in which entities are in 1NF and any non-key attributes depend upon the primary key
what is third normal form
entities are in 2NF and all non-key attributes are independent
what is composite key
form a primary key to provide a unique identifier for a table
what does this picture show
entity relationship diagram
what is a file
collection of items of data
what can individual elements of data called
data items
what do you need to consider when changing a record in the another program
structure needs to be the same
what do you need to consider if you have to change the structure of a record when updating
you must rewrite the structure of others
what is the main issue with not storing with a file-based approach
inconsistency, redundant, non independent data
what is a word for an electronic filing cabinet
database
what can you do in a database
insert, retrieve, update, cross-reference data
what kind of database has internal pointers linking data items
relational database
which is better, database approach or fie-based approach
database approach
what makes database approach better
less storage used, no redundancy, independent data, consistent data
where are attributes on database tables
columns
where are entities on database tables
rows
What approach is this
File
What approach is this
Database
what should be thought of when trying to keep relational integrity
database must not contain values of a foreign key that are not matched in corresponding primary key
what are the form or relationships in databases
one to one
one to many
many to one
many to many
what are candidate key in a table
all attributes
what key is usually always there
primary key
if it isn’t primary key, what is it in a table
secondary key
what else is the primary key in a table
candidate key
what cardinality of relationships is this
one to one
what cardinality of relationships is this
one to many
what cardinality of relationships is this
many
what cardinality of relationships is this
one or more
what cardinality of relationships is this
one and one only
what cardinality of relationships is this
zero or one
what cardinality of relationships is this
zero or many
what symbol does this represent in databases
entities
what symbol does this represent in databases
attributes
what symbol does this represent in databases
relationships among entities
what symbol does this represent in databases
attributes to entities and entity sets with other relationship types
what symbol does this represent in databases
multi-valued attributes
what symbol does this represent in databases
weak entity
what is cardinality
number of elements in a set
what will happen to tables if they are not normalised
they will be larger with more data stored
what happens to data if it was not normalised in a table
becomes redundant
what is the problem of a non-normalised table
harder to update and difficult to extract data
what happens when you add data to a non-normalised table
you will have to change everything repeated everywhere manually
what can normalise tables
1NF, 2NF, 3NF
what does 1NF do
do not have repeated groups/attributes
what does 2NF do
any non-key attributes depend upon primary key and no partial dependencies
what does 3NF do
all non-key attributes are independent so there are no non-key dependencies
where are entitles in 2NF from
in 1NF
where are entities in 3NF from
2NF
mandatory or option cardinality? : one to many
mandatory
mandatory or option cardinality? : one or more
mandatory
mandatory or option cardinality? : one and only one
mandatory
mandatory or option cardinality? : zero or one
optional
mandatory or option cardinality? : zero or many
optional
what does it mean by optional cardinality
may or may not participate in a relationship with another entity
what does it mean by mandatory cardinality
must participate in a relationship with another entity
what is a compound key
two or more fields are needed to create a unique value
what does ASC mean in databases
ascending order
what does DESC mean in database
descending order
what does ORDER BY mean database
sorts data in ascending or descending
what does UPDATE do
change values in one or more columns
what does DBMS stand for
Database management system
what is DBMS
system software for creation and manipulation of a database
what is data management
organisation and maintenance of data in a database to provide the information required
what is data dictionary
set of data that contains metadata for a database
what is metadata
data about other data
what is data modelling
analysis and definition of the data structures required in a database and to produce a data model
what is logical schema
a data model for a specific database that is independent to DBMS used to build that database
what is access rights database
permissions given to database users to access, modify or delete data
what is developer interface
feature of a DBMS that provides developers with the commands required for definition, creation and manipulation of a database
what does SQL stand for
structured query language
what is SQL
language used with relational databases for data definition and data modification
what is query processor
features of a DBMS that processes and executes queries written in SQL
how does data redundancy issue get solved
storing data in separate linked tables
what issues does DBMS flag to improve data redundancy
accidental deletion or errors
how do you fix data inconsistency issue
storing most items only once
how do you fix data dependency issue
changes made have little or no effect on the applications using the database