Posts

Showing posts from January, 2026

week 18 cst363 week 2

 This week we reviewed sql functions and referential integrity. functions are scalar or aggregates, like CONCAT or GROUP BY. referential integrity refers to different kinds of constraints we can place on tables. primary keys must be unique and not null unique keys can be null foreign keys relate tables by column references we can place other constraints on our data like enforcing NOT NULL and enforcing values within certain ranges.

Week 17 - CST363 week 1

 This week we setup postgres locally. Going over the basics of what is a relation and formal representation of relational algebra such as selection, projection, union. selection: get one or more rows from a table based on criterion projection: get one or more attributes from a table union: add the rows of two tables something like `select first_name from people where id > 100` is a combination of selection and projection. we are selecting rows where id > 100, and then restricting the result to just the first_name attribute: projection(selection(people,id > 100), ["first_name"])