Looking for Plagiarism-Free Answers for Your US, UK, Singapore, New Zealand, and Ireland College/University Assignments?
Talk to an Expert| Category | Assignment | Subject | Computer Science |
|---|---|---|---|
| University | The Australian National University (ANU) | Module Title | COMP2400 - Relational Databases |
| Academic Year | 2026/27 |
|---|
The relational database moviedb has the following database schema:
1 MOVIE(title, production_year, country, run time, major genre) primary key {title, production_year}
PERSON(id, first name, last name, year_born) primary key: {id}
AWARD (award-name, institution, country) primary key award.name}"
RESTRICTION CATEGORY (description, country) primary key: {description, country}
DIRECTOR(id, title, production year)
primary key
foreign keys
(title, production year}
[title, production.year] C MOVIE[title, production_year] [id] C PERSON[id]
WRITER(id, title, production-year, credits)
primary key
foreign keys
fid, title, production-year}
[title, production year] C MOVIE[title, production_year] [id] C PERSON[id]
CREW(id, title, production-year, contribution)
primary key: {id, title, production_year}
foreign keys: [title, production-year] C MOVIE[title, production_year] [id] C PERSON[id]
SCENE(title, production year, scene no, description)
primary key: {title, production-year, scene_no}
foreign keys: [title, production year] C MOVIE[title, production_year]
ROLE(id, title, production year, description, credits)
primary key {title, production year, description}
foreign keys
[title, production.year] C MOVIE[title, production-year] [id] C PERSON[id]
RESTRICTION(title, production year, description, country)
primary key {title, production year, description, country}
foreign keys: [title, production year] C MOVIE [title, production_year]
[description, country] C RESTRICTION CATEGORY [description, country]
APPEARANCE(title, production_year, description, scene_no)
primary key
{title, production year, description, scene_no}
foreign keys: [title, production-year, scene.no] C SCENE[title, production-year, scene_no] [title, production year, description] C ROLE[title, production year, description]
MOVIE AWARD(title, production year, award name, year of award, category, result)
primary key
foreign keys:
CREW AWARD(id, title, primary key
foreign keys:
DIRECTOR AWARD (title, primary key: foreign keys:
{title, production year, award name, year of award, category} [title, production.year] C MOVIE[title, production_year] [award_name] C AWARD[award_name]
production_year, award_name, year of award, category, result) (id, title, production year, award_name, year of award, category} [id, title, production-year] C CREW[id, title, production_year] [award_name] C AWARD[award_name]
production_year, award_name, year of award, category, result) [{title, production year, award name, year of award, category) [title, production-year] C DIRECTOR[title, production-year] [award_name] C AWARD[award_name]
WRITER AWARD (id, title, production year, award name, year of award, category, result) primary key (id, title, production year, award name, year of award, category} [id, title, production year] C WRITER[id, title, production_year] [award_name] C AWARD[award_name]
foreign keys:
ACTOR AWARD (title, production-year, description, award_name, year of award, category, result) primary key {title, production.year, description, award_name, year_of_award, category} [title, production-year, description] C ROLE[title, production-year, description] [award_name] C AWARD[award_name]
foreign keys:
There are five different categories of awards: movie awards, crew awards, director awards, writer awards and actor awards. A movie can only win an award after being nominated for the award.
Your task is to answer the following questions using SQL queries. For each question, your answer must be a single SQL query that may contain subqueries, and you must write your answers into the template file myqueries.sql.
1. How many persons were born after 1974 whose first name ends with 'e'? List that number.
2. Find the average run time of movie(s) which were produced before 1991 and categorised as 'PG-13' restriction in the USA. List the average as a decimal (round to two decimal places). Hint: in PostgreSQL, the function ROUND(x, n) can round x to n decimal places, e.g., if x=0.1129, then ROUND(x, 2) = 0.11.
3. Of all the movies that have crew members, how many movies have at most 2 crew members? List that number.
4. Find director(s) who have never been nominated for a director award. List their count. Hint: If an award has been won, then implicitly the winner must have been nominated.
5. List the first and last name of director(s) who have directed the maximum number of 'comedy' movies. Order your result in ascending order of their first names.
6. What proportion of comedy movies are produced in Australia among all comedy movies in this database? List the proportion as a decimal (round to two decimal places).
7. Of all the movies that have won both a director award and an actor award in the same year, which movie(s) have won the largest combined total of both director and actor awards in a single year? List their title(s) and production year(s).
8. How many movies have won at least one award (including movie awards, crew awards, director awards, writer awards and actor awards)? List that number.
9. Which director(s) directed the least variety of movies (i.e., the least number of distinct major genres)? List their id(s).
10. List all the pairs of movies which have won any award in the same year. List the pairs of their title and production_year. Note that the result should not contain duplicated pairs of title and production_year, e.g., {(titlel, production_year1), (title2, produc- tion_year2)} and {(title2, production_year2), (titlel, production_year1)} are consid- ered as duplicated pairs and your query should only produce one of them in the result. Hint: in PostgreSQL, the function CONCAT(A1, A2,..., An) can be used to combine selected attributes.
Buy Custom Answer Of COMP2400 - Relational Databases Assignment 1 (SQL)
Get A Free QuoteAre you an Australian student struggling with your COMP2400 - Relational Databases assignment 1? We offer expert Australia Assignment Help to make your academic journey easier. Our team provides a list of Free Assignment Examples and Samples to help you understand key concepts and improve your grades. With our guidance, you’ll easily tackle complex topics. Don’t let assignments overwhelm you—reach out today and let us support you in acing your COMP2400 assignment and boosting your confidence!
Hire Assignment Helper Today!
Let's Book Your Work with Our Expert and Get High-Quality Content