CST363: Learning Journal Week 3

 Wow week 3 already? I'm glad that there wasn't any homework work this week, but I guess the exam made up for that absence. One thing that confused me a little on the exam was a question about the university database calling for data from the year 2023, but the database only goes up to like 2010. I guess it wasn't supposed to actually query data for the answer, but I got curious and thought maybe that data was in courses-large.sql instead of courses-small.sql. I was never able to find that out though because it was taking an astronomical amount of time to insert the tables for courses-large and I had to force quit out of MySQL Workbench because it was frozen for too long. Not sure what to make up that since my computer specs are exceptional. I guess it was trying to load everything on one thread and if I waited maybe 20+ minutes it would've completed. Anyways that doesn't matter. On to the questions!

1. Someone described normalization rule as "a non-key column depends on the key, the whole key, and nothing but the key, so help me Codd."  Key refers a primary or other candidate key of a table.  If the key has multiple columns, then "whole key" means all columns together and not just some part of the key.  Explain in your words what 3rd normal form is and why it is important.

     Basically third normal form is a design concept defined by Edgar Codd and its purpose is to maintain the integrity of a database by storing relational data in the correct tables, etc. It's important because it was a sort of guideline for how to format relational databases properly to avoid issues.

2. What is an SQL view.  How is it similar to a table? In what ways is it different?

    My understanding of SQL views is that they are basically snapshots of a part of a database that can be used to read data from. It is more complicated than that because they act as an abstraction layer between the database and the user. Views can be used similarly to tables and are usually read-only because they're only temporary virtual tables that are not written to nonvolatile storage. You can use views to expose only specific parts of the database to maintain obscurity.

Comments

Popular posts from this blog

CST438: Journal Entry Week 1

CST370: Journal Entry Week 3

CST311: Journal Entry Week 7