Explain the role of primary and foreign keys in databases

Assignment Help Database Management System
Reference no: EM131258013

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:

o An SQL with a nested subquery.
o A select query that uses GROUP BY
o A select query that uses ORDER BY
o A select query that uses Inner JOIN
o A select query that uses an Outer JOIN
o A select query that uses UNION
o A select query that uses EXCEPT

• Make sure you give a screenshot of the output from executing your queries.

Reference no: EM131258013

Questions Cloud

How should the truck be routed to minimize total breakage : How should the truck be routed to minimize the total breakage? How would you formulate this problem as a shortest path problem.
What is the total weight : Six items purchased at a grocery store weigh 17 kilograms. One of the items is detergent weighing 925 grams. What is the total weight, in kilograms, of the other five items?
Distinguish between effective capacity and actual output : Distinguish between effective capacity and actual output ? Explain why doubling the capacity of a bottleneck may not double the system capacity.
Nonlinear system of equations : Give all solutions of each nonlinear system of equations, including those nonreal complex components. -5xy+2=0 x-15y=5
Explain the role of primary and foreign keys in databases : 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.
What is the total weight : Six items purchased at a grocery store weigh 14 kilograms. One of the items is detergent weighing 805 grams. What is the total weight, in kilograms, of the other five items?
Determine what you think would be a common complaint : According to the material in Chapter 9, most employee complaints related to performance evaluations are based on alleged violations of employment law. Determine what you think would be a common complaint that could have legal consequences. Propose..
Find the population density of the country : a. Find the population density of the country, to the nearest tenth, in 1900 and in 1980. b. Find the percent increase in population density, to the nearest tenth of a percent, from 1900 to 1980.
What funding supports most agencies serving this population : What do you believe a typical day might look like in this position? What funding supports most agencies serving this population? What resources are available to clients, as well as those serving this population? What is your conclusion regarding jo..

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd