COMP3311 23T3 |
Assignment 2 Examples |
Database Systems |
[Specification] [Database] [SQL Schema] [Grades+Rules] [Examples] [Testing] [Submitting] [Fixes+Updates]
This document contains examples of output from the various scripts that you are required to develop.
$ python3 q1.py Term #Locl #Intl Proportion 19T1 160 370 0.4 19T2 150 360 0.4 19T3 163 722 0.2 20T0 17 77 0.2 20T1 334 620 0.5 20T2 351 903 0.4 20T3 365 1038 0.4 21T0 57 175 0.3 21T1 620 1112 0.6 21T2 601 1017 0.6 21T3 619 1210 0.5 22T0 46 185 0.2 22T1 823 1339 0.6 22T2 773 1230 0.6 22T3 796 1414 0.6 23T0 65 210 0.3 23T1 1028 1472 0.7 23T2 952 1431 0.7 23T3 968 1980 0.5
$ python3 q2.py COMP1521 COMP1521 Computer Systems Fundamentals Term Satis #resp #stu Convenor 19T2 96 5 10 Mohamed Eaton 19T3 96 3 6 Vidan Nilsson 20T2 90 16 32 Vidan Nilsson 20T3 95 12 25 Vidan Nilsson 21T2 89 18 37 Lauren Zou 21T3 93 17 34 Vidan Nilsson 22T1 97 6 13 Vidan Nilsson 22T2 94 13 26 Lauren Zou 22T3 92 21 42 Vidan Nilsson 23T1 88 16 33 Vidan Nilsson 23T2 95 21 43 Dave Bhusal 23T3 97 31 62 Vidan Nilsson $ python3 q2.py ACCT1511 ACCT1511 Accounting and Financial Management 1B Term Satis #resp #stu Convenor 19T2 ? ? 2 Laura Koczanowski 20T0 ? ? 0 Sonakshi Johnstone 20T1 91 1 3 Laura Koczanowski 20T2 82 3 7 Sonakshi Johnstone 20T3 90 2 4 Othman Weakley 21T1 ? ? 1 Othman Weakley 21T2 82 2 4 Geoffrey McCowan $ python3 q2.py COMP2521 COMP2521 Data Structures and Algorithms Term Satis #resp #stu Convenor 19T2 94 4 8 Dave Foskett 19T3 ? ? 2 Dave Foskett 20T1 96 4 8 Dave Foskett 20T2 88 7 15 Dave Bhusal 20T3 97 6 13 Dave Foskett 21T1 92 3 7 Dave Foskett 21T2 97 11 23 Yasmin Lannigan 21T3 91 13 27 Dave Foskett 22T1 84 10 20 Dave Foskett 22T2 83 14 28 Edward Mai 22T3 87 10 20 Dave Foskett 23T0 88 4 8 Dave Foskett 23T1 87 16 32 Latoya Basa 23T2 91 19 39 Flora Ackerman 23T3 93 22 44 Dave Bhusal $ python3 q2.py COMP1010 COMP1010 The Art of Computing Term Satis #resp #stu Convenor 20T3 ? ? 0 Matthew Govendir 21T1 ? ? 0 Matthew Govendir 21T2 ? ? 2 Flora Ackerman 21T3 ? ? 1 Flora Ackerman 22T1 ? ? 2 Flora Ackerman 22T2 94 1 3 Flora Ackerman 22T3 ? ? 2 Flora Ackerman 23T0 ? ? 1 Flora Ackerman 23T1 ? ? 2 Flora Ackerman
$ python3 q3.py 3707 3707 Engineering (Honours) Academic Requirements: Total UOC at least 192 UOC 1 stream from BE(Hons) Streams - AEROAH None - BINFAH Bioinformatics Engineering - CEICAH Chemical Engineering - CEICDH Chemical Product Engineering - COMPBH Computer Engineering - CVENAH Civil Engineering - CVENBH None - ELECAH Electrical Engineering - ELECCH None - GMATDH None - MANFBH None - MINEAH Mining Engineering - MTRNAH Mechatronic Engineering - PETRAH None - SENGAH Software Engineering - SOLAAH Photovoltaics and Solar Energy - SOLABH None - TELEAH Telecommunications all courses from Industrial Training - ENGG4999 Industrial Training 12 UOC of General Education $ python3 q3.py SENGAH SENGAH Software Engineering Academic Requirements: Total UOC at least 168 UOC all courses from Foundational Computing - COMP1511 Programming Fundamentals - COMP1521 Computer Systems Fundamentals - COMP1531 Software Engineering Fundamentals - COMP2511 Object-Oriented Design and Programming - COMP2521 Data Structures and Algorithms all courses from SENGAH Maths - MATH1081 Discrete Mathematics - MATH1131 Mathematics 1A or MATH1141 Higher Mathematics 1A - MATH1231 Mathematics 1B or MATH1241 Higher Mathematics 1B - MATH2400 Finite Mathematics - MATH2859 Probability, Statistics and Information all courses from SENGAH Workshops/Design - DESN1000 Introduction to Engineering Design and Innovation or ENGG1000 Introduction to Engineering Design and Innovation - DESN2000 Engineering Design and Professional Practice - SENG2011 Workshop on Reasoning about Programs - SENG2021 Requirements and Design Workshop - SENG3011 Software Engineering Workshop 3 all courses from SENGAH Advanced Core - COMP2041 Software Construction: Techniques and Tools - COMP3141 Software System Design and Implementation - COMP3311 Database Systems - COMP3331 Computer Networks and Applications - SENG4920 Ethics and Management - COMP4951 Research Thesis A - COMP4952 Research Thesis B - COMP4953 Research Thesis C at least 36 UOC courses from SENGAH Discipline Electives - ENGG2600,ENGG3060,ENGG3600,ENGG4600,COMP3###,COMP4###,COMP6###,COMP9###,INFS3###,INFS4###,MATH3###,MATH4###,MATH6###,ELEC3###,ELEC4###,TELE3###,TELE4### 6 UOC of SENGAH Free Electives $ python3 q3.py 3778 3778 Computer Science Academic Requirements: Total UOC at least 144 UOC 1 stream from Comp Sci Majors - COMPA1 Computer Science - COMPD1 Computer Science (Database Systems) - COMPE1 e-Commerce - COMPI1 Computer Science (Artificial Intelligence) - COMPJ1 Computer Science (Programming Languages) - COMPN1 Computer Science (Computer Networks) - COMPS1 Computer Science (Embedded Systems) - COMPY1 Computer Science (Security Engineering) all courses from Foundational Computing - COMP1511 Programming Fundamentals - COMP1521 Computer Systems Fundamentals - COMP1531 Software Engineering Fundamentals - COMP2511 Object-Oriented Design and Programming - COMP2521 Data Structures and Algorithms all courses from Comp Sci Maths - MATH1081 Discrete Mathematics - MATH1131 Mathematics 1A or MATH1141 Higher Mathematics 1A - MATH1231 Mathematics 1B or MATH1241 Higher Mathematics 1B all courses from Comp Sci Advanced Core - COMP3121 Algorithms and Programming Techniques or COMP3821 Extended Algorithms and Programming Techniques - COMP3900 Computer Science Project - COMP4920 Management and Ethics 12 UOC of General Education $ python3 q3.py COMPD1 COMPD1 Computer Science (Database Systems) Academic Requirements: Total UOC at least 66 UOC all courses from COMPD1 Core - COMP3311 Database Systems 18 UOC courses from COMPD1 Electives - COMP6714,COMP9312,COMP9313,COMP9315,COMP9318,COMP9319 at least 6 UOC courses from COMPD1 Computing Electives - ENGG2600,ENG3600,ENGG4600,COMP3###,COMP4###,COMP6###,COMP9### at least 36 UOC of COMPD1 Free Electives (yes, yes, COMP2041 is missing from the Computing Electives) (whether you see 96 UOC or 66 UOC for the total depends on whether you applied the update mentioned below) $ python3 q3.py 8543 8543 Information Technology Academic Requirements: Total UOC at least 96 UOC 1 stream from MIT Streams - COMPAS Artificial Intelligence - COMPBS Bioinformatics - COMPCS Information Technology - COMPDS Database Systems - COMPES e-Commerce Systems - COMPIS Internetworking - COMPSS Data Science and Engineering all courses from Project Management - GSOE9820 Engineering Project Management all courses from PG Core Courses - COMP9021 Principles of Programming - COMP9024 Data Structures and Algorithms - COMP9311 Database Systems - COMP9331 Computer Networks and Applications all courses from MIT Project Courses - COMP9900 Information Technology Project or COMP9991 Research Project A 36 UOC courses from ADK Courses - COMP4121,COMP4161,COMP4418,COMP6714,COMP9153,COMP9242,COMP9243,COMP9315,COMP9318,COMP9319,COMP9323,COMP9334,COMP9336,COMP9417,COMP9418,COMP9434,COMP9444,COMP9517,COMP9992,COMP9993 $ python3 q3.py ACCTAH ACCTAH Accounting Academic Requirements: Total UOC at least 48 UOC (has no requirements defined except Total UOC) $ python3 q3.py AAAAAA Invalid stream code AAAAAA $ python3 q3.py 3333 Invalid program code 3333 $ python3 q3.py 12345 Invalid code
$ python3 q4.py 3892140 3892140 Burn, Farid 8338 ELECIS Engineering Science GSOE9830 20T2 Economic Decision Analysis in E 57 PS 6uoc ELEC9713 21T1 Industrial and Commercial Power 42 FL fail UOC = 6, WAM = 49.5 DEBUG: Weighted_sum:594 UOC_for_WAM:12, UOC_passed:6 $ python3 q4.py 3891785 3891785 Ahmad, Callum James 8404 FINSCS Commerce FINS5568 19T3 Capstone - Portfolio Management 68 CR 6uoc UOC = 6, WAM = 68.0 DEBUG: Weighted_sum:408 UOC_for_WAM:6, UOC_passed:6 $ python3 q4.py 3891853 3891853 Spargo, Osuki Dilara 8404 FINSCS Commerce MGMT5050 20T1 Professional Skills and Ethics 88 HD 6uoc ACCT5906 20T2 Financial Literacy for Business 59 PS 6uoc FINS5512 20T2 Financial Markets and Instituti 57 PS 6uoc ACCT5930 21T1 Financial Accounting - PW unrs UOC = 18, WAM = 68.0 DEBUG: Weighted_sum:1224 UOC_for_WAM:18, UOC_passed:18 $ python3 q4.py 2891269 2891269 Pathmanandavel, Patronella 8338 CVENRT Engineering Science CVEN9701 19T1 Engineering Economics and Finan 89 HD 6uoc CVEN9521 19T2 Slope Instability and Stabilisa 93 HD 6uoc CVEN9512 20T1 Geomechanics - SY 6uoc CVEN9630 20T2 Groundwater Hydrology and Resou 87 HD 6uoc GSOE9011 20T3 Engineering Postgraduate Course 93 HD 6uoc CVEN9531 21T2 Unsaturated Soil Mechanics 97 HD 6uoc CVEN9513 21T3 Advanced Foundation Engineering 78 DN 6uoc CVEN9522 22T3 Rock Engineering 90 HD 6uoc UOC = 48, WAM = 89.6 DEBUG: Weighted_sum:3762 UOC_for_WAM:42, UOC_passed:48 $ python3 q4.py 5893146 5893146 Aung, Timothy Russell 3778 COMPA1 Computer Science ACCT1501 20T1 Accounting and Financial Manage 93 HD 6uoc COMP1511 20T1 Programming Fundamentals - SY 6uoc MATH1141 20T1 Higher Mathematics 1A - SY 6uoc COMP1521 20T2 Computer Systems Fundamentals 55 UF fail ECON1101 20T2 Microeconomics 1 85 HD 6uoc MATH1231 20T2 Mathematics 1B 74 CR 6uoc COMP2521 20T3 Data Structures and Algorithms 86 HD 6uoc MATH1081 20T3 Discrete Mathematics 79 DN 6uoc COMP3311 21T1 Database Systems 88 HD 6uoc ECON1102 21T1 Macroeconomics 1 68 CR 6uoc MGMT1001 21T1 Managing Organisations and Peop 76 DN 6uoc COMP1521 21T2 Computer Systems Fundamentals 85 HD 6uoc PSYC1001 21T2 Psychology 1A 71 CR 6uoc COMP3331 21T3 Computer Networks and Applicati 64 PS 6uoc COMP1531 22T1 Software Engineering Fundamenta 92 HD 6uoc COMP3121 22T1 Algorithms and Programming Tech 69 CR 6uoc COMP3411 22T1 Artificial Intelligence 72 CR 6uoc ARTS1270 22T2 Global History: Exploring the F - AW unrs COMP2511 22T2 Object-Oriented Design and Prog 68 CR 6uoc COMP3421 22T3 Computer Graphics 65 CR 6uoc COMP4920 22T3 Management and Ethics 84 DN 6uoc COMP3231 23T1 Operating Systems 66 CR 6uoc COMP6080 23T1 Web Front-end Programming 76 DN 6uoc DDES1110 23T1 3D Visualisation 1 - 3D Virtual 67 CR 6uoc COMP3900 23T2 Computer Science Project 97 HD 6uoc COMP9313 23T2 Big Data Management 80 DN 6uoc UOC = 144, WAM = 76.5 DEBUG: Weighted_sum:10560, UOC_for_WAM:138, UOC_passed:144 $ python3 q4.py 5812345 Invalid student ID 5812345 $ python3 q4.py 1234567 Invalid student ID 1234567
Note that you won't be able to get the answers below using the supplied database. Some of the streams have an incorrect Total UOC value, caused by me moving some requirements into the program and forgetting to change the stream Total UOC accordingly. To "fix" the database, you'll need to apply the following updates:
update requirements set min_req = 66 where id=318; -- fixes UOC requirement for COMPA1 update requirements set min_req = 66 where id=322; -- fixes UOC requirement for COMPD1
$ python3 q5.py 5893146 5893146 Aung, Timothy Russell 3778 COMPA1 Computer Science ACCT1501 20T1 Accounting and Financial Manage 93 HD 6uoc General Education COMP1511 20T1 Programming Fundamentals - SY 6uoc Foundational Computing MATH1141 20T1 Higher Mathematics 1A - SY 6uoc Comp Sci Maths COMP1521 20T2 Computer Systems Fundamentals 55 UF fail ECON1101 20T2 Microeconomics 1 85 HD 6uoc General Education MATH1231 20T2 Mathematics 1B 74 CR 6uoc Comp Sci Maths COMP2521 20T3 Data Structures and Algorithms 86 HD 6uoc Foundational Computing MATH1081 20T3 Discrete Mathematics 79 DN 6uoc Comp Sci Maths COMP3311 21T1 Database Systems 88 HD 6uoc COMPA1 Computing Electives ECON1102 21T1 Macroeconomics 1 68 CR 6uoc COMPA1 Free Electives MGMT1001 21T1 Managing Organisations and Peop 76 DN 6uoc COMPA1 Free Electives COMP1521 21T2 Computer Systems Fundamentals 85 HD 6uoc Foundational Computing PSYC1001 21T2 Psychology 1A 71 CR 6uoc COMPA1 Free Electives COMP3331 21T3 Computer Networks and Applicati 64 PS 6uoc COMPA1 Computing Electives COMP1531 22T1 Software Engineering Fundamenta 92 HD 6uoc Foundational Computing COMP3121 22T1 Algorithms and Programming Tech 69 CR 6uoc Comp Sci Advanced Core COMP3411 22T1 Artificial Intelligence 72 CR 6uoc COMPA1 Computing Electives ARTS1270 22T2 Global History: Exploring the F - AW unrs COMP2511 22T2 Object-Oriented Design and Prog 68 CR 6uoc Foundational Computing COMP3421 22T3 Computer Graphics 65 CR 6uoc COMPA1 Computing Electives COMP4920 22T3 Management and Ethics 84 DN 6uoc Comp Sci Advanced Core COMP3231 23T1 Operating Systems 66 CR 6uoc COMPA1 Computing Electives COMP6080 23T1 Web Front-end Programming 76 DN 6uoc COMPA1 Free Electives DDES1110 23T1 3D Visualisation 1 - 3D Virtual 67 CR 6uoc COMPA1 Free Electives COMP3900 23T2 Computer Science Project 97 HD 6uoc Comp Sci Advanced Core COMP9313 23T2 Big Data Management 80 DN 6uoc COMPA1 Free Electives UOC = 144, WAM = 76.5 Eligible to graduate The later COMP courses ended up as COMPA1 Free Electives because once the COMPA1 Computing Electives has sufficient courses, we stop adding them to that requirement in the hopes of filling one of the other requirements. If we didn't do this, the COMPA1 Computing Electives would have ended up with 48 UOC and the COMPA1 Free Electives would not have enough UOC to meet the minimum 30UOC, even though the student has taken enough courses to graduate. To some extent, this is a consequence of using a depth-first (greedy) search of the space of possible course→requirement allocation. $ python3 q5.py 5893146 3778 COMPA1 5893146 Aung, Timothy Russell 3778 COMPA1 Computer Science ... same output as above ... $ python3 q5.py 5893146 3778 COMPD1 5893146 Aung, Timothy Russell 3778 COMPD1 Computer Science ACCT1501 20T1 Accounting and Financial Manage 93 HD 6uoc General Education COMP1511 20T1 Programming Fundamentals - SY 6uoc Foundational Computing MATH1141 20T1 Higher Mathematics 1A - SY 6uoc Comp Sci Maths COMP1521 20T2 Computer Systems Fundamentals 55 UF fail ECON1101 20T2 Microeconomics 1 85 HD 6uoc General Education MATH1231 20T2 Mathematics 1B 74 CR 6uoc Comp Sci Maths COMP2521 20T3 Data Structures and Algorithms 86 HD 6uoc Foundational Computing MATH1081 20T3 Discrete Mathematics 79 DN 6uoc Comp Sci Maths COMP3311 21T1 Database Systems 88 HD 6uoc COMPD1 Core ECON1102 21T1 Macroeconomics 1 68 CR 6uoc COMPD1 Free Electives MGMT1001 21T1 Managing Organisations and Peop 76 DN 6uoc COMPD1 Free Electives COMP1521 21T2 Computer Systems Fundamentals 85 HD 6uoc Foundational Computing PSYC1001 21T2 Psychology 1A 71 CR 6uoc COMPD1 Free Electives COMP3331 21T3 Computer Networks and Applicati 64 PS 6uoc COMPD1 Computing Electives COMP1531 22T1 Software Engineering Fundamenta 92 HD 6uoc Foundational Computing COMP3121 22T1 Algorithms and Programming Tech 69 CR 6uoc Comp Sci Advanced Core COMP3411 22T1 Artificial Intelligence 72 CR 6uoc COMPD1 Free Electives ARTS1270 22T2 Global History: Exploring the F - AW unrs COMP2511 22T2 Object-Oriented Design and Prog 68 CR 6uoc Foundational Computing COMP3421 22T3 Computer Graphics 65 CR 6uoc COMPD1 Free Electives COMP4920 22T3 Management and Ethics 84 DN 6uoc Comp Sci Advanced Core COMP3231 23T1 Operating Systems 66 CR 6uoc COMPD1 Free Electives COMP6080 23T1 Web Front-end Programming 76 DN 0uoc Could not be allocated DDES1110 23T1 3D Visualisation 1 - 3D Virtual 67 CR 0uoc Could not be allocated COMP3900 23T2 Computer Science Project 97 HD 6uoc Comp Sci Advanced Core COMP9313 23T2 Big Data Management 80 DN 6uoc COMPD1 Electives UOC = 132, WAM = 76.5 Need 12 more UOC for COMPD1 Electives The reason this doesn't work for graduation is that the COMPD1 requirements are more restrictive than the COMPA1 requirements. COMP6080 does not fit the COMPD1 Electives requirement, and all the other requirements are "full". COMP9313 is explicitly mentioned in the COMPD1 Electives list. $ python3 q5.py 5892943 5892943 Zhou, Bingqi 3778 COMPA1 Computer Science COMP1511 21T1 Programming Fundamentals 73 CR 6uoc Foundational Computing MATH1081 21T1 Discrete Mathematics 67 CR 6uoc Comp Sci Maths MATH1131 21T1 Mathematics 1A 69 CR 6uoc Comp Sci Maths COMP1521 21T2 Computer Systems Fundamentals 77 DN 6uoc Foundational Computing COMP2521 21T2 Data Structures and Algorithms 58 PS 6uoc Foundational Computing FINS1613 21T3 Business Finance 59 PS 6uoc General Education MATH1231 21T3 Mathematics 1B 61 PS 6uoc Comp Sci Maths COMP1531 22T1 Software Engineering Fundamenta 85 HD 6uoc Foundational Computing COMP3311 22T1 Database Systems 34 FL fail FINS2624 22T1 Portfolio Management 51 PS 6uoc General Education COMP2041 22T2 Software Construction: Techniqu 50 PS 6uoc COMPA1 Free Electives DART1110 22T2 Drawing 1: Foundations 74 CR 6uoc COMPA1 Free Electives BABS1111 22T3 Big Fat Myths 76 DN 6uoc COMPA1 Free Electives FINS3633 22T3 Real Estate Finance 84 DN 6uoc COMPA1 Free Electives INFS2602 22T3 Managing Information Systems 67 CR 6uoc COMPA1 Free Electives FINS2643 23T0 Wealth Management 67 CR 6uoc COMPA1 Free Electives PHYS1160 23T0 Introduction to Astronomy 61 PS 0uoc Could not be allocated COMP2511 23T1 Object-Oriented Design and Prog - NC unrs COMP3311 23T1 Database Systems 56 PS 6uoc COMPA1 Computing Electives COMP3411 23T1 Artificial Intelligence 63 PS 6uoc COMPA1 Computing Electives COMP3331 23T2 Computer Networks and Applicati 69 CR 6uoc COMPA1 Computing Electives COMP3900 23T2 Computer Science Project 92 HD 6uoc Comp Sci Advanced Core COMP3121 23T3 Algorithms and Programming Tech - - COMP9444 23T3 Neural Networks and Deep Learni - - UOC = 114, WAM = 66.3 Need 6 more UOC for Foundational Computing - COMP2511 Object-Oriented Design and Progamming Need 12 more UOC for Comp Sci Advanced Core - COMP3121 Algorithms and Programming Techniques or COMP3821 Extended Algorithms and Programming Techniques - COMP4920 Management and Ethics Need 12 more UOC for COMPA1 Computing Electives COMP2041 is not in the COMPA1 Computing Electives list, so counts as a Free Elective. By the time PHYS1160 was considered, the COMPA1 Free Electives bucket was full; so PHYS1160 can't count towards the degree. COMP2511 was not resolved, so it counts for 0 UOC. We don't assume that students will pass courses currently being studied (e.g. COMP3121) $ python3 q5.py zID ProgramCode StreamCode ... Coming Soon ...