Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Mysql Team id 11 12 20 21 name hornets lions eagles sharks points 7 4 1 1 Venue id name 1 Nottingham 2 Leicester 6
Mysql
Team id 11 12 20 21 name hornets lions eagles sharks points 7 4 1 1 Venue id name 1 Nottingham 2 Leicester 6 Nottingham 7 Sheffield VONA Match id teamID venueID 1 opponentID teamPoints 12 3 1 11 2 2 12 20 1 3 6 20 11 0 4 4 7 12 21 3 5 LO 2 21 11 1 Write SQL commands to create the type and type body for an object type called MatchDate that represents some of the date details of a Match played between two teams. The MatchDate object type should have: two attributes called 'matchPlayed' (as a CHAR type to store one character) and 'matchOccurs' (as a DATE type); and one method called 'getMonth' that returns the month from the 'matchOccurs'. The MatchDate type may have subtypes. Write a further SQL command to create an object sub-type of MatchDate called Postponed MatchDate that represents the re-arranged match date details if a match has been postponed. The Postponed MatchDate object sub-type should have an additional attribute called 'new MatchOccurs' (as a DATE type). The Postponed MatchDate sub-type may not have subtypesStep 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