Sprint 5 Tech Talk Notes | SQLAlchemy Code | SQLConnect Code | API Tech Talk 2 Notes | Sprint 5 CRUD Review | Big Idea 4 Learnings |
Sprint 5 1-8 Tech Talk Notes
What I learned from Mr. Mortensen's tech talk 2
Import and Setup:
- in “_ _ init _ _”, objects and db objects are stored
- Lines like database, app.config[SQLALCHEMY_TRACK_MODIFICATIONS] and others are found in _ _ init _ _ (imported)
- Don’t need to redefine
DB Models:
- Class: Basis for OOP coding (encapsulator for code)
- Way to purify the code and keep it separate from rest of the code
- Reference code through this class
- db.model: addition of code from different library that creates the SQLite table
- Pull and push from a table (DB)
- Data types defined when adding new data to table
- Class is singular, table is plural (example: class User and table Users)
CRUD
- Important for updating, reading, creating, and deleting