Assignment 1

Due: 11:59 pm 9/3/2025

For the first 5 questions, submit a text file called yourlastname.txt with the data. All answers pertain to the baseball database for the class.

  1. List three attributes in the franchises table
  2. List an attribute in the franchises table that can hold a string of more than 5 characters.
  3. List an attribute which cannot be null in the franchsises table.
  4. List an attribute from any table (include the table name) that can hold a real number.
  5. List a table and an attribute such that the attribute is in the franchsises table and the other table
For the next 5 questions, submit a second text file following the format after the questions. All of your SQL submissions will be in this format.
  1. Find the teamid and yearid of teams who have over 110 for team_W in one row. There are 5.
  2. Find the yearids when the Detroit Tigers (team name) won the World Series (WSWin = 'Y'). There are 4.
  3. Find the distinct yearids when the winner of the World Series for the American League is unknown (i.e., WSWIN is NULL and lgID is 'AL'). There are 4.
  4. Find the yearid and team name of the team that won the World Series in 2024 and 2025. You should have 2 rows.
  5. Find the teamid, team_W and team_L from teams in 1984 where the team played .500 (the number of losses (team_L) equals the number of wins (team_W)). There are 3.

Your assignment should be a text file meeting the following criteria

Upload your files in canvas.

Each question will be graded on a scale of 0-1. A score of 0 indicates the question was incorrect. A score of 0.5 indicates a partially correct answer. A score of 1 indicates a correct answer.