Posts

Showing posts from September, 2025

Learning Journal week 4

This week marks the halfway point of the course, and looking back, I can already see how much I’ve learned about SQL and databases. Here are five key things I’ve taken away so far: I learned how to create tables using CREATE TABLE and define data types for each column. That helped me understand how important it is to plan out a table’s structure before adding data. I got more comfortable using SELECT statements to query data, especially with WHERE , ORDER BY , and GROUP BY . These commands make it possible to filter and organize results in useful ways. I practiced different types of joins—inner, left, right, and full—and how they connect data from multiple tables. This was confusing at first, but now I can see how powerful joins are for real-world queries. I learned about primary keys and foreign keys, and how they keep relationships consistent between tables. That made me realize how databases maintain order and prevent duplicate or missing links. I discovered how aggr...

Week 3 learning journal SQL

  This week I learned more about how SQL views work and how they compare to regular tables. An SQL view is essentially a saved query that behaves like a virtual table. I can use it to simplify complex queries, provide a layer of security, or just make my code easier to read. Views are similar to tables because I can query them using SELECT statements and treat them like they store data. However, they don’t actually hold physical data the way tables do. Instead, they pull data dynamically from the underlying tables. Another difference is that while I can insert, update, or delete rows in a table, those operations are usually limited or not possible in views, especially if the view is based on multiple tables or includes aggregate functions. Views also don’t have primary keys like tables do, since they aren’t storing unique rows themselves. Now that we’ve wrapped up SQL, I’ve also been reflecting on how it compares to other programming languages I’ve studied, like Java. One similar...

Week 2 Learning Journal SQL

1. Example of a join that does not use keys English sentence: Find all pairs of students and instructors where the student’s total credits are greater than the instructor’s salary divided by 1,000. SQL Query: SELECT s.name AS student_name, i.name AS instructor_name, s.tot_cred, i.salary FROM student s JOIN instructor i   ON s.tot_cred > (i.salary / 1000);  In this case, the join is not based on primary/foreign keys but on a comparison condition ( > ). It shows a scenario where a logical relationship (credits compared to salary) is more important than a structural relationship between tables. 2. My opinion of SQL as a language I think SQL is a very powerful and flexible language because it allows you to describe what data you want instead of how to compute it step by step. The declarative nature of SQL makes it easy to write complex queries with relatively little code. Once you understand the fundamentals (SELECT, FROM, WHERE, JOIN, GROUP BY, ORDER BY), you can ac...

CST-363- Intro to databases. Week 1 Learning Journal

  1. Relational database tables vs. spreadsheets At first glance, relational database tables and spreadsheets look alike since both use rows and columns to organize information. However, the key difference is how they handle data relationships and scalability. A spreadsheet is mostly flat — each sheet is independent, and relationships between cells or sheets must be manually set up and maintained. In contrast, relational databases allow you to link tables together using keys, enforce data integrity with rules, and handle large amounts of data more efficiently. Databases also support multiple users accessing and modifying data at the same time, which spreadsheets aren’t designed to handle reliably. 2. Why databases are worth the investment of time Databases take more effort to install, configure, and learn than just writing to a file, but the benefits are significant. They provide structure through schemas, which helps maintain consistency and prevent errors. They allow powerful que...