Skip to content

Commit

Permalink
Rename section database to databases.
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri-yatsenko committed Sep 3, 2024
1 parent eb314ab commit 3d03974
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
File renamed without changes.
20 changes: 15 additions & 5 deletions book/35-example-designs/010-sales-database.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,36 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Sales Database"
"# 02 Sales Database\n",
"\n",
"This is the classic sales database provided as part of the MySQL tutorial. Distributed here without change under fair use for the purposes of instruction.\n",
"\n",
"http://www.mysqltutorial.org/mysql-sample-database.aspx"
]
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pymysql\n",
"import os\n",
"pymysql.install_as_MySQLdb()\n",
"\n",
"connection_string = \"mysql://{user}:{password}@{host}\".format(\n",
" user=os.environ['DJ_USER'],\n",
" host=os.environ['DJ_HOST'],\n",
" password=os.environ['DJ_PASS']\n",
")\n",
"\n",
"%load_ext sql\n",
"%config SqlMagic.autocommit=True\n",
"%sql mysql://root:[email protected]"
"%sql $connection_string"
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit 3d03974

Please sign in to comment.