Consider the following relations about NBA: P LAY ER(pid, pname, nation). Each tuple describes a player with pid being the player’s id, pname his name, and nation his nationality. The table has a primary key pid. T EAM(tid, tname). Each tuple describes a team with tid being the team’s id, and tname

CMPTR
3rd Edition
ISBN:9781337681872
Author:PINARD
Publisher:PINARD
Chapter17: Creating A Database
Section: Chapter Questions
Problem 4QY
icon
Related questions
Question

Consider the following relations about NBA:


P LAY ER(pid, pname, nation). Each tuple describes a player with pid being the player’s
id, pname his name, and nation his nationality. The table has a primary key pid.


T EAM(tid, tname). Each tuple describes a team with tid being the team’s id, and tname
its name. The table has a primary key tid.


REGIST ER(pid, tid, salary, year). Each tuple records the fact that a certain player (indicated by pid) played for a certain team (indicated by tid) in a specific year with an annual income given in salary. The table has a primary key (pid,year ). Note that a player may belong to different teams in different years. 


(a) Find the names of the teams and the corresponding year that “Michael Jordan” ever played
for. 

(b) Find the names of all players of the team “Heat” in year 2020. 

(c) For each player, display his pid, and the first and last years in which he played. 

(d) Find the pids of all players that played from 2010 through 2020 (i.e., such a player played
in all the years through 2010, 2011, 2012, ..., 2020). 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr