Saturday, March 26, 2016

CST 363 Week 4

Week 4

This week was all about normal forms regarding relations in a database. This week was pretty informative for me. I understand most of these aspects and was actually practicing them a lot in my daily life, but I never knew the names for any of these or the defined normal form steps that would help logically break these up. I was just reasoning about it on my own and eventually getting to a databases that are very close to Boyce-Codd normal form (if not, actually in BCNF). We didn't get to the higher normal forms, but hopefully I'll get to dive into that in the future.

For the exercises and assignments this week I utilized the draw functionality in Google Docs and found it extremely useful and will hopefully find more cases to use it in the future. Although, I probably should have started familiarizing myself with Dia. But, I think Dia will be useful for schema diagrams (assuming we're getting there).

The content from this week is exactly the kind of content I was hoping to get out of completing my bachelor's degree. There are so many concepts and theories that I don't feel I was able to fully know from the bootcamp, but this is making me start to feel like I made the right choice in returning to school to get my degree.

Below are the normal forms that we covered and what they indicate for each table.
  • First normal form (1NF): A table is in first normal form when there aren't any repeating groups, the keys are defined, and all of the attributes are dependent on the primary key.
  • Second normal form (2NF): A table is in second normal form when it meets the requirements of the first normal form and there are no partial dependencies (or no attributes are dependent on a portion of the primary key).
  • Third normal form (3NF): A table is in third normal form when it meets the requirements of the second normal form and there are no transitive dependencies (or no non prime attribute depend on another non prime attribute).
  • Boyce-Codd normal form (BCNF): A table is in Boyce-Codd normal form when no primary key (or portion of the primary key) depends on any non prime attributes. The book describes this as normal form as "when every determinant in the table is a candidate key."

Sunday, March 20, 2016

CST 363 Week 3

Week 3

I'm already pretty familiar with using primary and foreign keys in tables and writing queries on tables with those constraints, so the material this week has been pretty quick for me to get through.

Overall, I've enjoyed this section more than the others up until this point since we've had more hands-on assignments. It's difficult to stay engaged when you're not really trying to accomplish anything. I also enjoyed that we had some examples to work on that didn't have to do with students and classes (they're in every class and they're always the most boring to look at).

We're sending a spool file for credit on our homework and I think that these commands are very useful, so I'll post those here for safe keeping:

-- Display the SQL statement along with the result of
-- the execution within the command line.
set echo on

-- Store the output of running the SQL script to a
-- plain text file in a specified location. The txt
-- file is useful for debugging purposes.
spool C:\Users\{user}\{location}\{file name}.txt

-- INSERT SQL COMMANDS HERE

-- Disable spool (stop printing to specified file).
spool off

Sunday, March 13, 2016

CST 363 Week 2

Week 2

I got my new computer running Windows this week (just in time to install Oracle)! I upgraded it to Windows 10 and have played with it a bit to get more familiar with Windows. There were a couple of hiccups in the installation of Oracle, but overall it wasn't too bad once the two installation directories were properly merged after unzipping them (heh).

As for this week's content, it's been pretty basic. We covered relational algebra and most of the basic syntax for SQL statements. There were a couple of pieces that were new to me, such as the "flashback" command that was mentioned in the professor's slides (textbook doesn't cover it). Also, the idea of division of tables required some extra research to understand. I ended up stumbling upon this slideshow that had some good examples that helped me understand it.

The structure of this course has been very easy to follow. I like that each week is broken up into smaller sections. However, I'm finding that I don't like the textbook. The book felt extremely dumbed down in the relational algebra section. I would have appreciated some examples of how to format written relational algebra statements and some explanations of the symbols commonly used would have helped as well.

Wednesday, March 2, 2016

CST 363 Week 1

Week 1

Our first week of this course has been pretty mild. The assignments opened a week early, so I was able to get a head start. The majority of the material we covered had to do with the pitfalls when data is repeated and the anomalies that occur from that. We also learned the various types of keys in a table (primary, foreign, composite, etc.).

I'm very glad everything opened up early this week. It gives me more time to get familiar with this new course structure. It's also helpful because I also started another course (called Operating Systems) and the junior college near me and I'm very nervous about that one.

This week we were told that we will need a PC to install oracle (PC as in not mac from what I could tell), but I only have apple computers at home. I had considered trying to do something like run a virtual machine on my mac, but I decided that I should just by a machine that I can play with for development purposes. I found a refurbished dell on overstock and ordered that. I'm hoping it will come in time for me to get set up on it and install Oracle.