Created
June 27, 2013 23:10
-
-
Save elenawalom/5881205 to your computer and use it in GitHub Desktop.
Wk2Day4Notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What problem does Git solve? | |
*Data backup | |
*Remote access | |
What is version control? | |
Reference older versions of your code. | |
C reate a = [2, 11, 37. 42] | |
R ead a.map!do|x| | |
U pdate (map) x + 5 | |
D estroy a = nil | |
RESTful/CRUD | |
GET - Read | |
POST - Create | |
PUT - Replace | |
PATCH - Merge | |
DELETE - Destroy | |
get "/movies" | |
get "/movies/:id" | |
post "/movies" | |
patch "/movies/:id" | |
Everything in a database has its own id. The exception is a problem created unintentionally. | |
CRUD pattern is everywhere. The purpose of a database is to store and retrieve data. | |
Databases | |
*CRUD | |
*Create, Read, Update, Destroy | |
(siderant: Apache graveyard is where open source projects go to die.) | |
Brands | |
Mongo, SQLite, Postgres, Couch, BerkleyDB, Oracle | |
Types of databases | |
JSON | |
Relation | |
SQL | |
XML | |
Spreadsheet | |
SQL, Structured Query Langue / Relation Algebra | |
=== | |
CRUD | |
INSERT, SELECT, UPDATE, DELETE | |
*Class - Tables | |
*Arrays - result set (several rows) | |
*Hash (instance) - row | |
*Keys (properties, attributes) - field names | |
*Values (properties, attributes) - fileds | |
CREATE TABLE movies ( | |
title TEXT | |
, desc TEXT | |
, | |
) | |
SQLITE3 = allows us to talk to SQLITE (Excel) | |
SQL = language | |
SQLITE = database management system | |
Schema = another word for structure in the database; a word for the way things work together | |
INSERT INTO = the create method in SQL | |
SELECT *FROM = will "get" all the fields from a single class | |
.read, .schema -- specific to SQLITE | |
SELECT * FROM WHERE GROUP BY HAVING | |
SELECT * FROM WISHLISTS | |
SELECT name,price,on_sale FROM products WHERE price < 10; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment