Skip to content

UofT-DSI | SQL - Homework 5#5

Open
msugar wants to merge 3 commits intomainfrom
homework5
Open

UofT-DSI | SQL - Homework 5#5
msugar wants to merge 3 commits intomainfrom
homework5

Conversation

@msugar
Copy link
Copy Markdown
Owner

@msugar msugar commented Sep 13, 2024

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)

Adding SQL queries for the first time to meet the requirements of Homework 5.

What did you learn from the changes you have made?

SQLite is a bit more lenient than other flavors of SQL I'm more used to, like MySQL, Postgres, etc. That might sound like a benefit, but it could make it harder to migrate to other database. (Which is rare and challenging no matter what. But still.)

Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?

For the last question, I think I used a different approach because I didn't feel the need to use a WHERE with multiple values, as stated in the question's comments.

Were there any challenges? If so, what issue(s) did you face? How did you overcome it?

Not sure if there is an issue with my version of SQLite 3 (), or if DB Browser for SQLite is the one to be blamed for it, but I noticed that running the whole script doesn't always proceeds as expected when you have CREATE TABLE <table> and DROP TABLE <table> commands for the same <table> in the same script. Also, it seems there a bug with SQL commands inside block comments (/* ... */), which sometimes seem to be executed (?). Really weird stuff that slowed me down a bit.

How were these changes tested?

I created the queries and other commands in incremental or piecewise manner, inspecting the results visually or checking them with other queries to make sure I was on the right track.

A reference to a related issue in your repository (if applicable)

N/A.

Checklist

  • I can confirm that my changes are working as intended

Adding SQL queries for the first time to meet the requirements of Homework 5.
Fix WHERE condition in DELETE. The question asks for the deletion of the OLDER record, not the latest one.
Replace hard-coded values in INSERT with results from a query over the same table being updated.
Don't overwrite the snapshot_timestamp in the UPDATE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant