Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Database Express the following constraints in relational algebra. These are based on the given ship data. Use the following alternative syntax when you write the
Database
Express the following constraints in relational algebra. These are based on the given ship data.
Use the following alternative syntax when you write the algebra.
a. No ship with more than 9 guns may be in a battle with a ship having fewer than 9 guns that was sunk.
Classes(class, type, country, numGuns, bore, displacement) Ships(name, class, launched) Battles(name, date) Outcomes(ship, battle, result You can express these as either containments or or by equating an expression to the empty set. Containment example: movieTitle,movieYear( StarsIn) title,year (Movies) Equating to empty set example: MS1.name=MS2.nameANDMS1.address=MS2.address(MS1MS2)= \begin{tabular}{|l|l|} \hline operation & notation \\ \hline \hline union & R UNION S \\ intersection & R INTERSECT S \\ difference & R DIFF S \\ projection & PROJECT ( attribute_list ){R} \\ selection & SELECT ( conditional ){S} \\ cartesian product & PRODUCT {R,S} \\ natural join & JOIN {R,S} \\ theta join & THETA ( conditional ){R,S} \\ renaming & RENAME(new_relation_name)(attribute_list ){R} \\ \hline \end{tabular} (a) Sample data for relation Classes (b) Sample data for relation Battles (c) Sample data for relation Outcomes Figure 2.22: Data for Exercise 2.4.3 Figure 2.23: Sample data for relation Ships
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started