As an example of procurement reform in government, Ray Ells’ software consultancy has been awarded a contract to
develop Casebook, a SaaS app to keep track of the status of civil court cases.
Here are some notes from an early customer
Each case has two parties: the plaintiff and the defendant.
The same plaintiffs and defendants may be parties in more than one case.
A party that is a plaintiff in one case
might be a defendant in another case.
Each case is assigned to exactly one judge and its proceedings administered by exactly one court clerk.
court officer is either a judge or a court clerk.
The only people who can login to the app and access the data are court officers.
Login should be required for all
app actions, that is, the only publicly-viewable page should be the login page.
A case has a variable number of supporting documents associated with it.
Examples of documents include
motions, depositions, evidence (photographs, scanned documents, audio or video clips, etc.), and others.
(3 pts) Which foreign keys would we expect to see in the Cases table?
SELECT ALL THAT APPLY.
(3 pts) Which foreign key from the above would we expect to see in the Judges table? _____
(3 pts) Which foreign key from the above would we expect to see in the Documents table? _____
ActiveRecord associations are
to support the query: "Return all the defendants whose cases have
been assigned to this judge"?
(Answers have the form "X has many Y", "X belongs to Y", and so on.
Be sure to use the
correct letter choices for each blank!)