Week 4 - Halfway

Briefly summarize 5 things what you have learned in the course so far.

The first thing I've learned in this course is the use of primary keys. A primary key is important to identify a row by a unique and not null column. There are also composite primary keys which are a group of multiple columns that act as primary key, these values must be group in a way that is unique, there must not be a null value, and minimal as in the columns are needed for uniqueness.

The second thing I have learned in this course is the implementation of SQL functions such as concat, substr, lower, upper, and format along with math and numeric functions like ABS and MAX. These functions allow different operations on the database. In addition to this are the aggregate functions which are mostly used along with the GROUP BY clause. These functions were very useful in implementing the complex queries and subqueries in Homework 3.

Third is most recently the use of indexes to retrieve data from the database accounting for performance and speed. Using more indexes will allow for faster reads/searches of the database though it will slow down data manipulation from inserts, deletes and updates. Essentially in a scenario where you would insert, delete and update numerous times the best practice is to use fewer indexes. Along with learning about this was the practice of looking through query execution plans on MYSQL to identify which indexes are used, how the table was accessed and the order in which a table was read.

Fourth is also most recently the implementation of entity relationship diagrams. These diagrams are the first step in designing a database. They include an entity in most is a noun or a concept or an activity, the relationship which is how the two entities function together, and the attributes which are the properties of the entity. There are strong and weak entities, a strong one has one or more identifiable attributes and a weak one does not have one. In MYSQL there are ways to create an ER diagram by creating a model in the workbench. After creating one you can create tables that correspond to the ER diagram that was designed.

Lastly I learned about normalization which is a way to reduce redundancy and the overall organization of data. Normalization involves breaking down a larger table into smaller manageable tables. There are different levels of normalization. First normal form which involves a table having a primary key as every non-key column depends on a primary key and there are no duplicate rows. Second normal form is when all the non-key columns depend on the whole primary key, the third normal form involves non-key columns depending only on the key. The other form is Boyce-Codd Normal Form which involves being in third normal form and whenever a column such as column A depends on column B, B is unique.

List at least 3 questions you still have about databases.

How are companies communicating with database designers? What are the most common instructions given by the companies in order to create a database for them?

It was barely covered in the book but what are the fourth and fifth normal forms of normalization?

The class has mostly been covering relational databases, how does a non relational database function?

 

  

Comments