Skip to content

Commit

Permalink
designing for maintainability
Browse files Browse the repository at this point in the history
  • Loading branch information
ptyadana committed Jan 20, 2021
1 parent 58059db commit 8d418da
Showing 1 changed file with 61 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Challenge"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"- Add a new attribute, expore code that is a string of lenght 15, to products table\n",
"\n",
"- Ten new products with export_code set to \"Restricted\" must be added\n",
"\n",
"- Existing products must have their export_code column set to \"Unrestricted\"\n",
"\n",
"- Describe DDL commands required to implement these changes"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Solution"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"- ALTER TABLE ... ADD COLUMN to add export_code\n",
"- 10 INSERT statements with product data\n",
"- UPDATE statement to set export_code to \"Unrestricted\" WHERE export_code IS NULL"
]
}
],
"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.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

0 comments on commit 8d418da

Please sign in to comment.