Introduction to PostgreSQL data types
Creating PostgreSQL Databases
Darryl Reeves
Industry Assistant Professor, New York University
Data categories in PostgreSQL
Text
Numeric
Temporal
Boolean
Others: Geometric, Binary, Monetary
Example 1: representing birthdays
Cathy: May 3rd, 2006
Possible representations
"May 3, 2006" (text)
"5/3/2006" (text)
2006-05-03 (date)
Example 2: tracking payment status
Did attending member pay?
Possible representations:
"Yes"/"No" (text)
"Y"/"N" (text)
'true'/'false' (boolean)
Specific types provide restriction on values
Example 3: trip distances
Mark flew 326 miles for client meeting
Possible representations:
"326 miles" (text)
"326" (text)
326 (numeric)
Let's practice!
Creating PostgreSQL Databases
Preparing Video For Download...