Skip to main content

Posts

Three Most Important Things I Learned in CST363-30: Intro to Database Systems

In CST363-30: Intro to Database Systems , I learned many new concepts that changed the way I think about data and software development. The first important thing I learned was how relational databases like MySQL work. I now understand how to create tables, define primary and foreign keys, and use SQL commands such as SELECT , INSERT , UPDATE , and DELETE to manage data. Learning how to design databases using Entity-Relationship (ER) diagrams and normalization helped me see how organized structures reduce redundancy and improve data accuracy. This part of the course gave me a strong foundation for understanding how information is stored and related inside real business systems. The second major thing I learned was how to connect databases with Java using JDBC . This skill showed me how programming languages interact with databases to build full applications. I practiced writing Java programs that could add, read, or update data in a MySQL database, and I learned how to handle tra...

Choosing Between MongoDB and MySQL

This week I learned more about how MongoDB and MySQL are both powerful tools for managing data, but they serve different purposes. MySQL is a relational database that organizes data into tables with rows and columns. It uses SQL (Structured Query Language) to define and manage data, which makes it very structured and reliable. MongoDB, on the other hand, is a NoSQL database that stores data as documents in a flexible JSON-like format . It does not require a fixed schema, so it is easier to change or add new data types as needed. Both databases are similar because they can handle large amounts of data, support indexing for faster searches, and allow users to perform queries to get specific information. They are also widely used in modern applications and can be connected to programming languages like Java, Python, or C++. However, the key difference is how they store and organize data. MySQL is best when data has clear relationships, such as in school systems, banking, or employee ...

Java Meets MySQL: A Match Made in Code

This week, I learned how to connect a Java program to a MySQL database using JDBC. I practiced creating a connection, inserting new data, selecting records, and managing transactions with commit and rollback. I also learned how to handle SQL exceptions and make the program give clear error messages when something goes wrong, such as duplicate IDs or missing departments. Another important part was understanding how to add the MySQL connector JAR file or dependency in my project so the driver loads correctly. Overall, this week helped me understand how Java interacts with databases and how to make programs that safely read and write data.

Understanding a Slow Index in Database Queries

 In database systems, indexes are used to make queries faster by helping the system find data quickly, similar to how a book index helps you find pages faster. However, the author says an index can still be “slow” when the database needs to do extra work after using the index. For example, if the query matches many rows or if the data is stored in different parts of memory, the database must open and read each row separately, which takes time. This idea connects to what I’ve learned in computer science and my experience with systems like SAP and MES, where performance depends not only on structure but also on how data is accessed. So, a “slow index” means the index works, but the process of fetching all the related data makes the query slower overall.

WHERE I’m At: Midpoint Lessons in SQL and Beyond

 Halfway through this course, I can see how much I’ve learned and how it connects to both my past experiences and my future goals. One of the biggest takeaways has been understanding how SQL views work. I now know that a view is like a virtual table, useful for simplifying queries and presenting data, but usually read-only since it doesn’t store data itself. I’ve also learned the importance of normalization, which helps remove redundancy and ensures cleaner updates by splitting one large table into multiple related ones. Another valuable lesson has been comparing SQL with Java: SQL is declarative and focuses on the “what,” while Java is procedural and focuses on the “how.” This comparison helps me appreciate each language’s role in problem-solving. I’ve also seen firsthand how powerful SQL can be in real workflows compared to spreadsheets, such as enforcing business rules like course eligibility in a single query. Beyond SQL, I’ve grown as a programmer in general—planning better, w...

Understanding SQL Views and How SQL Compares to Java

In SQL, a view is like a “virtual table.” It looks and acts a lot like a real table—you can run SELECT queries against it, join it with other tables, and use it to simplify complex queries. A view is created with a saved query, and whenever you use the view, the database runs that query in the background. Views are similar to tables because they let you organize and present data in rows and columns. But they are different in important ways. A view usually does not store data itself, so it does not have a primary key. This also means you often cannot do direct insert, update, or delete operations on a view unless it meets special rules (like being based on a single table without joins). In most cases, views are for reading and organizing data, not for changing it. As we wrap up our SQL study, it’s useful to compare SQL with a language like Java . Both can filter data or control what is returned. For example, a Java if statement is a little like an SQL WHERE clause—they both decide ...

How My Job Experience Shapes the Way I Learn SQL

As a college student working toward my Computer Science degree, I’ve been lucky to learn SQL both in the classroom and on the job. At work, I’ve used tools like Smartsheet and an LMS to track training data, and those experiences showed me the importance of being able to ask good questions of data. Now that I’m studying SQL more deeply, I see how powerful it is compared to just managing spreadsheets. What I find most interesting is that SQL isn’t only about joining tables by IDs. Sometimes real-world logic is more complex. For example, I’ve seen training systems where eligibility isn’t just a key match, but based on conditions—like “employees can only register for courses if their years of experience exceed the course’s minimum requirement.” In SQL, I can capture that logic with a simple query: SELECT e.employee_id, e.name, c.course_id, c.title FROM employees e JOIN courses c ON e.years_experience > c.min_years_required; This goes beyond what I could easily do in Smartsheet or Exce...