This webinar took place on August 23, 2012.
Never worry about servers. Never worry about config files. Never worry about patches. Simply focus on your data with Heroku Postgres.
PostgreSQL is a powerful, reliable, and durable open-source SQL-compliant database. Now available as a fully-managed cloud database from salesforce.com, Heroku Postgres reduces the costs and administrative overhead compared to operating your own database. You can even create a database instance within seconds with a single click.
Watch this webinar to learn about:
:: When to use Heroku Postgres versus Database.com
:: What data you can and should store in Heroku Postgres
:: Architecting your application with Heroku Postgres
:: How to efficiently share data in your organization with Dataclips
:: How to take advantage of features such as Fork and Follow to scale
16. CREATE
TABLE
products
(
id
integer
NOT
NULL,
title
character
varying(255),
description
text,
price
numeric(10,2)
);
17. CREATE
TABLE
users
(
id
integer
NOT
NULL,
first_name
character
varying(50),
last_name
character
varying(50),
email
character
varying(255),
data
hstore,
created_at
timestamp
without
time
zone,
updated_at
timestamp
without
time
zone,
last_login
timestamp
with
time
zone
);
18. CREATE
TABLE
purchases
(
id
integer
NOT
NULL,
user_id
integer,
items
decimal(10,2)
[][],
occurred_at
timestamp
);
19. CREATE
TABLE
purchases
(
id
integer
NOT
NULL,
user_id
integer,
items
decimal(10,2)
[][],
occurred_at
timestamp
);
22. Data
Types
bigint money
timestamptz polygon date boolean interval
array integer UUID
smallint char
serial bytea
line numeric
inet cidr point circle
time text float
macaddr timetz enum
varchar tsquery XML
path tsvector timestamp box
23. Other
Languages
CREATE
OR
REPLACE
FUNCTION
total(decimal(10,2)[][])
RETURNS
decimal(10,2)
AS
$$
DECLARE
s
decimal(10,2)
:=
0;
x
decimal[];
BEGIN
FOREACH
x
SLICE
1
IN
ARRAY
$1
LOOP
s
:=
s
+
(x[2]
*
x[3]);
END
LOOP;
RETURN
s;
END;
$$
LANGUAGE
plpgsql;
25. Other
Languages
python pgsql lolcode
ruby j
lua V8 R
scheme
tcl SQL psm Java
sh php javascript
26. Extensions
CREATE
EXTENSION
hstore;
CREATE
TABLE
users
(
id
integer
NOT
NULL,
first_name
character
varying(50),
last_name
character
varying(50),
email
character
varying(255),
data
hstore,
created_at
timestamp
without
time
zone,
last_login
timestamp
without
time
zone
);
27. Extensions
INSERT
INTO
users
VALUES
(
1,
'Craig',
'Kerstiens',
'craig.kerstiens@gmail.com',
'sex
=>
"M",
state
=>
"CA"',
now(),
now()
);