It's UWAweek 42 (2nd semester, week 12)

help1402

This forum is provided to promote discussion amongst students enrolled in CITS1402 Relational Database Management Systems.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying the 10 articles in this topic
Showing 10 of 612 articles.
Currently 124 other people reading this forum.


 UWA week 41 (2nd semester, week 11) ↓
SVG not supported

Login to reply

👍x18
helpful
1:15pm Mon 7th Oct, ANONYMOUS

Suggestion for SQL Quiz for Take Home Test Dear Teaching Team and Everyone, I have a suggestion and at the same time will help everyone with this: Question 3 Question: Find the client details for clients whose hired vehicle has travelled between 5,000 and 20,000 kilometres. Suggestion: I put the correct query, but the answer check is wrong and I cannot even find out what is wrong because there is no sample data that I can check or even use. Question 6 Question: List all vehicles (registration number and fleet number) that have been hired and their associated vehicle types. Only include vehicles that have been hired (use a Join). Suggestion: Explicitly specify which columns from vehicle types should be included, also my project 2 structure differs from the one used in the quiz and I have to do multiple attempts and "guess" which columns belong to which. Help for others: The required fields are RegNum, FleetNum, Make, Model Question 7: List all vehicles that are either hybrid or luxury, but not both (you must use a Set operation) Suggestion: I submitted the query that I thought was correct, however it turned out wrong so I got 0.1 penalty. I tried finding out what the criteria by running this but then I wasted another 0.1 because it impose strict check to use SET operations. Either the sample data should be provided along with the column names and the final expected column should be specified.
SELECT v.*,'|',vt.*  FROM Vehicle v JOIN VehicleType vt ON vt.VehicleTypeID  = v.VehicleTypeID;
Help for others: You should select only the VehicleID, I think the other column are Fuel and Body Type I think this test is very inefficient if the student have to "guess" everything from the structure to the data. Especially with the penalty being applied it makes it "punishing" to try and figure out what is wrong. Sure it is a great way for student to learn how to troubleshoot and figure out relations, but just like the lab this take home test have the penalty being applied so most of the time we will waste our chance just to figure out the column name. What I would suggest for the next semester to reduce the pain poin for the next batch of students: 1. For the take home quiz to provide the database schema like usual labs, so student can check the actuality of their query before submitting 2. Remove the penalty so student can fiddle with the data (Like in question 3, you can actually troubleshoot it by doing SELECT * FROM the HiredVehicle tables and then to check what is wrong, but with the penalty, it makes student hesitate to troubleshoot what is wrong with their query). Not to mention some of the students might even "waste" their score because they got the column name wrong. 3. Have the first few tries to have no penalty. This way for students who put wrong column name they don't have their score reduced yet.


SVG not supported

Login to reply

👍x1
helpful
1:26pm Mon 7th Oct, ANONYMOUS

Question 8: Create a view ('ActiveHiresWithInsurance') to show active hires with insurance details (show HireID, Date, PolicyType, and Cost), between the dates 5th of Jan 2024 and 25th May 2024, and for all insurance entries with a cost of more then $20.

Avoid joining insurance with Insurance ip ON hv.insuranceID = ip.insuranceID, it will result in hv not having insuranceID column

I tried checking with this query and wasting another 0.1 point only to find out HiredVehicle only contains HireID Date CardType CardNo Odometer Days VehicleID

CREATE VIEW IF NOT EXISTS ActiveHiresWithInsurance AS
SELECT hv.*
FROM HiredVehicle hv;

I don't know the name of the weak entity to link it to HiredVehicle so if anyone found it please also drop it down below


SVG not supported

Login to reply

👍x2
helpful
2:28pm Mon 7th Oct, ANONYMOUS

But how do you even do question 8 without joining HiredVehicle and Insurance? Shouldn't the insuranceID be placed as FK in HiredVehicle allowing us to perform a join?


SVG not supported

Login to reply

👍?
helpful
4:16pm Mon 7th Oct, ANONYMOUS

For those that didn't notice yet, Question 3 have been changed and you have been given another change to retry the test.

For question 7, Hybrid is Fuel and Luxury is the trim So please kindly use that

I am still figuring out how to do question 8 because I tried

SELECT * FROM policyNumber;

and it did not work

Medding around with

SELECT * FROM insurance;

too only result in columns unique to insurance and still no way to connect it to HiredVehicle


SVG not supported

Login to reply

👍x1
helpful
4:18pm Mon 7th Oct, ANONYMOUS

Quick heads up, doing
SELECT * FROM insurance;
Results in this entries:
InsuranceID  PolicyType     Cost        HireID
-----------  -------------  ----------  ----------
1            Comprehensive  50          1
2            Third-Party    30          2
3            Comprehensive  40          3
4            Third-Party    25          4
5            Comprehensive  45          5
6            Third-Party    20          6
...


SVG not supported

Login to reply

👍x4
helpful
4:32pm Mon 7th Oct, ANONYMOUS

Yeah the teaching team is always creating vague and confusing questions in the test and labs and they always have typos in the labs as well if you guys are reading this you should do better and write the questions more clearly? Look I am understand that the team are busy people but at least make the questions more clear? Teaching team do better!


SVG not supported

Login to reply

👍?
helpful
4:47pm Mon 7th Oct, ANONYMOUS

Adding another entry here for question 7 Assertion always expect **VehicleID** but no matter what I did (even already using **as "VehicleID"**) my result still have the output in Vehicleid (Which in incorrect).
Expected 	Got 	
VehicleID   Vehicleid
----------  ----------
2           2
5           5
6           6
12          12
15          15
16          16
22          22
25          25
26          26
I think it is a problem from the python assertion code, teaching team might take a look into it first Because I tried in my local database and it shows correctly (which is expected since I have already used alias (as))


SVG not supported

Login to reply

👍?
helpful
5:10pm Mon 7th Oct, ANONYMOUS

With Q8, both insurance and HiredVehicle table have HireID in common, so consider joining with that in mind. At this point, we have to waste points to look at the schema.


SVG not supported

Login to reply

👍x1
helpful
9:46pm Mon 7th Oct, Mehwish N.

Except for any general comments, you are not allowed to discuss the test with each other or on the forums. I made that clear. If you have queries, you should email them to the teaching team.


SVG not supported

Login to reply

👍x1
helpful
10:41pm Mon 7th Oct, Mehwish N.

Thank you. We will check that.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy