Samenvatting colleges databases 2. Behandelde onderwerpen zijn: algemene SQL syntaxis, MySQL algemeen, indices, joins, transacties, functies, procedures, views, triggers, ACID, isolation levels, concurrency, MVCC.
Afbeeldingen gebruikt in het document zijn niet van mij.
,Inhoud
College 1.................................................................................................................................................4
Surrogate key (surrogaatsleutel)........................................................................................................4
Waarom surrogaatsleutel gebruiken..................................................................................................4
Auto increment...................................................................................................................................4
College 2.................................................................................................................................................5
Algemeen SQL....................................................................................................................................5
SQL onderdelen..................................................................................................................................5
MySQL datatypen...............................................................................................................................5
CHAR...................................................................................................................................................6
INTEGER..............................................................................................................................................6
BOOLEAN en ENUM............................................................................................................................6
Kiezen van datatypen.........................................................................................................................6
Data integriteit...................................................................................................................................6
Primaire sleutel en unieke sleutels.....................................................................................................6
SQL DDL (Data Defniion Language)...................................................................................................7
Access control.....................................................................................................................................7
Rechten niveaus binnen een database...............................................................................................7
Rechten binnen een tabel...................................................................................................................7
College 3.................................................................................................................................................8
Volgorde SELECT statement:..............................................................................................................8
Funcies..............................................................................................................................................8
WHERE clause.....................................................................................................................................8
HAVING...............................................................................................................................................9
Geaggregeerde funcies:....................................................................................................................9
GROUP BY...........................................................................................................................................9
Storage engines..................................................................................................................................9
Joins....................................................................................................................................................9
Soorten joins.....................................................................................................................................10
Syntax joins.......................................................................................................................................10
Syntax ON.....................................................................................................................................10
Syntax USING................................................................................................................................10
Syntax NATURAL JOIN...................................................................................................................10
Syntax WHERE..............................................................................................................................10
Subquerys.........................................................................................................................................10
1
, User variables...................................................................................................................................11
College 4...............................................................................................................................................12
Indices..............................................................................................................................................12
Gebruik indices in MySQL.................................................................................................................12
Views................................................................................................................................................12
Waarom views..................................................................................................................................12
Updatable views...............................................................................................................................12
Beperkingen van views.....................................................................................................................13
Stored procedures en funcies..........................................................................................................13
Waarom stored procedures of funcies............................................................................................13
Procedureel SQL...............................................................................................................................14
Variabelen in funciessprocedures...................................................................................................14
Syntax procedures en funcies..........................................................................................................14
Syntax procedure..........................................................................................................................14
Syntax funcie...............................................................................................................................14
Voorbeeld funcie.........................................................................................................................15
DELIMITER........................................................................................................................................15
RETURN............................................................................................................................................15
Comments........................................................................................................................................15
View vs funcion...............................................................................................................................15
Triggers.............................................................................................................................................15
Waarom triggers...............................................................................................................................16
Beperkingen.....................................................................................................................................16
Syntax trigger....................................................................................................................................16
Syntax trigger:...............................................................................................................................16
College 5...............................................................................................................................................17
Database transacions......................................................................................................................17
Waarom transacies.........................................................................................................................17
ACID (Atomacity Concistency Isolaion Durability)...........................................................................17
Concurrency problems:....................................................................................................................18
Klassieke concurrency problemen....................................................................................................18
Isolaion levels..................................................................................................................................19
Concurrency control strategies.........................................................................................................20
Locking..............................................................................................................................................20
Locks gebruiken............................................................................................................................21
Niveau van vergrendeling (granularity of locking)............................................................................21
2
Voordelen van het kopen van samenvattingen bij Stuvia op een rij:
Verzekerd van kwaliteit door reviews
Stuvia-klanten hebben meer dan 700.000 samenvattingen beoordeeld. Zo weet je zeker dat je de beste documenten koopt!
Snel en makkelijk kopen
Je betaalt supersnel en eenmalig met iDeal, creditcard of Stuvia-tegoed voor de samenvatting. Zonder lidmaatschap.
Focus op de essentie
Samenvattingen worden geschreven voor en door anderen. Daarom zijn de samenvattingen altijd betrouwbaar en actueel. Zo kom je snel tot de kern!
Veelgestelde vragen
Wat krijg ik als ik dit document koop?
Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.
Tevredenheidsgarantie: hoe werkt dat?
Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.
Van wie koop ik deze samenvatting?
Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper PascalDutch. Stuvia faciliteert de betaling aan de verkoper.
Zit ik meteen vast aan een abonnement?
Nee, je koopt alleen deze samenvatting voor €0,00. Je zit daarna nergens aan vast.