Appropriate primary keys-foreign keys

Assignment Help Basic Computer Science
Reference no: EM131554361

Problem 1. Please create the following tables with appropriate primary keys & foreign keys.

The database stores information about First Lego League (A robotic competition organized by Lego).

The list of tables:

  • Team table with 5 columns: tid (team ID), tname (team name), coach (coach name), cphone (coach phone), state (team state).
  • Team_member table with 4 columns: mid (team member id), tid (team id), mname (member name), mage (member age).
  • Competition table with 5 columns: cid (competition id), cname (name of the competition), state (state), location (location of competition), cdate (date of competition)
  • Team_competition table with 3 columns: tid (team id), cid (competition id), ranking (ranking of the team in the competition, the top few teams will enter competition in the next level).

Problem 2. Insert at least three rows of data to each table. Make sure you keep the primary key and foreign key constraints. [20 points]

Problem 3. Please write ONE SQL statement for each of the following tasks using tables created in Problem 1. You can ONLY use conditions listed in the task description. For example, you CANNOT manually look up the tid of electrons in task 3.  [60 points, 10 points each]

Task 1: Return the total number of teams

Task 2: Return the name of the team coached by Susan.

Task 3: Return the names of members in the team electrons.

Task 4: Return the names competition the team 'electrons' has participated and the team's ranking in each such competition

Task 5: Return the number of teams participated in each competition along with the name and date of the competition.

Task 6: Return the name of the team that has at least 4 members.

Reference no: EM131554361

Questions Cloud

Designing forms and reports : Design and draw two forms for a new software application or business web app that will collect data from its user.
Justify the choice of firm fixed price contract : BUSM4610: What happens when a situation of mistrust occurs between the customer and the contractor? Discuss the issue with respect to the project.
Calculate the constant percentage change for the model : Until women reach their mid-60s, they tend to get less sleep per night as they age. The average number of hours, in excess of eight hours, that a woman sleeps.
Conduct a web search for a current event : Financial International Business Operations- Conduct web search for current event related to an ethical and financial topic affecting an international business.
Appropriate primary keys-foreign keys : Problem 1. Please create the following tables with appropriate primary keys & foreign keys.
Determine the approximate number of american adults : 31% of American adults surveyed stated that giving up their phone for a day would be more difficult than giving up their significant other.
The clients developmental stage factor : Are there considerations that cannot be processed at this time because of lack of information in the written scenario?
Describe the traits you would need to be successful : Finally, if you were in the role of superintendent, describe the traits you would need to be successful. Explain what you would do differently.
Describe and construct a matrix in excel : Zappos Shoes has decided to launch a reactivation campaign to customers who have lapsed and not purchased in 12 months or longer.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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