SQL – Specifically

Why SQL?


In a recent Miami Heat basketball game broadcast, as they were preparing for the third quarter to begin, the announcer said:

“Fewest points allowed by Miami to an opponent in a first half this year, and the fewest threes by the Celtics in any half this season. They went one for nineteen. The Heat with a 21-point lead halfway through. This ties the third-largest margin at halftime for the Heat this year.”

Whether you’re a basketball fan or not whether you understand what the announcer said or not from a database perspective, there is a ton of information in that quote.

The announcer cannot, of his own knowledge, be aware of all this data, such that he could have spontaneously gathered these facts, categorized them into stats, and then, on-the-fly, shaped it all into information his audience would find compelling.

In a few sentences, the announcer gathered data, data became information, information became motivation for decision makers (the audience), motivation compelling enough to make them stick around for the second half.

He sounds spontaneous, but hes relying on something powerful behind the scenes: a database that can answer questions quickly and accurately.

Some information is simple he can look at the scoreboard and see the halftime margin. But the rest?

  • Fewest points allowed in any first half this season
  • Fewest threes by the Celtics in any half this year
  • Thirdlargest halftime lead of the season

Those are not look it up in a notebook facts. Those are queries. He (or the production team) is asking questions like:

  • How many points has Miami allowed in the first half of each game this season?
  • How many threes has Boston made in any half this year?
  • How many did they make in the first half tonight?
  • What were the Heats halftime leads in all previous games?

No one is flipping pages. No one is guessing. A database is doing the work.

And how do we ask questions of a database?

SQL – Specifically, the SELECT statement.

This brings us full circle from Day One:

  • Data becomes information.
  • Information becomes insight.
  • Insight motivates decisions even something as simple as keeping the audience tuned in for the second half.

Weve spent time on the theory: entities, attributes, keys, dependencies, normalization. Now its time to look at the tables built from that theory and start doing what the announcer does: ask questions and get answers.

Thats what SQL SELECT is for.

DUE DATE

BE ADVISED: There is a lot in the following. If you haven’t set up your SQLite environment, time’s up. You NEED SQLite3 for this and subsequent assignments. Instructions are in the assignment, but they are just the start. You need time to ensure everything is set up and working properly, not to mention answering the questions according to correctness as well as presentation protocols outlined in the assignment document. Time for completion is therefore extended until next Thursday morning 7am 2/19/2026


DDL Script

– Download this file to the directory/folder where your create your database (see assignment instructions), then RENAME THE FILE TO assn01.sql BEFORE attempting to use it as described in the instructions.


Please be sure to submit both your student_XX.docx *and* your student_XX.db file.

Requirements: 2

WRITE MY PAPER