- Be able to insert new data into the database
- Be able to query existing data
- Be able to update existing data
- Be able to delete data
- Explain common keywords within queries and use them
- Explain inner joins
Let's learn a few things about this crazy world!
- Start by downloading and copying the contents of the
worldssample database file here - Open up your terminal, then type in
psqlat the prompt to start the Postgres REPL - Run the command
create database world; - Switch to the new database by typing in
\c world - Paste the contents of the SQL file you copied from step 1
- Using
count, get the number of cities in the USASELECT count(*) FROM city WHERE countrycode = 'USA';
- Find out what the population and average life expectancy for people in Argentina (ARG) is
SELECT population, lifeexpectancy FROM country WHERE code = 'ARG';
- Using the
>operator, find the countries where the average life expectancy is greater than 78 yearsSELECT name FROM country WHERE lifeexpectancy > 78;
- Using
IS NOT NULL, ORDER BY, LIMIT, what country has the highest life expectancy?
15 min
Let's populate the wdi database with some data and get more practice with SQL. Feel free to use psql or pgAdmin.
Insert the following 4 students into the students table.
- Jill's full name is Jilly Cakes; she's 30 years old, and lives at 123 Webdev Dr. Boston, MA
- Johns's full name is Johnny Bananas; hes 25 years old, and lives at 555 Five St, Fivetowns, NY
require 'pg'
# Student class
class Student
@conn
# Constructor
def initialize(config)
@conn = PG.connect(:hostaddr => config[:hostaddr], :port => config[:port], :dbname => config[:dbname])- Provide a high-level explanation of what authentication is.
- Explain the difference between authentication and authorization.
- Describe some basic security measures for handling sensitive data, such as passwords.
- Explain the difference between encryption and hashing
- Create a users class that handles user signups
- Authenticate users using email and password
API's (Application Programming Interface) govern how software programs talk to each other. API's expose internal programming functions (e.g. features) to the outside world in a limited/controlled fashion. It makes it possible for applications to share data and allow users to take action even on different services.
- Logging in with Facebook
- Yelp displaying nearby restaurants on Google Maps
30 min
Let's explore API's with everyone's favorite animated gif service!
- Read the implementation details for the following endpoints here: https://github.com/Giphy/GiphyAPI
- Random Endpoint