mod fa4 and fa3 included
This commit is contained in:
parent
d682b51dc6
commit
e1897a947b
1
homework MOD/FA3/concept.drawio
Normal file
1
homework MOD/FA3/concept.drawio
Normal file
@ -0,0 +1 @@
|
||||
<mxfile host="Electron" modified="2020-10-07T16:18:44.000Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/13.6.2 Chrome/83.0.4103.122 Electron/9.2.0 Safari/537.36" etag="_Dqfaj7SCyiRQ3GX1b8E" version="13.6.2" type="device"><diagram name="Page-1" id="2ca16b54-16f6-2749-3443-fa8db7711227">7V1bc9o4GP01eclMO/gKPDaXJt02s91Np033ZUdgBVyMxcgiCf31K2PLYEsJxmtJYNTJdCz5rnOOLB19EmfO5fzlBoPF9A4FMDqze8HLmXN1Ztu+69D/04xVluEMhlnGBIdBlmVtMu7D3zDP7OW5yzCASelAglBEwkU5c4ziGI5JKQ9gjJ7Lhz2iqHzXBZhALuN+DCI+90cYkGmea/V6mx23MJxM81sPvHzHCIxnE4yWcX6/M9t5XP/Lds8Bu1Z+fDIFAXreynKuz5xLjBDJtuYvlzBKi5YVW3bex1f2Fs+NYUzqnPDXF/cDIrfOp4evnx+/3XwK3X+v3vWzqzyBaAnZa6wflqxYAcE4+JCWM01d/41imnsxJfOIJi26CV9C8kC3e++9PPUz3fO+x5JXKVF6LLHaSnyFOJxDAjHLi4OPYRTlqYQATDY3/g0x+obuQLxi+/Jj04fInhkGHNKbssmzErTEY/hGgXg5BQGeQHYquMUr66tzNfn+x58PF/98urn23vWtAkKqDIjoi+AVPfF5wyFGlOkWe1gehhEg4VP5eUFO5UlxueIOX1FI38TuMdX5+XVy0blur3yJ7D3zs7ZJUblQ3ypfyBlWLpQVBHchurH12pusNef24B+7fW0ClniwzcOYPshDwSSa+LlhZZrc8HCd2ibiwxaXf5a4LCZvMoNkPM0T6xoABnnq13K+uM8fPc7EsqG1xdOaHiJkda8xq4Vs9VjNupPWvk5au8MKG72GtPbcyoV6imlttURrni4CopQZ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ZNndLqXbos8jDRzj8+gSJhtj1Ic9b/SMkri7cmzR4ZEFibeHw3OsoR22UyO0wxGVOhtnbr/Y94ioMbVgDfruJzER2LY0rHmv5gNFdAaPsMv+SLXMlluqG3fo1ResPoxqrNhh9NiqHldlSPVBz1s35yDTZ8eN7oL0hyzMPZY6McJsU5iuwOhWCz1v4TBddnlc2Gu2OopaaGosY2pUKUOVonFhtdDz/g0E3e3DF0w/DDUKp4s4RnvtzJDK5Pj60O9AnfaEQPMt1TCeIbRY4PDX0Q43NZkg5RyYAi2jQCUKtKyazp00pHkvh77mSWrw0Nqk/glMUrRZrMGqUsI7F8W0pBW7iXxppSvgN3NJhfOAHVlYi8yYyiTF7whhDEBwUvMR/RbXUZAGnomIUS3UVRnSndBLq6N5u+Y8QmNAQthdSba4Sq00XEwsjCZJsnaUvtqYD4UJ4xGCs25HqPktLpUpDRq+j2dUqUSVvsBgU1sh82EAZNrdBfkKph/GN/KNXzoy4vv/3pr/tviGNa0EeUjzvcunojN5nAps5Kvt/mkvtZWitYfDc6zGWvWH8IRGsysy1pgD136xm8iXVpohVjNvRgi2rChsS+TNVIy1z+ka+rRyOiVfzWoWC6MWOxMLo1qnb6zzJYRe1iRDi/dvzkcoXiYdDxy1mgXFqMWGN1iMLJXIUjTNTCn0bHrPKS3xVdD9gCVZNMuNJBVLkk281Ac976mewBJfe/RD9SFjZj5pEqUvGINS2nOxeWPnRJb4spvNfFKLjvF/NAmT/U6RvjqZt4O6vcSX3aLPIw0U4/No0uNQMCysFnre5+n2Cl/2ERg8tjF4dPmulmBqsFLsHd7hOY0VvuwjsHn6J7CkkNcrT8TwREsKWYJSd2UNF/eNudbOD1c2W1FIhLW8X1jn3TRuuPh28xPPyUmNGfebmW5qATSmm2qxrsqQ6oNesNxQAjFFuOOeW7+Z59YSODSJESJb+25oIU3vUADTI/4D</diagram></mxfile>
|
BIN
homework MOD/FA3/concept.png
Normal file
BIN
homework MOD/FA3/concept.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 361 KiB |
1
homework MOD/FA3/logisch.drawio
Normal file
1
homework MOD/FA3/logisch.drawio
Normal file
@ -0,0 +1 @@
|
||||
<mxfile host="Electron" modified="2020-10-07T16:54:27.068Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/13.6.2 Chrome/83.0.4103.122 Electron/9.2.0 Safari/537.36" etag="TuTYWAag7M8v7AJWK40V" version="13.6.2" type="device"><diagram name="Page-1" id="2ca16b54-16f6-2749-3443-fa8db7711227">7V1bc9o4GP01eUwHX4HHlqRJt+1utsm06b50BFbAwVge2ZCQX78ySAZbijEeWzZGncwUyTesc85n6eizuDBGi9cbDILZd+RA70LvOa8XxtWFrmuG1SP/xTXrbc1As7cVU+w6dKddxb37BmklPW66dB0YpnaMEPIiN0hXTpDvw0mUqgMYo5f0bk/IS181AFPIVdxPgMfX/nKdaEZrtV5vt+EWutMZvfSA3fAYTOZTjJY+vd6Fbjxt/m03LwA7F90/nAEHvexVGdcXxggjFG0/LV5H0IvbljXb9rjP72xNvjeGflTkgH+/mR9RdGt8ebz7+vRw88U1/1xd9rdnWQFvCdltbL5stGYNBH3nY9zOpHT9A/mk9tMsWnikqJGP8NWNHsnn3geLln7HWz70WPEqZkqPFdZ7hTuI3QWMIGZ1vvPZ9TxaCiOAo92F3yBGD+g78NdsG903/hJ8U9DWCdEST2DO/VuUcQBPITsU3OK1dmdcTX/+9c/jp/++3Fxbl316Quik2ERb+gYiciN4TXZ42XGIEWW2xx5Wh6EHIneV5iCgVJ4mp0uucIdccmt6j8rOtul5qOhMs5c+xfbG6VH7pMicqK+lT2QMMyfatgx3IvJh77Z3VRvOHcE/dvnCBEzxYJ+HPvkijwmTSOH3jpVxccfDTWmfiI97XP6d4rKYvOEcRpMZLWwiAHRo6Xm5CO7pV/e3YtnRWuNpTXYRsrpXlNVCtloskB6ktd0qWpvDDButkrS2zMyJepJprVVEa54uAqKkGVYtbVajYPD2/OfyHsLr4PXhebKYzy7bFQwT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BIN
homework MOD/FA3/logisch.png
Normal file
BIN
homework MOD/FA3/logisch.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 385 KiB |
59
homework MOD/FA4/FA4.sql
Normal file
59
homework MOD/FA4/FA4.sql
Normal file
@ -0,0 +1,59 @@
|
||||
DROP TABLE aankoop,transactie,bonuskaart,filiaal,product;
|
||||
|
||||
CREATE TABLE bonuskaart(
|
||||
bonuskaartnummer INTEGER,
|
||||
naam VARCHAR(255),
|
||||
adres VARCHAR(255),
|
||||
woonplaats VARCHAR(255),
|
||||
PRIMARY KEY (bonuskaartnummer)
|
||||
);
|
||||
|
||||
CREATE TABLE filiaal(
|
||||
filiaalnummer INTEGER,
|
||||
plaats VARCHAR(255) NOT NULL,
|
||||
adres VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (filiaalnummer)
|
||||
);
|
||||
|
||||
CREATE TABLE product(
|
||||
productnummer INTEGER,
|
||||
omschrijving VARCHAR(255) NOT NULL,
|
||||
PRIJS DECIMAL(6,2) NOT NULL,
|
||||
PRIMARY KEY (productnummer)
|
||||
);
|
||||
|
||||
CREATE TABLE transactie(
|
||||
transactienummer INTEGER,
|
||||
datum DATE NOT NULL,
|
||||
tijd TIME NOT NULL,
|
||||
bonuskaartnummer INTEGER NOT NULL,
|
||||
filiaalnummer INTEGER NOT NULL,
|
||||
PRIMARY KEY (transactienummer),
|
||||
FOREIGN KEY (bonuskaartnummer) REFERENCES bonuskaart(bonuskaartnummer),
|
||||
FOREIGN KEY (filiaalnummer) REFERENCES filiaal(filiaalnummer)
|
||||
);
|
||||
|
||||
CREATE TABLE aankoop(
|
||||
transactienummer INTEGER,
|
||||
product INTEGER NOT NULL,
|
||||
aantal INTEGER NOT NULL,
|
||||
FOREIGN KEY (transactienummer) REFERENCES transactie(transactienummer),
|
||||
FOREIGN KEY (product) REFERENCES product(productnummer)
|
||||
);
|
||||
|
||||
INSERT INTO bonuskaart VALUES ('65472335');
|
||||
|
||||
INSERT INTO filiaal VALUES ('35','Utrecht','Stationsplein');
|
||||
INSERT INTO filiaal VALUES ('48','Utrecht','Roelantdreef 41');
|
||||
|
||||
INSERT INTO product VALUES ('33','AH halfvolle melk per pak','0.99');
|
||||
INSERT INTO product VALUES ('66','AH pindakaas per pot','2.39');
|
||||
INSERT INTO product VALUES ('99','AH tandelborstel, ja met een L','1.35');
|
||||
|
||||
INSERT INTO transactie VALUES ('256','2019-12-01','17:35','65472335','35');
|
||||
INSERT INTO transactie VALUES ('512','2019-12-03','12:25','65472335','48');
|
||||
|
||||
INSERT INTO aankoop VALUES ('256','33','2');
|
||||
INSERT INTO aankoop VALUES ('256','66','1');
|
||||
INSERT INTO aankoop VALUES ('256','99','1');
|
||||
INSERT INTO aankoop VALUES ('512','33','1');
|
5
homework MOD/FA4/select 1.sql
Normal file
5
homework MOD/FA4/select 1.sql
Normal file
@ -0,0 +1,5 @@
|
||||
--Toon de verschillende filialen (filiaalnummer, adres en plaats) waar een klant met het gegeven bonuskaartnummer boodschappen heeft gedaan.
|
||||
|
||||
SELECT DISTINCT filiaal.*
|
||||
FROM filiaal,transactie
|
||||
WHERE transactie.bonuskaartnummer='65472335'
|
9
homework MOD/FA4/select 2.sql
Normal file
9
homework MOD/FA4/select 2.sql
Normal file
@ -0,0 +1,9 @@
|
||||
--Toon het totaalbedrag dat een klant met de gegeven bonuskaartnummer heeft besteed aan boodschappen.
|
||||
|
||||
SELECT sum(aankoop.aantal * product.prijs)
|
||||
FROM transactie,product,aankoop
|
||||
WHERE
|
||||
product.productnummer = aankoop.product AND
|
||||
transactie.transactienummer = aankoop.transactienummer AND
|
||||
transactie.bonuskaartnummer = '65472335'
|
||||
|
9
homework MOD/FA4/select 3.sql
Normal file
9
homework MOD/FA4/select 3.sql
Normal file
@ -0,0 +1,9 @@
|
||||
--Toon het aantal maal dat de 'AH halfvolle melk' is verkocht in de maand december 2019 bij een filiaal in Utrecht.
|
||||
SELECT sum(aantal)
|
||||
FROM aankoop,transactie
|
||||
WHERE
|
||||
transactie.transactienummer = aankoop.transactienummer AND
|
||||
aankoop.product = '33' AND
|
||||
transactie.filiaalnummer = '35' AND
|
||||
transactie.datum >= '2019-12-1' AND
|
||||
transactie.datum <= '2019-12-31'
|
@ -43,10 +43,14 @@ def omroepen_reis(stations, beginstation, eindstation):
|
||||
verschil = abs(pos_eind - pos_begin)
|
||||
prijs = verschil * 5
|
||||
|
||||
|
||||
|
||||
print("afstand is " + str(verschil))
|
||||
print("prijs is " + str(prijs))
|
||||
|
||||
|
||||
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user