Comp 305-001/405-001: Database Administration

Spring 2024: MWF

Week 2

Homework 1: sql1.text, due Friday, Feb 9

Read the notes Introduction to Relational Databases

For those interested, here are references to Elmasri & Navathe (Chapter numberings are (7th edition)/(6th edition))

References to Elmasri & Navathe (EN). Chapter numberings are (7th edition)/(6th edition)



Introduction to Relational Databases

install company DB

create table commands, primary keys

Some simple queries

Wednesday

Where did the murder mystery go?

\dn, \dt murder.*, select max(annual_income) from murder.income;

University database

foreign keys

Friday

My tale of database woe. (\l lists all databases, \dn lists schemas)

Do you really need foreign keys? www.shayon.dev/post/2023/355/do-you-really-need-foreign-keys. It depends.

.psqlrc file

atomicity example

Joins (introduction.html#joins, introduction.html#joins2)