Introduction (HC 1)
DBMS = DataBase management system (Zit om de db heen,
File system = Data in storage organiseren
- Nadelen: Moeilijk te programmeren, Uncontrolled redundancy (data op meerdere
plekken opgeslagen), Slow to manage
Databases = Collectie van een grote hoeveelheid gerelateerde data
- Logical interfaces
- Controlled redundancy (Data gebruikt door verschillende apps maar 1 keer
opgeslagen, Wel redundancy om proces te versnellen)
- Consistent, data recovery en effective to retrieve data
- Nadelen (De data kan duur en complex zijn)
- Declaritive querying = Data verkrijgen, staat los van de opslag
- Isolation = database one side and application other side and they interact through
sql furies
- End users
- Naive users (geen technologische kennis maar moeten database accessen)
- Sophisticated end users (are familiar with the facilities of the DBMS)
- Casual End Users (Zijn er bekend mee, gebruiken het soms)
- Support multi-user transactions
,ER model (HC 2, 3 en 4 deel 1)
Universe of discourse = Modelling a mini world
Data semantics = Wat beschrijft de data value (een naam bijv), welke data hoort bij elkaar
en welke data wordt vaak bezocht
data model =an abstract model that describes how data is represented, accessed, and
reasoned about
- Structure, Integrity (rules / constraints), Manipulation (Operators to update and query
the data)
Formal data models
- Conceptual (Easy to understand), Logical (Tables and connections between them,
how is it structured), Physical (Low level, how to retrieve data fast, what does it look
like, how is it implemented)
Schemas = Concrete instances of data models
- Conceptual (Data semantics of a certain domain
- Logical (hoe wordt het laten zien (kolommen en rijen bijv)
- Physical (physical means
ER model = Entity of relationship model
- Top down approach (Beginnen met entities en attributes, dan relationships, dan
Constraints
- Nadeel = Modellen van twee verschillende ontwerpers kunnen erg verschillen
Entity = real-world object or concept, naam start met een hoofdletter
Entity type = Student f.e., waarbij persoon de entity type is
Entity sets = All stored entities of a given entity set (hoeveelheid studenten)
Attribute = Property van de entity (naam, age), naam start met een kleine letter, can be:
- Simple or composite, Single value or multi value, Stored or derived
Simple attributes = Consists of single component (salary, name)
Composite attributes = Different components, each with an independent existence (House
has street, village, house number)
Single valued attribute = Single value for each occurrence of entity type, Name of student
Multi valued attributes = Multiple values for each occurrence of an entity type, Boek heeft
meerdere schrijvers
Stored attributes = Directly stored in database
Derived attributes = Usually not stored in DB but derived from another, stored
attribute
Keys = Find a combination of attributes in a table that uniquely distinguishes one entity from
another, vaak een id
Single key attributes = Student(registration_number, name)
Composite key (multiple key attributes) = Flight(flight_no(airline_code, number), date,
origin, destination)
Domain = Tussen welke waardes een Attribute moet liggen
,Relations = Hoe attributes interacteren met elkaar,
Degree = Number of attributes its related to
Cardinality = How often a specific entity may appear within a relationship
- (0,*) als er niks staat
Weak entities = Entity that cannot exist on its own, Drivers licence (cannot exist without a
person)
- Heeft een eigen key en een partial key
- Partial key = A key of the entity it belongs to
EER = Extended ER modelling, Entities opsplitsen in subclasses
Subclass = Inherits all attributes and constraints from his superclass entity type (opening
naar de superclass)
Specialization = The process of defining a set of subclasses for a superclass
- top-down (Start met superclasses en vind subclasses)
Generalization = omgekeerde, generalization suppresses differences among specialized
subclasses
- Bottom up (Vind een goede superclass)
exclusiveness (indicated by a labeled circle)
- Disjoint = Entity behoort tot 1 van de twee, of of
- Overlapping = Entity kan tot meerdere behoren maar hoeft niet
completeness
- total: Als je lid bent van superclass moet je bij een subclass horen (dubbele lijn)
predicate-defined = Constraints for the entities membership, condition is added to the
specialization line
, attribute-defined = attribute is added to line connecting circle and superclass, condition
added to lines connecting circle and subclasses
Inheritance = Delete iets van een superclass worden ook dingen in de subclasses
verwijderd
Specialization hierarchy = if every subclass has just one superclass
lattice = More than one superclass
- Subclasses inherited all things from class above
Polymorphism = Dingen die je niet echt nodig hebt, geen oplossing nodig
Multiple inheritance
- a subclass may have multiple superclasses
- Avoid this
- key issues (opeens meerdere keys), Oplossing = union types
Union
- Class heeft 2 superclasses
- Of Of
- Als elke pet een name of een relationship heeft gebruik je de inheritance (vb met pet,
dog, cat)
- Als elke hond een id heeft en elke kat een naam (als elke sub class een andere key
heeft) gebruik een union
Relational schema
- Has domains, Relations can be written as tables
- DDL Data definition language = define the data
- DML data manipulation language = to retrieve and update data Constraints
Primary key constraint
- unieke identificatie van elke rij (of tupel) in een tabel of relation
- De sleutel is een aangewezen subset van attributen (één of meer kolommen)
waarvoor de waarden uniek moeten zijn voor elke rij.
Foreign key = link tuples in different relations
DBMS = DataBase management system (Zit om de db heen,
File system = Data in storage organiseren
- Nadelen: Moeilijk te programmeren, Uncontrolled redundancy (data op meerdere
plekken opgeslagen), Slow to manage
Databases = Collectie van een grote hoeveelheid gerelateerde data
- Logical interfaces
- Controlled redundancy (Data gebruikt door verschillende apps maar 1 keer
opgeslagen, Wel redundancy om proces te versnellen)
- Consistent, data recovery en effective to retrieve data
- Nadelen (De data kan duur en complex zijn)
- Declaritive querying = Data verkrijgen, staat los van de opslag
- Isolation = database one side and application other side and they interact through
sql furies
- End users
- Naive users (geen technologische kennis maar moeten database accessen)
- Sophisticated end users (are familiar with the facilities of the DBMS)
- Casual End Users (Zijn er bekend mee, gebruiken het soms)
- Support multi-user transactions
,ER model (HC 2, 3 en 4 deel 1)
Universe of discourse = Modelling a mini world
Data semantics = Wat beschrijft de data value (een naam bijv), welke data hoort bij elkaar
en welke data wordt vaak bezocht
data model =an abstract model that describes how data is represented, accessed, and
reasoned about
- Structure, Integrity (rules / constraints), Manipulation (Operators to update and query
the data)
Formal data models
- Conceptual (Easy to understand), Logical (Tables and connections between them,
how is it structured), Physical (Low level, how to retrieve data fast, what does it look
like, how is it implemented)
Schemas = Concrete instances of data models
- Conceptual (Data semantics of a certain domain
- Logical (hoe wordt het laten zien (kolommen en rijen bijv)
- Physical (physical means
ER model = Entity of relationship model
- Top down approach (Beginnen met entities en attributes, dan relationships, dan
Constraints
- Nadeel = Modellen van twee verschillende ontwerpers kunnen erg verschillen
Entity = real-world object or concept, naam start met een hoofdletter
Entity type = Student f.e., waarbij persoon de entity type is
Entity sets = All stored entities of a given entity set (hoeveelheid studenten)
Attribute = Property van de entity (naam, age), naam start met een kleine letter, can be:
- Simple or composite, Single value or multi value, Stored or derived
Simple attributes = Consists of single component (salary, name)
Composite attributes = Different components, each with an independent existence (House
has street, village, house number)
Single valued attribute = Single value for each occurrence of entity type, Name of student
Multi valued attributes = Multiple values for each occurrence of an entity type, Boek heeft
meerdere schrijvers
Stored attributes = Directly stored in database
Derived attributes = Usually not stored in DB but derived from another, stored
attribute
Keys = Find a combination of attributes in a table that uniquely distinguishes one entity from
another, vaak een id
Single key attributes = Student(registration_number, name)
Composite key (multiple key attributes) = Flight(flight_no(airline_code, number), date,
origin, destination)
Domain = Tussen welke waardes een Attribute moet liggen
,Relations = Hoe attributes interacteren met elkaar,
Degree = Number of attributes its related to
Cardinality = How often a specific entity may appear within a relationship
- (0,*) als er niks staat
Weak entities = Entity that cannot exist on its own, Drivers licence (cannot exist without a
person)
- Heeft een eigen key en een partial key
- Partial key = A key of the entity it belongs to
EER = Extended ER modelling, Entities opsplitsen in subclasses
Subclass = Inherits all attributes and constraints from his superclass entity type (opening
naar de superclass)
Specialization = The process of defining a set of subclasses for a superclass
- top-down (Start met superclasses en vind subclasses)
Generalization = omgekeerde, generalization suppresses differences among specialized
subclasses
- Bottom up (Vind een goede superclass)
exclusiveness (indicated by a labeled circle)
- Disjoint = Entity behoort tot 1 van de twee, of of
- Overlapping = Entity kan tot meerdere behoren maar hoeft niet
completeness
- total: Als je lid bent van superclass moet je bij een subclass horen (dubbele lijn)
predicate-defined = Constraints for the entities membership, condition is added to the
specialization line
, attribute-defined = attribute is added to line connecting circle and superclass, condition
added to lines connecting circle and subclasses
Inheritance = Delete iets van een superclass worden ook dingen in de subclasses
verwijderd
Specialization hierarchy = if every subclass has just one superclass
lattice = More than one superclass
- Subclasses inherited all things from class above
Polymorphism = Dingen die je niet echt nodig hebt, geen oplossing nodig
Multiple inheritance
- a subclass may have multiple superclasses
- Avoid this
- key issues (opeens meerdere keys), Oplossing = union types
Union
- Class heeft 2 superclasses
- Of Of
- Als elke pet een name of een relationship heeft gebruik je de inheritance (vb met pet,
dog, cat)
- Als elke hond een id heeft en elke kat een naam (als elke sub class een andere key
heeft) gebruik een union
Relational schema
- Has domains, Relations can be written as tables
- DDL Data definition language = define the data
- DML data manipulation language = to retrieve and update data Constraints
Primary key constraint
- unieke identificatie van elke rij (of tupel) in een tabel of relation
- De sleutel is een aangewezen subset van attributen (één of meer kolommen)
waarvoor de waarden uniek moeten zijn voor elke rij.
Foreign key = link tuples in different relations