CS257 Software Design Friday, 25 April 2025 + Misc - You'll get a blitz of grading emails from me over the weekend - Midterm - Project described - Database designed and implemented/populated - API designed and implemented - Post-midterm - Turn focus to user interface - HTML/CSS/Javascript + Questions + Database kickoff - What's postgresql? a particular Database Management System (DBMS) software that manages & lets you interact with a database - What's postgres? in practice: another, shorter name for postgresql - What's a daemon, and how is that idea relevant to postgres? "daemon" = "server"; "server" is confusing sometimes--is it software or hardware? a process (i.e., a running program) that listens for requests and then fulfills those requests the postgres daemon waits for database requests - What's SQL? query language for interacting with a database "structured query language" we're going to learn a tiny sliver of SQL, mostly SELECT statements - What's psql? a client (i.e., client software) that can send queries to the postgres daemon handy for development and testing; mostly not used for applications - Tables the basic unit of organization in an SQL database 2-dimensional grids columns have names and types - Queries SELECT * FROM authors show all fields/columns (*) for all rows in the authors table SELECT * FROM authors ORDER BY surname SELECT given_name, surname FROM authors ORDER BY surname SELECT given_name, surname FROM authors WHERE surname LIKE 'B%' ORDER BY surname ... - Design principles for starters - think "what are my main thing types?" and give them each a table e.g., books & authors note: a book can have many authors; an author can have many books "many-to-many relationship" - how can I pick tables to eliminate duplicate data? + Lab: turning a messy CSV file into postgres tables + Have a good weekend!