Step 8 Chapter1
Step 8 Chapter1
Databases
I N T R O D U C T I O N T O D ATA B A S E S I N P Y T H O N
Jason Myers
Co-Author of Essential SQLAlchemy and
So ware Engineer
A database consists of tables
Jason Myers
Co-Author of Essential SQLAlchemy and
So ware Engineer
Meet SQLAlchemy
Two main pieces
Core (Relational Model focused)
PostgreSQL
MySQL
Oracle SQL
Many more
Driver + Dialect
Filename
['census', 'state_fact']
Jason Myers
Co-Author of Essential SQLAlchemy and
So ware Engineer
SQL Statements
Select, insert, update, and delete data
results = result_proxy.fetchall()
result_proxy is a ResultProxy
results is a ResultSet
print(first_row.keys())
print(first_row.state)
'Illinois'
stmt = select([census])
print(stmt)
Jason Myers
Co-Author of Essential SQLAlchemy and
So ware Engineer
You already...
Know about the relational model