DDD - Design Flashcards
What does GDPR stand for
General Data Protection Regulation
What is GDPR
legislation which sets out rules for the protection of personal data
Under GDPR individuals have the right to
be informed about how their personal data will be used
see any data held about them
have any inaccurate data held about them
have information about them delted once there is no longer a reason for holding it
Under GDPR businesses must
Store all data securely
report any data breach within 72 hours
ensure that any data held about an individual is accurate
provide access to data held about an individual when requested by the individual
what is an entity
an object which a database will store information
what can entity be
a person, object or something abstract
examples of entity
-pupil
-teacher
-car
-holiday booking
what is an attribute
an item of information that relates to particular entity
Examples of attributes
-forename
-dob
-model
-arrival
What is a primary key
a field which uniquely identifies a record in a database
what happens to database design primary keys are
underlined
what is a foreign key
a primary key from one table which is used in a second table to link the tables together
in database design, foreign keys are shown with
an asterisk
attribute types
Text
Number
Date
Boolean
What is the size of an attribute
a measure of how much space the field will take up when stored in main memory
the size of a text attribute is
the number of characters which will be stored
What happens if the attribute size is too small
it may result in data being lost
what happens if the attribute size is too big
otherwise storage space is wasted unnecessarily
what is a presence check
ensures that data is entered in a field
What is restricted choice check
limits data entry to a set of acceptable values
what is field length validation
limits the number of characters that can be stored in a field
what is range check
ensures that data falls between two values
ERD
entity relationship diagram
What is an ERD
a graphic representation of entities in a database and their relationship to each other
What should an Entity Relationship Diagram include
Entites
Attributes
Primary Keys
Foreign Keys
Cardinality
Description of relationship
Types of cardinality
1:1
1:M
M:M
example of a 1:1 relationship
1 husband has 1 spouse
example of a 1:M reationship
! mother can have many children
example of M:M relationship
many aunts can have many nieces and nephews
what is a data dictionary
contains information about the tables and fields in a database
Information in a data dictionary is known as
metadata
What should metadata include
Entity name
Information about each attribute belonging to the entity
what is a query
a request for data from a database table and tables
What information should be stored about each attribute belonging to the entity
key
type
size
required
validation
what should a query design include
fields to be displayed
tables that are used
query data
sort order of the query data