Posts

Week 8 learning journal CST 363

Briefly summarize what you consider to be the three most important things you learned in this course. 1. I learned how to design a database using entities, relationships, and attributes. I could apply this to building an ER diagram in mySQL. This helped me to understand structure of databases and how thy connect. 2. I learned how to use SQL to create tables and insert data by using commands like select, join, and group by. Querying data helped me learn that databases are good tools for not only organizing but also analyzing data.  3. I learned that normalization is important. It taught me about constraints like pks, fks, and even how transactions keep the data reliable and accurate. 

Week 7 learning journal CST 363

Compare MongoDB with MySQL What are some similarities?  MySQL and mongoDB are both databases used to store and manage information. You can add, read, update, and delete data. They both use indexes to make searches faster and include security features to protect data. They also allow developers to connect from different programming languages like Java. Overall they both help organize and access data for applications. What are some differences?  I think mySQL and mongoDB are different in how they store and organize data. MySQL uses tables with rows and columns, while mongoDB uses documents that look like JSON files. MySQL has a fixed structure but mongoDB can store data that changes or doesn’t always follow the same format. Also mySQL is better for data that needs strong relationships and rules, while mongoDB is better for data that needs to grow and change quickly. When would you choose one over the other? I would choose mySQL when data is organized, consistent, and needs stron...

Week 6 learning journal CST 363

  Summarize what you have learned this week This past week, I learned how programming languages connect and interact with databases. I read on zybooks how SQL can be embedded into languages like C and how APIs like JDBC allow communication between programs and databases. I also practiced working with database connections. My teammates and I worked on a group project where we built a database and connected it to a local server using MySQL Workbench. We wrote Java code to run and test the connection, add data, and verify that everything worked properly. It was about completing a web application for a prescription database that connects to a MySQL database. It lets users register doctors and patients, create and fill prescriptions, and update records through a web interface powered by Spring Boot and Java , while the data is stored and managed in MySQL Workbench . It was fun collaborating and seeing how the concepts we learned in class applied to a real project. 

Week 5 learning journal CST 363

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?   Even though the database is using an index, the query can still take a long time to run, making it a "slow index". If the database has to look through a lot of matching entries in the index then get each row from the table it can take extra time because slows down  the performance . The process of following all the matches and getting the data can make it slower than expected. 

Week 4 learning journal CST 363

Briefly summarize 5 things what you have learned in the course so far.   What a database is, why we use a them instead of spreadsheets Basic SQL terms like table/row/column and how they relate How primary/foreign keys work How to join tables, group data, and use subqueries to answer questions. How to make ER diagrams, turn them into tables, and reduce duplication with normalization. List at least 3 questions you still have about databases. When is a join better than a subquery, and when is HAVING better than WHERE? How do I know when to stop normalizing (1NF, 2NF, 3NF) for a real project? Which columns should I index first, and how do I check if the index is actually used?

Week 3 learning journal CST 363

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 that acts like a virtual table, so I can query it and join it just like a real table. It is similar to a table because it shows rows and columns and I can use the same select syntax on it. It is different because it does not store data itself, it usually does not have its own primary key, and many views are read only, so insert, update, and delete only work if the view is updatable and maps each row back to one row in a base table. 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 J...

Week 2 learning journal CST 363

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. English: Match each student to any course that gives more credits than the number of credits the student has already earned SQL: select student.name, student.tot_cred, course.course_id, course.credits from  student join  course on  course.credits > student.tot_cred; 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? This is the first class where I have really focused on SQL. TO be honest, I do find...