Skip to content

Commit

Permalink
moved "Entity Integrity"
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri-yatsenko committed Sep 4, 2024
1 parent caccaf5 commit 6d2426e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions book/30-schema-design/015-default-values.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,6 @@
"schema = dj.Schema('experiment')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The resulting `schema` object refers to the schema and is then used as a decorator on classes to associate tables with your schema.\n",
"\n",
"# Table Declaration\n",
"To declare a table in DataJoint, you need to define a class that inherits from one of the base classes provided by DataJoint, such as `dj.Manual`, `dj.Lookup`, `dj.Imported`, or `dj.Computed`. \n",
"Each class type serves a different purpose, but for now, let's start with the `dj.Manual` class, which is used for tables where data is manually inserted.\n",
"\n",
"Here's a basic example of a table declaration:"
]
},
{
"cell_type": "code",
"execution_count": 5,
Expand All @@ -78,8 +65,10 @@
" ---\n",
" experiment_name = \"\": varchar(64) \n",
" experimenter_name = \"\" : varchar(30)\n",
" outside_temperature = null : decimal(4, 1) unsigned # in Kelvin \n",
" experiment_date = CURRENT_TIMESTAMP : datetime\n",
" experiment_type = \"tinkering\" : enum(\"tinkering\", \"time dilation\", \"wormhole traversal\", \"teleportation\")\n",
" experiment_type = \"tinkering\" : enum(\"tinkering\", \\\n",
" \"time dilation\", \"wormhole traversal\", \"teleportation\")\n",
" \"\"\""
]
},
Expand Down

0 comments on commit 6d2426e

Please sign in to comment.