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

  What is the difference between database and data warehouse

What is the difference between database and data warehouse? What is OLAP? What is a data cube? How do DSS take advantage of the structure?

  Explore ways of converting depositors to borrowers

Universal Bank is a young bank growing rapidly in overall customer acquisition. The majority of these customers are depositors with varying sizes of relationship with the bank. The customer base of borrowers is quite small, and the bank is interes..

  Er diagram that you are unable to capture in the sql

ER diagram that you are unable to capture in the SQL statements and brie?y explain why you could not express them.

  How to select the primary key from the candidate keys

A motor vehicle maintenance center wants to improve its services by using database management systems and data mining what tables are needed in such a database and how can it help improve their services

  Data modeling and normalization

Data Modeling and Normalization

  Data analysis and definition

What is the business implications that can be drawn from the process of building and comparing these models, and has this practice helped resolve the business issue? Why or why not?

  Graph the bond yield to maturity

Identify two possibly mispriced bond issues, one overpriced and one underpriced. and graph the bond yield to maturity (YTM) on the y-axis of an XY-scatter plot, with the bond to maturity in years on the x-axis.

  Analysing and implementing a solution for a bank database

The purpose of this assignment is to provide you with experience in analysing, designing and implementing a solution for a bank database. Your solution should be implemented as a program for a database system using Microsoft Access.

  Create a database with a table called "myusers" and "myrole"

The first form is a login page default.aspx Users cannot view the other forms until they have successfully logged onto the application

  As a dba it is vital that you understand in detail how a

as a dba it is vital that you understand in detail how a query is processed by the dbms. since team retail is using

  Create a database

Create a database that implements the proposed data warehouse schema.

  Assume the data warehousing system is centralized

Assume the data warehousing system is centralized, and implemented in the environment of Microsoft SQL Server 2012. As we discussed in the introduction, each store has its own local database.

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