Posts

Showing posts from September, 2025

CST-363 Week 4

  Briefly summarize 5 things what you have learned in the course so far.   I learned how to query data using MySQL. (select, update, delete statements, etc.) I learned more about the inner workings of SQL by using Java to implement a simple database. Predicates are implemented using a tree data structure, indexes are implemented using a B+ tree data structure. I learned how to use views and subqueries in SQL, which allows us to simplify complex queries. I learned how indexes can be used in a database to improve performance of lookup queries but may be detrimental if a table is often updated as the corresponding index will also have to be updated, affecting performance. I learned how to optimize ER designs by following normalization rules, which will prevent update anomalies and prevent the duplication of unneeded data. List at least 3 questions you still have about databases. How do we use non-relational databases, such as NoSQL? How are complex joins implemented in datab...

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) ? An SQL view can be used to simplify complex queries. They cannot be updated the same ways a table can. 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 data (data with latitude and longitude) coordinates, and more. But take a minute to think about how SQL compares to other programming languages such as Java.  What features are similar , and which are present in one language but not in the other?  For example,  Java has conditional if statements which are similar to SQL WHERE predicates,  the SELECT clause is similar to a RETURN statement in that it specifies what data or expression values are to be returned in the query result (althou...

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 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. You want a combination of ingredients to create a food item. Ex: SELECT f.name, i.amount, i.name FROM food f CROSS JOIN ingredient i; What is your opinion of SQL as a language?  Do you think it is easy to learn and use?  When translating from an English question to SQL, what kinds of questions do you find most challenging? I think SQL is not very difficult to learn. Some of the more challenging questions are ones that involve multiple JOIN statements, which may be a bit more difficult to think of an abstract solution.

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? One of the biggest differences is that relational databases can be restored on failures. Relational databases also use SQL to retrieve and insert data. 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?  Databases force data integrity and ensure it is consistent across programs. Databases can also restrict data to a program based on security rules. Databases can reduce redundancy and inconsistency.  What do you want to learn in this course that you think will be useful in your future career?  I think I would like to learn how to translate English into valid SQL queries/maybe accessing databases asynchronously as practically every company will have a...