L7 - Modelling business data Flashcards
Data models facilitate clarification of…
the data the systems need to store and manage
the most efficient way of organizing the data
potential risks and challenges related to data within the organization
What it the aim of data modelling?
The data should be organized in logical groups with shared characteristics – constructing a model robust to change
Rules should be drawn up to ensure that all data are correctly entered and maintained
Data needs to be stored in one place only to avoid redundancies in the data model.
Identification of the most efficient way of organising data
What is the entity relation diagram?
Data modelling technique
ERD is a technique to achieve a satisfactory organization of a system’s data.
When making an ERD iterations are necessary in order to obtain a satisfactory data mode
What are entities, entity-types and entity-instances?
Entity – an object, about which the system needs to store data
The entity represents a number of entity occurrences
Entity-types describe the abstract characteristic of an object (e.g. Student, Car, or Country)
Entity-instances are the specific example/instance of the entity-type (e.g. John Johnson)
Not necessarily physical objects (e.g. rental, complaint)
What are relationships between entities?
Entities can be in relationships with one another: Entity Relationship Diagram
Relationships are modelled as straight lines between entities
Entities ”participate” in relationships
Binary relationships: two entities participate
Relationship-types “attend”
Relationship-instance “John” attends “AU”
What are attributes?
Attributes – the elements that make up the entity
The attributes recorded about the entity are only those of significance to the system
Attributes has values, e.g. ‘First name’ – value: Peter
What are primary keys?
The primary key is an attribute or combination of attributes that uniquely identifies one occurrence of an entity, such as one specific customer or product. The primary key could be a unique customer number
A primary key must always have a definite value (not 0), must be unique for all records, unchangeable, attribute that system developer has control of
As soon as an instance of an entity is created it must have a value assigned for its primary key
What is a candidate key?
All attributes that uniquely identifies a specific record in an entity are Candidate Keys e.g. student ID
What are foreign keys?
An entity may contain the primary key of another entity, which is then called a foreign key. Foreign keys act as links or navigation routes between related entities
What are cardinalities?
Between each entity, the relationship must be modelled.
The term ‘cardinality’ is applied when talking about the degree of a relationship between the entities.
A relation is normally subject to a set of business rules, which must be respected to keep data
complete and correct – these business rules are called cardinality
Business logic/rules drives the model, the model is simply one way of expressing business logic/rules
Maximum and minimum cardinality are used.
Firstly, the maximum cardinality between the entities must be determined.
Then add minimum cardinality
What are intersection entities?
An intersection entity is applied in the data model between the two entities involved in a many-to-many relationship.
In the intersection entity, the attributes only represent data that is referring to one occurrence of both entities. This is the case with the attribute ‘Quantity’. If the attributes are placed on the individual entity, they only concern occurrence of this entity.
Intersection identity should have unique identification
Composite key made for intersection – consists of the primary key of each of the entities involved
What are 6 practical guidelines for data modelling?
- Identify entities about which the system needs to store data (look for nouns).
- For each entity, the attributes must be listed.
- The data should be placed into logical groups.
- Identify a unique primary key for each entity.
- Eliminate redundant data, make sure that data is only stored in one place.
- Investigate the relationships between the entities.
What is the relation between process and data modelling?
Process modelling visualizes activities and their specific combination to be carried out to gain a specific goal or outcome. Whereas data modelling visualizes the structure and organization of the data needed in the business.
The process model can be used as inspiration for making the data model
When looking at the process modelled, the data needed for executing the process should be organized in the data model.
This is data needed to execute the process as well as data that arises during the execution of the process.
As a very general rule of thumb, entities to be modelled in the ERD may correspond to actors, chunks of data used or generated by (sub-) processes, or collections of these.
What is normalisation?
Data models can (and should) be “normalized” to a certain extent
Normalizing means to rid the data model of redundancies, false dependencies and logical errors
Up to 5 “normal forms” – in practice the normalization process often goes until 3rd normal form
E.g. Attribute Address is split into multiple columns (Street, House No, City, Postal code) or Name is spilt info First name and Last name
What is redundant data?
The data is never used by the system
The same data items (attributes) are stored in more than one place in the system (e.g. customer name or customer address)
Data in one place can be derived from data held in another place in the system (e.g. the total order price can be derived from the individual item prices and ordered quantities)