diff options
| author | Simeon Simeonov | 2022-10-12 15:33:50 +0200 |
|---|---|---|
| committer | Simeon Simeonov | 2022-10-12 15:33:50 +0200 |
| commit | 4290701502d378a7dcb3414d32fabe2b8e88edd0 (patch) | |
| tree | de17dea61c20b26e728e1c154112581de95b53a8 /notebooks/sqlalchemy | |
| parent | 615cd66a873853f335177ec8b307c35be17d4b36 (diff) | |
Update Python OO and SQLAlchemy notebooks
Diffstat (limited to 'notebooks/sqlalchemy')
| -rw-r--r-- | notebooks/sqlalchemy/sqlalchemy.ipynb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/notebooks/sqlalchemy/sqlalchemy.ipynb b/notebooks/sqlalchemy/sqlalchemy.ipynb index 51b00ab..8bb8333 100644 --- a/notebooks/sqlalchemy/sqlalchemy.ipynb +++ b/notebooks/sqlalchemy/sqlalchemy.ipynb | |||
| @@ -288,7 +288,9 @@ | |||
| 288 | "*Table* object can be instructed to load information about itself from the corresponding database schema object already existing within the database.\n", | 288 | "*Table* object can be instructed to load information about itself from the corresponding database schema object already existing within the database.\n", |
| 289 | "This process is called *reflection*.\n", | 289 | "This process is called *reflection*.\n", |
| 290 | "\n", | 290 | "\n", |
| 291 | "If the DB schema is already defined and maintained \"somewhere else\", it may be useful to \"reflect\" the schema instead of explicitly defining it." | 291 | "If the DB schema is already defined and maintained \"somewhere else\", it may be useful to \"reflect\" the schema instead of explicitly defining it.\n", |
| 292 | "\n", | ||
| 293 | "**N.B. This is not the recommended way to use SQLAlchemy**" | ||
| 292 | ] | 294 | ] |
| 293 | }, | 295 | }, |
| 294 | { | 296 | { |
| @@ -357,6 +359,7 @@ | |||
| 357 | } | 359 | } |
| 358 | ], | 360 | ], |
| 359 | "source": [ | 361 | "source": [ |
| 362 | "## N.B. This example does NOT represent SQLAlchemy - best practice\n", | ||
| 360 | "from sqlalchemy.ext.declarative import declarative_base\n", | 363 | "from sqlalchemy.ext.declarative import declarative_base\n", |
| 361 | "\n", | 364 | "\n", |
| 362 | "Base = declarative_base()\n", | 365 | "Base = declarative_base()\n", |
