Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relational schema: Department(deptld, dname, locatlon) Student(snum, sname, deptld, age) Faculty(fld, fname, deptld) Class(cname, deptid, meets at, room, faculty) Enrolled(snum, cname, score, grade

image text in transcribed
Consider the following relational schema: Department(deptld, dname, locatlon) Student(snum, sname, deptld, age) Faculty(fld, fname, deptld) Class(cname, deptid, meets at, room, faculty) Enrolled(snum, cname, score, grade Assume that: - All students and faculty members must malor/work In one department; - Faculty teach courses only In the department they belong to; - The names of the courses are unlque for each department; - Scores are numbers In to,100]; - Faculty In Table Class Is a subset of fld In Table Faculty Wrlte each of the following querles using Datalog. If you belleve any one of the following Is not expresslble In Datalog, Informally explain why It cannot be expressed. 7. (10 pts) FInd the faculty who have Instructed at least one course In the CS department but have never Instructed any course In the Mathematics department 8. (10 pts) FInd the names of courses each student gets the lowest score In, .e., If a student takes 2 courses A and B and scores 50 and 60, respectlvely, then A Is the name of the course In whlch that student (can be different for different students depending on thelr score) has scored the lowest. 9. (15 pts) What are the posslble outcomes If a Datalog rule Is unsafe? Please Illustrate two dlfferent scenarlos for thls case by designing unsafe rules for the relatlonal schema mentloned above, and explain the answers to these rules

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Fundamentals Concepts, Drivers & Techniques

Authors: Thomas Erl, Wajid Khattak, Paul Buhler

1st Edition

0134291204, 9780134291208

More Books

Students also viewed these Databases questions

Question

Proficiency with Microsoft Word, Excel, PowerPoint

Answered: 1 week ago

Question

Experience with SharePoint and/or Microsoft Project desirable

Answered: 1 week ago