Intro to Object Relational Mappings with SQLAlchemy
CSCI 344: Advanced Web Technologies
Spring 2023
Announcements
Outline
Outline
Database Basics
More database basics...
Quick Crash Course on Querying
Review of Tutorial 10
Practice Queries
SQL: INSERT
INSERT INTO table_name(column1, column2, …)
VALUES (value1, value2, …);
SQL: UPDATE
UPDATE table_name
SET column1 = value1,
column2 = value2,
column3 = value3,
...
WHERE condition;
SQL: DELETE
DELETE FROM table_name
WHERE condition;
Outline
What is SQLAlchemy?
SQLAlchemy is a python abstraction that makes communication with databases “easier.”
What is a Model?
This approach – known as “Object Relational Mapping” – allows a more convenient way to manipulate data via the Python language.
Outline
Download and Configure the HW7 Starter Files
Outline