Skip to main content

CST 363 Learning Journal Week 2

Week 2 Learning Journal Prompt:


  1. 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.
  2. 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?

 

One example that I can think of where something other than primary keys would be needed is if you were doing an analysis on a specific aspect of the data. I think it would be useful if you were to compare something like a budget where there was a budget amount and actual cost. The primary key would be the transaction ID, but the budget would be a separate entity. Something like the following:

SELECT *

FROM cost

JOIN budget USING(category)

ORDER BY category


My opinion of SQL as a language is that it is very approachable and has clear syntax that attempts to make working with database information as efficient as possible. I do think that this language is somewhat easy to use. I am still learning the syntax details, but with practice I will start to recognize the patterns and identify the proper syntax needed to achieve the right results. SQL is different from other programming languages in its structure, but it works because it is developed in a way to focus on working with database data. For myself, the most challenging thing when translating from English to SQL is understanding how the different key words work together and the proper order to piece them together to get the desired output.

Comments

Popular posts from this blog

CST311 Week 6 Journal

 This week, we developed a deeper understanding of the network control plane and explored routing algorithms such as Dijkstra and Bellman-Ford, focusing on how they determine the most efficient paths for data transfer. We also learned about the SDN control plane, which allows for dynamic network management and routing. In addition to the theory learned this week, we conducted a network lab exploring the use of a basic SDN controller using Mininet and Wireshark. We looked at how Internet Control Message Protocol (ICMP), can be used for network diagnostics, particularly for network troubleshooting with tools like ping and traceroute.

Week 5 Learning Journal

Part One:  Supporting and Commenting on Teammate's Goals I visited the following teammate's blogs and commented on their goals. Juan's Blog Vance's Blog Part Two: Possible Capstone Ideas The three ideas I have for my capstone project are two different mobile apps and one indie game. For the two apps I am thinking of creating something in Swift, the programming language of iOS. The first app is a passion project that involves a list builder for a miniature tabletop game called OnePageRules. It is an independent miniature game ruleset and already has a web version. My app would take that template and adapt it for iOS. The second app would be a simple star wars app that utilizes an online API for Star Wars call SWAPI. This API has a number of entries related to the Star Wars universe in JSON format. My app would connect to this online API, download specific pieces of data and display them in the app.  The third idea would be to create a simple side scroller game. The game ...

Leetcode Practice Reflection 1.Two Sum

LeetCode Practice Reflection - 1. Two Sum Date:   19MAY25 What I Worked on Today: Practiced doing LeetCode Problem 1.Two Sum. What I Learned: - How to use the enumerate() function - How to optimize possible solutions after considering brute force methods - How to declare a new dictionary (key value pair) Code Snippet I Wrote or Studied: class Solution(object): def twoSum(self, nums, target): seen = {} for i, num in enumerate(nums): compliement = target - num if compliment in seen: return [seen[compliment], i] seen[num] = i In My Own Words: This function takes in a list of numbers and will return the index of the two numbers that add up to the provided target value. The way this program works is that it creates a dictionary called "seen". It will then iterate through the list of numbers and use the enumerate function to keep track of the index and the value of the specific item in the provided list. The for loop will calculate the compliment numbe...