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.
I just had a student come to the support session showing that there was still issues with the way the question was checked, and if your instance of the quiz is for some reason using an older version of the question, and does not have the same error m...
I just had a student come to the support session showing that there was still issues with the way the question was checked, and if your instance of the quiz is for some reason using an older version of the question, and does not have the same error m...
The issue should be fixed, removing any reference to line numbers, you should now get
Trigger failed as expected due to related po items Cannot delete pos record with associated po items
job id po id po date vendor id
...
002 HHH...
The issue should be fixed, removing any reference to line numbers, you should now get
Trigger failed as expected due to related po items Cannot delete pos record with associated po items
job id po id po date vendor id
...
002 HHH...
This may be due to the way the question is checking for the expected output, also remember it is checking to make sure that the records cant be deleted, if there are any issues with line numbers, you can try remove any blank lines in your code.
I'll l...
What was suggested above would be the best guide, aside for that, there aren't any formatting checks in the embedded Python code, so as long as you select the po id and an aggregate function AS total cost, that side of it should be fine.
If it can be ...
At the earliest it would have to wait until after everyone has finished, and any students that may have requested extensions resits of the exam. It would also give out the answers to all of the questions which would potentially make them unusable in ...
You shouldn't use any AS operations here, you only need to select the attribute mentioned, some Questions have Python code embedded using to lowercase sentence case etc. on student answers to standardise output, and attempt to make the questions case...
There was a solution provided I believe, and the questions mention any ambiguous attributes entities that may exist.
I would suggest trying the questions, and observing the output, that will show what the expected attributes are, and the question woul...
Drops, Creates, Inserts, and a few Selects primarily, I believe the wording suggested that you can include triggers and views, but it wasn't compulsory.
I would have to check with Mehwish, but if you have your own test data, that may be sufficient, as...
I beleive the assignment description mentions you need test dummy data to make sure the database works, so you would need to include the insert statements, of sufficient numbers to make sure it can test the database (so maybe 10 rows per table? or a ...
this may have been solved already by the original poster, but the intent of the 'use .txt .sql' files is to submit a script file (.sql extension but it is essentially just a .txt file and opens in notepad easily), the script file will be able to be r...
I would suggest that in the case of a natural key not being able to be used (like the example mentioned about multiple cars at the same time for the same client), you would create a surrogate primary key, such as HireID etc.
Hi,
The question is incorrect, a more appropriate version of the question would be
Find the item ids that are either 'IRN' (INK-RESIN) or 'IWS' (INK-WRSOL) from the po items table, but exclude any items that also exist in other purchase orders.
However...
Hi,
You are correct, the question appears to be flawed, and includes a situation that could not happen, but adjusting at this stage may cause everyone who attempted and got it right to have to re-do it at this late stage. the answer is still achievabl...
That is a good point, I didn't add in the check to make sure you need to use a sub-query, but it was a hint, and the question text didn't specifically say it HAD to be a sub-query, so use whatever works.
One of the interesting things about SQL in gene...
A practical example could be if you had a table of student table with names, degree, and grade, you want to get the average grade for each different degree the students are taking.
You would add GROUP BY degree, so it would get the AVERAGE(grade) for ...
I altered the question to give an error message referencing the unnecessary parenthesis as the reason for the error. It does appear SQLite doesn't like the use of them in SET statements and will raise an exception.
Adam.
Yes it does appear to be an issue with the parenthesis, I tried adding them into the correct solution on the test interface and it does appear to break it, I'll investigate if this is an SQLite issue, or to do with the testing code implemented on the...
Well if the combination of attributes makes up the primary key, then it would be a composite primary key so you would show it as the key. It just also gets partially used by another table as the foreign key so it would just not be labelled as the for...
Hi Jieh Chia,
When identifying primary keys, you may encounter a situation where there are no natural primary keys, or the ones available aren't suitable, so you can essentially make a surrogate key (which is what you're suggesting).
A surrogate key is...
Hi,
Best to check which type of ER diagrams you will need to use, those are crow's feet notation https vertabelo.com blog crow-s-foot-notation
If you want to model using UML https www.tutorialspoint.com uml uml basic notations.htm
Have a look thro...
Hi,
Having guides cheat-sheets can be really useful, so have a look at pages like this for reference
https www.tutorialspoint.com uml uml basic notations.htm
Thanks,
Adam.
ANONYMOUS wrote
Hi Harrison,
'Entity Entity is a concept to abstractly represent all instances of a group of similar things .
Entity Type It is collection of entity having common attribute.
Entity Instance An entity instance is a single occurrence of an entity....
Hi,
One obvious way to identify fan traps early, is the M 1 M relations, and for Chasm is there being the presence of optional participations, this is a good post to look over that goes into some detail https stackoverflow.com questions 14328319 fa...
Hi,
This has also been updated, there is an issue with the way the conditions in the having are evaluated.
HAVING count(cust id) 2 AND city OR phone IS NOT NULL
should be
HAVING COUNT(cust id) 2 AND (city IS NOT NULL OR phone IS NOT NULL)
You need to ...
Hi,
Additionally, not using the GUI tools to generate SQL and automatically do a lot of the tasks can be beneficial with knowing how the SQL works.
Thanks,
Adam.
Hi,
This has also been updated, there is an issue with the way the conditions in the having are evaluated.
HAVING count(cust id) 2 AND city OR phone IS NOT NULL
should be
HAVING COUNT(cust id) 2 AND (city IS NOT NULL OR phone IS NOT NULL)
You need to ...
Was anyone still having issues?
If you want to break the question down into what it is asking for each part of the SQL statement
for the SELECT part, it is asking to use one of the aggregate functions (https www.w3schools.com sql sql aggregate funct...
I agree, it will be more beneficial to use SQLite instead of MYSQL, although it would be worth trying both for your own study purposes if you already have MYSQL installed to see the difference, but to use only the code that works in SQLite for use in...
Lab 3 should be set to release by Monday, 19 August 2024, 12 00 AM, the questions are ready, we are just checking over the content to make sure there are no issues.
Thanks,
Adam.
ANONYMOUS wrote
Hi,
The late submission quiz is for anyone who couldn't submit the quiz by the original due date, if you have done it already, you don't need to do that one as well.
Thanks,
Adam.
There is also the fact we are using the SQLite implementation of SQL, which has a few slight differences, one of which is DATE types (from https www.sqlite.org datatype3.html)
...
2.2. Date and Time Datatype
SQLite does not have a storage class set a...
There were a few issues regarding the question text referring to the wrong data type, those have been fixed, each question that involved creating attributes will mention the required type and length due to very specific checking of output enabled.
Whi...
Hi Liang Yap,
The questions will have a variable amount of checks on the structure of the SQL code, the initial ones such as the question mentioned do not specifically check for NOT NULL or any other restrictions. This is to give a little flexibility ...