Posts

CST 363 Week 3

What is an SQL view.  How is it similar to a table? In what ways is it different (think about primary keys,  insert, update, delete operations) ? A view is a saved select query and it is not its own table in the database. Table views allow users to view specific columns of data without being exposed to unnecessary information. Views also allow for complex queries to be saved. Issues can arise when primary key columns (if they exist) are not present in the view. If a user tries to insert a value directly into this kind of view, it would fail because values would not be allowed to be inserted into original tables with null primary keys. Similar issues can also occur when a user attempts to delete rows from a view that contain primary keys from other tables. We have completed our study of SQL for this course.  This is not to imply that we have studied everything in the language.  There are many specialized features such as calculating rolling averages, query of spatial ...

CST 363 Week 2

 SQL has the flexibility to join tables on any column(s) using any predicate (=, >, < ).    Most of the time the join will use equality between a primary and foreign key.   Think of an example where joining on something other than keys would be needed.  Write the query both as an English sentence and in SQL.  If you can't think of your own example, search the textbook or internet for an example An example of joining 2 tables without a common column or matching key is using a cross join. A cross join creates a new table from all possible combinations of 2 existing tables. This may be practical for pricing computers based on its model and size of its screen. The query below would create a record that represents a possible combination of computer model and screen size  along with its given price. SELECT model, screen_size, computer.price + screen.price FROM computer CROSS JOIN screen; What is your opinion of SQL as a language?  Do you thin...

CST 363 Week 1

Relational database tables and spreadsheets look similar with both having rows and columns.  What are some important differences between the two? Functions within a relational database can ensure partially handled transactions do not cause inconsistencies in the database. Databases also have the ability to enforce relational and business rules that may be difficult to incorporate with excel.  With excel, a user could input records that violate these rules and break referential integrity. Also, spreadsheets in excel can not relate data to other spreadsheets like how  database tables can relate data with other tables with the use of foreign keys. Installing and configuration a database and learning how to use it is more complicated that just reading and writing data to a file.  What are some important reasons that makes a database a useful investment of time?  The features of a database prevent errors in database operations from causing inconsistencies in data. Th...

CST 338 Week 7/8

    Look back at the HW1     Looking back at the jotto assignment, I would change the order I worked problems in. If I did this again, I would work on smaller methods first instead of working on the prompt in order. While working on this, I found myself working on multiple methods at once because I would be working on a larger method and then discover I needed another method for the large method to work. I also would spend more time making sure the print format was correct when initially writing the code. I had to go back many times to make adjustments to my print statements so it matched the prompt. If I was more careful, I would have spent much less time on revising my code. Since this assignment, I have become much more careful in reading the prompts. Getting a good understanding of the prompt has provided me with a better understanding of what I need to do on future assignments.   Highlight at least two victories.       I feel like I...

CST 338 Week 5

 1. Who did you work with? Rene, Martin, and Krithika 2. What was your strategy for solving the Markov assignment?     I started off by reading the prompt thoroughly. Once I had a good idea about what I needed to do, I began writing a todo list. I started working on methods in the order they appeared on the prompt, but if a larger method required the use of a smaller method, I would finish the smaller method first. Once the program was providing output that looked correct, I used the unit test to help me find any discrepancies in my code. 3. What was THEIR strategy for solving the Markov assignment My group mates took a similar approach to the assignment as I did. They all began by thoroughly reading the prompt. They all worked on the easier methods first, then tackled the larger methods. 4. How would you change your strategy having worked on the assignment? One thing I thought I should do in the future is not rely on pre-made unit tests to help me fix my code. ...

CST 338 Week 4

                 This week I worked with Rene, Martin, and Krithika. I read through the entire prompt first and then I started writing my code. I worked in order that methods were listed in the instructions. If a method required the use of another method, I would continue writing the code as if it was already implemented. I would then work on that method afterwards. I wrote the entire code first and then debugged. This worked well on the smaller projects but was a horrible idea for the big library project. Rene worked on the project in sections and he started off with the smaller methods first. This helped him understand the project better and reduced how many times he had to jump between tasks. Martin worked in a similar way. He tackled easier problems first and then worked on difficult problems. Krithika started off by writing out class methods in pseudo code first. This strategy helped her get a better idea about what she needed to ...

CST 338 Week 3

Summarize the feedback you received about your code Identify any trends you noticed when evaluating the code of others such as: everyone struggled with sorting or unit tests that were hard to pass Was any part of the code a struggle for YOU? Was any part of writing the code easy for YOU? What is your biggest victory?     This week my group mates reviewed some of my code from the Reader class and Book class assignment. My code ran as intended and they thought that my code was well structured. They also pointed out some small issues in my code. My code passed the unit tests, but these issues may affect how well others can read my code in the future. I think these minor issues stemmed from me not being as careful as I should have been. In the future, I will take my time to improve the readability of my code by doing things, such as leaving notes throughout my code, so others can better understand what I am trying to do. Most of the work I reviewed with my classmates loo...