Heroku Postgres Cloud Database Webinar
-
Upload
salesforce-developers -
Category
Technology
-
view
1.115 -
download
2
description
Transcript of Heroku Postgres Cloud Database Webinar
Heroku Postgres Webinar
Craig Kerstiens
Matt Soldo
Architecture
Heroku Runtime
Database.com Heroku Postgres
Force.comOther
Platforms
Heroku Postgres
Social Enterprise DBaaS
SQL Database-‐as-‐a-‐Service
Database.com
Let’s Provision a Database
Heroku Postgres
Management Services
Postgres
Value-Added Features
Heroku Postgres
Management Services
Postgres
Value-Added Features
Management Services
Setup
Manage
Security
Backup
Scale
Query
DBA Tasks
Setup
Manage
Security
Backup
Scale
Query
DBA Tasks
We hold the pager
Health Checks
Continuous Protection
Heroku Postgres
Management Services
Postgres
Value-Added Features
Heroku Postgres
Management Services
Postgres
Value-Added Features
100% Compatible
Why Postgres?
Users Purchases
Products
CREATE TABLE products ( id integer NOT NULL, title character varying(255), description text, price numeric(10,2));
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);
CREATE TABLE purchases ( id integer NOT NULL, user_id integer, items decimal(10,2) [][], occurred_at timestamp);
CREATE TABLE purchases ( id integer NOT NULL, user_id integer, items decimal(10,2) [][], occurred_at timestamp);
CREATE TABLE purchases ( id integer NOT NULL, user_id integer, items decimal(10,2) [][], occurred_at timestamp);
items[x][0] = item_iditems [x][1] = qtyitems [x][2] = price
Data Types
INSERT INTO purchases VALUES ( 2, 2, '{{11.0, 1.0, 4.99}}', now());
Data Types
smallint
bigint
integernumeric
float
serial
money
char
varchar
text
bytea
timestamp
timestamptz date
time timetz
intervalboolean
enum
pointline
polygon
box
circle
path
inet cidrmacaddr
tsvectortsquery
array
XML
UUID
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;
Other Languages
FOREACH x SLICE 1 IN ARRAY $1 LOOP s := s + (x[2] * x[3]); END LOOP; RETURN s;
Other Languages
pythonrubypgsql
SQLtcl
sh
RV8Java
javascript
lolcode
scheme
php
j
luapsm
ExtensionsCREATE 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);
ExtensionsINSERT INTO users VALUES (1, 'Craig', 'Kerstiens', '[email protected]', 'sex => "M", state => "CA"', now(), now()
);
Extensions
dblink hstorecitext
ltreeisncube
pgcrypto
tablefunc
uuid-ossp
earthdistance
trigram
fuzzystrmatch
pgrowlockspgstattuple
btree_gist
dict_intdict_xsynunaccent
Heroku Postgres
Management Services
Postgres
Value-Added Features
Heroku Postgres
Management Services
Postgres
Value-Added Features
Data ClipsThe easiest way to share your data
SELECT * FROM salesWHERE amount > 1
+Your Live Production Data
https://postgres.heroku.com/dataclips/{unique & secure hash}
FollowersMasterDatabase
Follower 1
Follower 2
Write Transactions
Read Transactions
FollowersMasterDatabase
Follower 1
Follower 2
Write Transactions
Read Transactions
FollowersMasterDatabase
New Master
Follower 2
Write Transactions
Read Transactions
Pricing and Availability
Learn More
Try It free: https://postgres.heroku.com
Code: https://github.com/craigkerstiens/postgres-‐demo
Survey: http://bit.ly/herokupostgressurvey