Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add course folder #43

Merged
merged 41 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1137530
start the database course section
dimitri-yatsenko Aug 22, 2023
a8778be
add University and FakeIt to db-course
dimitri-yatsenko Aug 30, 2023
168ac6d
add 002-Tables
dimitri-yatsenko Sep 12, 2023
245df67
add 003-ForeignKeys
dimitri-yatsenko Sep 12, 2023
afa1072
add ForeignKeys
dimitri-yatsenko Sep 13, 2023
1e8b025
add 004-Design
dimitri-yatsenko Sep 20, 2023
b579b34
Merge branch 'main' of https://github.com/datajoint/datajoint-tutoria…
dimitri-yatsenko Sep 26, 2023
07a9504
clean up 004-Design
dimitri-yatsenko Sep 26, 2023
48efdf3
query notebooks
dimitri-yatsenko Sep 27, 2023
1513263
expanded 004-Design
dimitri-yatsenko Sep 28, 2023
d721736
add notebooks from last year's course
dimitri-yatsenko Oct 2, 2023
e1359dc
re-organize tutorials
dimitri-yatsenko Oct 2, 2023
f841aa4
Merge branch 'course' of https://github.com/dimitri-yatsenko/datajoin…
dimitri-yatsenko Oct 2, 2023
f62122f
merge
dimitri-yatsenko Oct 2, 2023
396f188
rename notebooks
dimitri-yatsenko Oct 2, 2023
b746d56
rename notebooks
dimitri-yatsenko Oct 2, 2023
51502c8
restore 005-Queries
dimitri-yatsenko Oct 2, 2023
c54fd1e
homework 5
dimitri-yatsenko Oct 2, 2023
9857f30
specify homework 5
dimitri-yatsenko Oct 3, 2023
43451ed
minor correction
dimitri-yatsenko Oct 3, 2023
496d26d
Merge branch 'main' of https://github.com/datajoint/datajoint-tutorials
dimitri-yatsenko Oct 17, 2023
031fe07
Merge branch 'master' into course
dimitri-yatsenko Oct 17, 2023
24392c4
add JuliaSets to db-course
dimitri-yatsenko Oct 17, 2023
cc420de
Merge branch 'main' of https://github.com/datajoint/datajoint-tutoria…
dimitri-yatsenko Oct 17, 2023
71fea05
add Lecture006
dimitri-yatsenko Oct 18, 2023
e0a55bd
add 006-SampleSales
dimitri-yatsenko Oct 24, 2023
ab8a134
add 006-Joins-HW
dimitri-yatsenko Oct 24, 2023
726530f
Add Nations Database
dimitri-yatsenko Oct 24, 2023
2ea7abb
add example databases: hotel, university
dimitri-yatsenko Oct 24, 2023
c9ca662
Aggregations
dimitri-yatsenko Oct 25, 2023
3f7e7a7
complete Homework 6
dimitri-yatsenko Oct 25, 2023
c5de545
add Assignment 7
dimitri-yatsenko Oct 31, 2023
30bde5a
more on aggregations
dimitri-yatsenko Nov 1, 2023
2fe820a
add Transactions, Defaults, DesignPatterns
dimitri-yatsenko Nov 7, 2023
010f87c
Merge branch 'datajoint:main' into course
dimitri-yatsenko Nov 7, 2023
169733c
add homework 8
dimitri-yatsenko Nov 14, 2023
66c5445
Add relational division and final
dimitri-yatsenko Nov 15, 2023
b9c5706
clean up RelationalDivision
dimitri-yatsenko Nov 23, 2023
98903d7
finished the Final
dimitri-yatsenko Nov 24, 2023
997dde4
add solutions for HW7
dimitri-yatsenko Nov 29, 2023
d240175
Merge branch 'datajoint:main' into course
dimitri-yatsenko Apr 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
580 changes: 580 additions & 0 deletions db-course/000-Connect.ipynb

Large diffs are not rendered by default.

278 changes: 278 additions & 0 deletions db-course/000-ConnectCursors.ipynb

Large diffs are not rendered by default.

254 changes: 254 additions & 0 deletions db-course/000-ConnectSQL.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import pymysql\n",
"pymysql.install_as_MySQLdb()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"%load_ext sql\n",
"%config SqlMagic.autocommit=True"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"connection_string = \"mysql://root:[email protected]\""
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"%sql $connection_string"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" * mysql://root:***@127.0.0.1\n",
"1 rows affected.\n"
]
},
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%sql\n",
"\n",
"CREATE SCHEMA IF NOT EXISTS university"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" * mysql://root:***@127.0.0.1\n",
"0 rows affected.\n"
]
},
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%sql \n",
"\n",
"USE university "
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" * mysql://root:***@127.0.0.1\n",
"0 rows affected.\n"
]
},
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%sql\n",
"\n",
"CREATE TABLE person (\n",
" person_id int NOT NULL,\n",
" first_name varchar(30) NOT NULL,\n",
" last_name varchar(30) NOT NULL,\n",
" PRIMARY KEY(person_id)\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" * mysql://root:***@127.0.0.1\n",
"2 rows affected.\n"
]
},
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%sql\n",
"\n",
"INSERT INTO person VALUES (2, \"Jane\", \"Doe\"), (3, \"Alice\", \"Cooper\") "
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" * mysql://root:***@127.0.0.1\n",
"3 rows affected.\n"
]
},
{
"data": {
"text/html": [
"<table>\n",
" <thead>\n",
" <tr>\n",
" <th>person_id</th>\n",
" <th>first_name</th>\n",
" <th>last_name</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <td>1</td>\n",
" <td>Alice</td>\n",
" <td>Cooper</td>\n",
" </tr>\n",
" <tr>\n",
" <td>2</td>\n",
" <td>Jane</td>\n",
" <td>Doe</td>\n",
" </tr>\n",
" <tr>\n",
" <td>3</td>\n",
" <td>Alice</td>\n",
" <td>Cooper</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>"
],
"text/plain": [
"[(1, 'Alice', 'Cooper'), (2, 'Jane', 'Doe'), (3, 'Alice', 'Cooper')]"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%sql\n",
"\n",
"SELECT * FROM person"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.17"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading
Loading