Database Systems for Website Applications assignment, need by tomorrow same time!

profileSteelers79

Database Systems for Website Applications assignment:

In this assignment, you will review the below schema then answer the three questions listed afterwards.

Assume and review the following Internet movie database schema:

Database:

Table: movie

id — int, primary key
title — char
year — int
rating — float

Table: person

id — int, primary key
name — char
sex — char
age — int

Table: role

personid — foreign key references person — int
movieid — foreign key references movie —- int
character — char

 

Based on your review of the Internet movie database schema above, respond to the following:

 

 

  • Explain the role of primary and foreign keys in databases. Explain why we need them and whether we can extract information from tables without having primary or foreign keys.
  • Write and execute a SQL for each of the following scenarios:
    • An SQL with a nested subquery.
    • A select query that uses GROUP BY
    • A select query that uses ORDER BY
    • A select query that uses Inner JOIN
    • A select query that uses an Outer JOIN
    • A select query that uses UNION
    • A select query that uses EXCEPT
  • Make sure you give a screenshot of the output from executing your queries.
    • 10 years ago
    • 20
    Answer(1)

    Purchase the answer to view it

    blurred-text
    • attachment
      redb.zip
    • attachment
      work.docx
    Bids(1)