Tuesday, May 14, 2024

Intro to Databases Week 3

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.

Third normal form, to me, is when a key that does not need to be dependent on the table's index can be removed and made its own table.  This helps with reliable and consistent data across the database.


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

A SQL View is essence a virtual table comprised of the results from a SQL statement.  Basically the View isn't a table itself in the database, rather, it's composed of data from the database and structured in a way that makes sense for the moment.  It's similar to a table, in the sense that you can query against the view, get data out of the view.  However, unlike a table, it doesn't actually store any data in the the database.


0 comments:

Post a Comment