Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider a knowledgebase defined like the following, for the identification of p

ID: 3593451 • Letter: C

Question

Consider a knowledgebase defined like the following, for the identification of poisonous fruits, which is also populated with normal ones % traits are in name,color,typical longest dimension in mm, source order fruit(cherry,red,20,tree) fruit(grape _seedless,green, 25, vine) fruit(grape _wine,red, 25, vine) fruit(holly,red,8,bush). fruit(holly,brown,8,bush) %fruit,woody/smooth,low number seeds, high number seeds. seed(cherry,woody,1,1) seed(grape_wine, smooth, 3,8) seed(holly,woody,3,10) symptom(holly, vomiting) symptom(holly, diarrhea) 8. (2) Write a query to find all red fruits with a single seed: 9. (1) What key would you press to list them all (one per press)? 10. (3) What query would you make to find a brown fruit that caused vomiting? 11. (4) What query would you make to find all drupes? (A drupe has a single woody seed)

Explanation / Answer

8.(2)
select * from fruit where color='red' and low-number-seed=high-number-seed=1;
It will give the output,

name color largest-dimension(in mm) source-order woody/smooth low-number-seeds high-number-seeds symptom
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cherry red 20 tree woody 1 1 -  

10.(3)
select * from fruit where color='brown' and symptom='vomiting';
It will give the output,

name color largest-dimension(in mm) source-order woody/smooth low-number-seeds high-number-seeds symptom
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
holly brown 8 bush woody 3 10 vomiting  


11.(4)
select * from fruit where low-number-seed=high-number-seed=1 and seed='woody';
It will give the output,

name color largest-dimension(in mm) source-order woody/smooth low-number-seeds high-number-seeds symptom
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cherry red 20 tree woody 1 1 -  

  

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote