We have finished all material for this course. We will meet one more time to take care of the final.
Download the class notes for day 9.
Just another CUNY Academic Commons site
We have finished all material for this course. We will meet one more time to take care of the final.
Download the class notes for day 9.
We have covered most of the material for the course. We have one more class day and then the final.
Download the class notes for day 8.
We continue creating, dropping and altering objects like databases, schemata, tables and views.
Download the class notes for day 7.
We have started creating objects like databases, schemata and tables.
Download the class notes for day 6.
We are half-way finished with the course. We are almost ready to CREATE, DROP and ALTER objects like databases, schemata, tables and views.
Download the class notes for day 5.
We have covered INNER JOIN (finding shared data between data sets), built-in functions and data types. We are now ready to create objects.
Download the class notes for day 4.
We continue working with built-in functions — those that affect strings and those that affect numeric values.
Download the class notes for day 3.
So far, we have covered built-in functions that affect strings and how to retrieve data from one or multiple tables.
Download the class notes for day 2.
We have started a new course. You will learn the basics of SQL.
Download the class notes for day 1.
The following is true for Python and several programming languages.
For Python, PEP 8 has emerged as the style guide that most projects adhere to; it promotes a very readable and eye-pleasing coding style. Every Python developer should read it at some point; here are the most important points extracted for you:
- Use 4-space indentation, and no tabs. 4 spaces are a good compromise between small indentation (allows greater nesting depth) and large indentation (easier to read). Tabs introduce confusion, and are best left out.
- Wrap lines so that they don’t exceed 79 characters. This helps users with small displays and makes it possible to have several code files side-by-side on larger displays.
- Use blank lines to separate functions and classes, and larger blocks of code inside functions.
- When possible, put comments on a line of their own.
- Use docstrings.
- Use spaces around operators and after commas, but not directly inside bracketing constructs: a = f(1, 2) + g(3, 4).
- Name your classes and functions consistently; the convention is to use CamelCase for classes and lower_case_with_underscores for functions and methods. Always use self as the name for the first method argument (see A First Look at Classes for more on classes and methods).
- Don’t use fancy encodings if your code is meant to be used in international environments. Python’s default, UTF-8, or even plain ASCII work best in any case.
- Likewise, don’t use non-ASCII characters in identifiers if there is only the slightest chance people speaking a different language will read or maintain the code.