Posts

Showing posts from October, 2025

CST-363 Week 8

Briefly summarize what you consider to be the three (3) most important things you learned in this course. Learning MySQL to query/update data from a database. Learning about alternative databases, such as the NoSQL database, and using MongoDB/Java to create a web application. Learning to normalize a database to reduce redundancy in a database by following Third Normal Form or BCNF. 

CST-363 Week 7

Compare MongoDB with MySQL.  What are some similarities?  Both have query projections, unique keys, indexes and explain queries What are some differences?  MongoDB does not have transactions, but they can still be atomic. Both have different languages for querying data. When would you choose one over the other? \ MySQL should be used if your data is mostly relational. MySQL has more support for making more complex queries or joins. If your data is not structured, MongoDB may be more beneficial.

CST-363 Week 6

 This week I learned how to connect to a database using Java via JDBC. A connection must be created using the database's url, username, and password. SQL statements can be executed in Java using Statements or PreparedStatements. Running executeStatement will return a ResultSet which can be used to read from the returned rows. Statements should always be sanitized to prevent SQL Injection and values should never be concatenated into the SQL string. Transactions are committed automatically but can be turned off using setAutoCommit(false) 

CST-363 Week 5

  The web site   "Use the Index Luke"  has a page on "slow indexes".    https://use-the-index-luke.com/sql/anatomy/slow-indexes Links to an external site.   If indexes are supposed to speed up performance of query, what does the author mean by a slow index?  There may be additional costs that need to be made depending on the query. The author states that leaf node chains and table access may slow down lookups. If there are multiple matching entries in a lead node, the database will have to continue to reading data in the next leaf node. If there are multiple rows in a table that is pointed to from an index, each one would need to be read, decreasing performance.