CST 363 - Week 3
Normalization in database design refers to the techniques used when designing the database to avoid redundant data and possibly anomalies when updating and deleting data from the database. The third normalization form says to not store redundant data and that redundant data can be found through functional dependencies. It should be noted that when designing a database using a top-down design and an ER model, the tables will usually be normalized by their design. Using a bottom-up design such as being given a CSV of all the data to be entered into a database, with no explanation or guidance, redundancy tends to occur. An example of why the third normalization is good was demonstrated in our assignment this week. We had tables for products and related tables for PCs, laptops, and printers. If all of these tables were in one table and not split up between their respective dependent key then there would exist redundant data. Speed for PCs and laptops can be the same. If the user wanted to delete the PCs with a certain speed then an anomaly would occur when deleting and the laptops with the same speed would be deleted too. This is just one tiny example of why the third normalization form is important.
An SQL view is a command that allows the data of a query to be stored in a table for later use, referred to as a virtual table. It is similar to a table because it contains entities and attributes but differs because it is not contained in the actual design of the database. When a view is invoked, the query used to create that view is run and stored in a new instance of that query. Then the view can be used just like any other query that would be run on an existing table in the database.
Comments
Post a Comment