Posts

Showing posts from September, 2024

CST 363 Week 4

In the past four weeks, I’ve gained a lot of knowledge about databases and SQL. The labs, particularly the Java ones, were enjoyable and fun. I didn’t expect to build a database system using Java, but it’s been valuable to understand database internals. Here are the five key things I learned: - Indexes - Normalization - Database design - Building a database system using Java - Using the Workbench, a different software from Toad (Oracle) My question is about the proper use of databases in large systems. For instance, if I’m building an enterprise application with multiple client-side apps, should I build the backend in the database using PL/SQL and stored procedures, or should I have the business logic written in Java or other languages and expose an API?

CST 363 Week 3

 An SQL View is a table based on the result of an SQL query or Script. It gets its data from one or multiple tables. An interesting use for views is getting what you want from multiple tables or just one table in a specific way using scripts that can have complex calculations.  An example of would be if you have multiple tables and you want to get the data organized in one place. Even though this can be done without really creating a view, simply by using JPA to create your query or script, but sometimes it's easier to create the logic in SQL and then just read from the view directly into your java service layer.  SQL is an interesting language, it has a lot of similarities to java and other languages that I used in the past like python and swift but it also has its uniqueness. Java is an object oriented general purpose programming language while SQL is table based language. In my opinion writing SQL is a lot easier and more efficient for data processing and getting thing...

Week 2 CST363

I appreciate how flexible SQL can be when it comes to joining tables on any column or predicate. The idea that SQL joins don't always have to rely on primary and foreign keys is interesting as there are scenarios where other columns might be more relevant for a join. For example, if you wanted to join two tables based on the date column instead of keys, that would make sense when analyzing data trends over time. an  Example : English : Join the  orders  table and the  Shipped_Dates  table to find all orders that were shipped after their order date. SQL : SELECT Orders.OrderID, Shipped_Dates.ShipDate FROM Orders JOIN Shipped_Dates ON Orders.OrderDate < Shipped_Dates.ShipDate; What I find interesting about SQL is its simplicity in expressing complex operations. It’s a language that, although a bit technical, can sometimes feel quite intuitive once you understand the fundamentals of querying and table relationships. However, translating English questions ...

CST 363 Week 1

 This week has been really eventful and insightful, I am loving the structure of this class and the information we will learn. As someone who has been using database for quite a while, this is a great refresher. I have been using Oracle databases at work for the past year but I haven't learnt about it in detail.  1. The difference between databases and spreadsheets comes in its functionality and structure. Databases enforce strict data types and relationships between tables using constraints like the primary key and foreign key. On the other hand, spreadsheets are more flexible and doesn't have the same enforcement. One other major difference is that using a database allows multiple users to work on it without having to face issues like when working on a single spreadsheet.  2. Even though installing and configuration a database and learning how to use it is more complicated that just reading and writing data to a file, using a database ensures data integrity by enforcing...