CS 200 Spring 202002 – StylesBEFORE lab, please read and highlight Assignment 8 Database Design (on learn.uwaterloo.ca) Adapted from Access Database Design & Programming by Steven Roman The SQL tutorial notes (on learn.uwaterloo.ca) Slides for this lecture START the lab this week by doing the SQL tutorial Topics for today relational database design when you need another table, and why SQL (Structured Query Language) a model for relational databasesPlease ask questions!2Administrivia
CS 200 Spring 202002 – StylesYou’ve seen a two-table relational database •you’ve been exposed to forms, reports, queries & data validation •you’re familiar with the termsdatabasetablerecord (aka row)field (aka column)3Assumptions for Today’s Lecture
CS 200 Spring 202002 – StylesThings to Think aboutHow does a DBMS differ from a spreadsheet?Why would I choose to use a DBMS?What are the reasons for needing more than one database table?4
CS 200 Spring 202002 – Styles5
CS 200 Spring 202002 – StylesWhy use a database at all?Obvious questions: What do I mean by “structure” in a database? What’s the payoff?6Databases – Structured Data
CS 200 Spring 202002 – StylesThe visa worksheet in the Excel assignmentis an example of a 1–table database,although we built it in Excel, not with a DBMS each ROW (“record”) holds data for a particular transaction each COLUMN holds a particular piece of data about that transaction (a “field”) we couldhave used FileMaker though for what we wanted to do,it wouldn’t have been worth the effort of learning FileMaker indeed, we could have placed the data in a Word tableor even in a text processor (eg BBEdit)...separate fields by tabs, separate records by ¶ but working with the data would have been MUCH harder — think about implementing the Actual Balance and Statement Balance columns!