Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume the following conceptual schema is stored. Constraints apply to each database state. C1 means that each person referred to in the database must have

Assume the following conceptual schema is stored. Constraints apply to each database state. C1 means that each person referred to in the database must have his/her fitness rating recorded there. C3 says the possible fitness values are whole numbers from 1 to 10. C4 means no person can be recorded as expert at more than one sport, and C5 says a person can be recorded as being an expert at a sport only if that person is also recorded as playing the same sport.

Reference schemes: Person(.firstname); Sport(.name); FitnessRating(nr)

Base fact types: F1 Person has FitnessRating

F2 Person plays Sport

F3 Person is expert at Sport

Constraints: C1 Each Person has some FitnessRating

C2 Each Person has at most one FitnessRating

C3 The possible values of FitnessRating are 1 to 10

C4 Each Person is expert at at most one Sport

C5 Each Person who is expert at some Sport also plays that Sport

Derivation rules: D1 Person is a martial artist if

Person plays Sport judo or Person plays Sport karatedo

D2 nrPlayers of Sport = count each Person who plays that Sport

The database is initially empty. The user now attempts the following sequence of updates and queries. For each update, circle the letter if the update is accepted (based on the cumulative state of the database). In case of rejection, supply a reason (e.g., state which part of the schema is violated). For queries, supply an appropriate response from the CIP.

(a) add: Person Ann has FitnessRating 9.

(b) add: Person Fred plays Sport tennis.

(c) add: Person Bob has FitnessRating 7.

(d) add: Person Ann has FitnessRating 8.

(e) add: Person Chris has FitnessRating 7.

(f) add: Person Fred has FitnessRating 15.

(g) add: Person Ann plays Sport judo.

(h) add: Person Bob is expert at Sport soccer.

(i) add: Person Ann is expert at Sport judo.

(j) add: Person Ann programs in Language SQL.

(k) add: Person Ann plays Sport soccer.

(l) add: Person Chris plays Sport karatedo.

(m) del: Person Chris has FitnessRating 7.

(n) begin

add: Person Bob has FitnessRating 8;

del: Person Bob has FitnessRating 7.

end

(o) add: Person Ann is expert at Sport soccer.

(p) add: Person Bob play Sport soccer.

(q) Person Ann plays Sport judo?

(r) list each Person who plays Sport karatedo?

(s) nrPlayers of Sport soccer?

(t) list each Person who is a martial artist.

(u) list possible values of FitnessRating.

(v) what is the meaning of life?

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

More Books

Students also viewed these Databases questions

Question

=+ What would it look like? Who should deliver it?

Answered: 1 week ago