|Class website:||[oit2.sps.nyu.edu/~sultans/pythonWeb] (or)||[samsultan.com/pythonWeb]|
|Course Hours:||1:30pm - 5:30pm|
+ final project
+ homework submission
+ MySql examples/demos
+ student evaluation & comments
|Prerequisites -||html1   html2   tables   forms  |
|Session -||1   2   3   4   5   6   7   8   9   10   - Extra 11  |
Learn the fundamentals of two of today's most popular tools. Python is an open-source programming language that has gained tremendous popularity in the past few years. It is a general purpose language that can practically accomplish any programming task. We will be using it to develop dynamic web sites. MySQL is the world's most popular open-source database management system. Because it is readily available, low cost, and easy to install and use, many Internet service providers use MySQL and offer access to MySQL database services to potential clients. Learn both Python and MySQL, and use this powerful combination to design user-friendly, form-based HTML front end web pages that communicate with MySQL database servers through Python to create dynamic websites.
The objective of this course is to teach you the fundamentals behind 2 powerful software tools. We will learn both Python as a programming language and SQL to connect to a MySQL database. Python is one one of the most popular languages in use today, and MySql is an open source database that is used in over 3 million installations. We will discuss Python's programming constructs including variable, lists, tuples, dictionaries, functions, etc. and how we use all those to connect to a database and to create a web site. We will also discuss the relational database model, and will learn about SQL (Structured Query language) both as an ANSI standard language and how MySql implements those standards. We will learn and use DDL (Data Definition Language) to create and delete database objects, and DML (Data Manipulation Language) to access and manipulate those objects.
As part of this course, we will learn and use Python to create a bridge between the MySql database on the server side with HTML forms and other web presentation pages on the client side
The focus of the course will be on the following topics:
How to Submit Homeworks.
- Homework assignments are always due the next session we meet.
- Print out your homework code and output and bring with you to class the next time we meet.
- I will either collect, or will ask students to discuss their solutions in class.
- I will not accept homework via email unless you are not able to attend the class.
- Multiple pages should be stapled together.
Grades are FINAL.
Please do not negotiate for a better grade. If you are expecting to receive a grade of an "A" at the end of the semester, then I expect you to attend all sessions (unless I am notified ahead of time), to participate in these sessions, to keep up with the class reading material, and to complete your homework assigments. This will ensure that you stay current with the class content, and will ensure that you get a good grade on your test(s), project as well as your final grade.
If you are not interested in a grade, or you do not submit your homeworks/project or take the exams,
then you will receive a grade of an "NE" (Non-Evaluative). A grade of NE is final, and cannot be changed.
A grade of NE cannot be applied as partial fulfillment for any NYU certificate program.
To receive your final grade at the end of the semester,
follow these steps:
Introduction to Python.|
Numeric and string operators.
Comparison and logical operators.
Working with Lists, Tuples, and Dictionaries.
Control Structure and Program Flow.
The if conditional statement.
The while, and for loop statements.
|Reading:||Chapters 2, 3, 6, 12 (Murach's Python Programming)|
Working with Strings.|
Working with Numbers.
Working with Dates
Working with Lists, Tuples and Dictionaries
List, Tuple and Dictionary Functions
|Reading:||Chapters 9, 10, 11 (Murach's Python Programming)|
HTTP - HyperText Transfer Protocol|
The client request
The server response
The GET and POST methods
Accessing client headers
Creating and adding server headers
SQL - Structured Query language|
DDL - Data Definition language
DML - Data Manipulation Language
SQL standard vs. vendor extensions
Our first database
The SELECT statement
The FROM clause
The WHERE clause
Using SELECT DISTINCT
|Reading:||Chapters 2, 3 (Teach Yourself SQL in One Hour a Day)|
Selecting data from multiple tables|
The join construct
Old vs. new join syntax
Normal or Inner join
Cross join - Cartesian product
Outer join vs. Inner join
What is a Self Join
|Reading:||Chapter 5 (Teach Yourself SQL in One Hour a Day)|
Creating database objects|
What is a primary key?
What is a foreign key?
What is an index?
SQL data types
Adding a primary key
Altering table definition
|Reading:||Chapter 9, 10, 15 (Teach Yourself SQL in One Hour a Day)|
Manipulating data in tables|
Adding data with the INSERT statement
INSERT with a SELECT statement
Changing data with the UPDATE statement
UPDATE with a SELECT statement
Removing data with the DELETE statement
DELETE with a SELECT statement
The TRUNCATE statement
The REPLACE statement (MySql)
|Reading:||Chapter 11 (Teach Yourself SQL in One Hour a Day)|
Accessing HTML form data|
The GET method
The POST method
Connecting to a database
Inserting, Updating & Deleting from databases
|Reading:||Chapters 17 (Murach's Python Programming)|
SQL built-in Functions|
Arithmetic functions - ABS, RAND, ROUND, TRUNCATE
Character functions - CONCAT, LENGTH, SUBSTR, TRANSLATE
The CASE expression
Date functions - Current date, date manipulation, date formatting
|Reading:||Chapter 7, 12 (Teach Yourself SQL in One Hour a Day)|
Aggregating and Grouping|
Aggregate functions - COUNT, SUM, AVG, MIN, MAX
Grouping with GROUP BY clause
The HAVING clause
The ROLLUP feature
Sorting with the ORDER BY clause
|Reading:||Chapter 4 (Teach Yourself SQL in One Hour a Day)|
The Logical and Physical Model
Understanding data normalization
First normal form
Second normal form
Third normal form
Pros & cons of data normalization
Designing Self-join relationship
|Reading:||Chapter 8 (Teach Yourself SQL in One Hour a Day)|
- Final Exam -
- Final Project due -