data modelling Flashcards
what is a data model?
collection of concepts for representing complex real-world data in an organisation ion an abstract way.
create a specific data model for a specific problem
what are the benefits of data modelling?
- provides an abstracted idea of the problem without needing implementation
- facilitates communication between designer and user
- provides different views to different users
- accurate data models is key to good design
What is a schema?
a description of a database at a logical level. lists attributes
e.g.
COMPANY( EMPLOYEE, DEPARTMENT, PROJECT, WORKS_ON)
what is 3 level schema architecture?
- physical level
- storage structure of data - internal/conceptual level - defines the logical structure
- bridge between external and physical levels - external level
- tailored to be viewed by a particular category of users + hide data for security
How does the architecture of modelling work?
specific standards set by ISO where each any changes cannot affect level above
makes it easier to understand higher up for end user communication
e.g. any changes to physical model will not effect internal model
What are the types of database models?
legacy = - hierarchal model (boxes point to next box) works like a long list, must follow predefined route for navigation - no queries
relational model = table of matrix of columns and rows highly structured, tables linked via unique keys
object oriented = based on oop, no query language
document database = semi structured, no scheme needed, unique keys
key value database = works in pairs of keys and values, very fast retrieval
graph = made up of nodes and edges, quick to traverse
What is the ER model?
Entity relation model
- relation model used as design tool to make it easier to examine relational structures.
- conceptual level
What are the different entity types?
Strong/Weak (does the entity rely on another entity)
What are the types of relationships?
Degree ( binary, unary, ternary)
Participation ( optional/ mandatory)
Cardinality (0, one, many)
What are the types of attributes?
Single/multivalued
simple/composite/derived (calculated in table)
domain (list of allowed values)
What is the ERD?
Entity relationship diagram
What are the forms of entity relationship diagram?
Chens notation
Crows foot
UML
In chens notation what do each shape mean?
Rectangle = entityType
Double rectangle = weak entity type (dependant on another entity, if mother entity removed, so is it)
Oval = attribute
Underlined oval = identifying attribute (key)
double oval = multi-valued attribute
diamond = unique relationship
What is crows foot notation?
Each table lists its primary key first as PK and then has a line connecting whether it is one to one, one to many, many to one, many to many etc
What is UML diagram?
Tables of attributes with connecting lines with cardinality on
a,b where a is minimum and b is maximum
e.g. if going to many then it would be 1,n