Skip to content

Instantly share code, notes, and snippets.

@nonsensecreativity
Created April 20, 2017 05:22
Show Gist options
  • Save nonsensecreativity/578c637f8d1fa1410adba7cedd796145 to your computer and use it in GitHub Desktop.
Save nonsensecreativity/578c637f8d1fa1410adba7cedd796145 to your computer and use it in GitHub Desktop.
Crunchbase schema
CREATE TABLE IF NOT EXISTS cb_organizations (
company_name varchar(65535),
domain varchar(65535),
country_code varchar(65535),
state_code varchar(65535),
region varchar(65535),
city varchar(65535),
status varchar(65535),
short_description varchar(65535),
category_list varchar(65535),
funding_rounds integer,
funding_total_usd double precision,
founded_on date,
first_funding_on date,
last_funding_on date,
closed_on date,
employee_count varchar(65535),
email varchar(65535),
phone varchar(65535),
facebook_url varchar(65535),
cb_url varchar(65535),
twitter_url varchar(65535),
uuid varchar(65535) primary key
);
CREATE TABLE IF NOT EXISTS cb_funding_rounds (
company_name varchar(65535),
country_code varchar(65535),
state_code varchar(65535),
region varchar(65535),
city varchar(65535),
company_category_list varchar(65535),
funding_round_type varchar(65535),
funding_round_code varchar(65535),
announced_on date,
raised_amount_usd double precision,
raised_amount double precision,
raised_amount_currency_code varchar(65535),
investor_count integer,
investor_names varchar(65535),
cb_url varchar(65535),
company_uuid varchar(65535),
funding_round_uuid varchar(65535)
);
CREATE TABLE IF NOT EXISTS cb_investments (
funding_round_uuid varchar(65535),
investor_uuid varchar(65535)
);
CREATE TABLE IF NOT EXISTS cb_investors (
investor_name varchar(65535),
domain varchar(65535),
country_code varchar(65535),
state_code varchar(65535),
region varchar(65535),
city varchar(65535),
investor_type varchar(65535),
investment_count integer,
founded_on date,
closed_on date,
cb_url varchar(65535),
twitter_url varchar(65535),
facebook_url varchar(65535),
uuid varchar(65535) primary key
);
CREATE TABLE IF NOT EXISTS cb_acquisitions (
acquiree_name varchar(65535),
acquiree_country_code varchar(65535),
state_code varchar(65535),
acquiree_region varchar(65535),
acquiree_city varchar(65535),
acquirer_name varchar(65535),
acquirer_country_code varchar(65535),
acquirer_state_code varchar(65535),
acquirer_region varchar(65535),
acquirer_city varchar(65535),
acquired_on date,
price_usd double precision,
price double precision,
price_currency_code varchar(65535),
acquiree_cb_url varchar(65535),
acquirer_cb_url varchar(65535),
acquiree_uuid varchar(65535),
acquirer_uuid varchar(65535),
acquisition_uuid varchar(65535) primary key
);
CREATE TABLE IF NOT EXISTS cb_ipos (
name varchar(65535),
country_code varchar(65535),
company_state_code varchar(65535),
region varchar(65535),
city varchar(65535),
stock_exchange_symbol varchar(65535),
stock_symbol varchar(65535),
went_public_on date,
price_usd double precision,
price double precision,
price_currency_code varchar(65535),
cb_url varchar(65535),
ipo_uuid varchar(65535),
uuid varchar(65535)
);
CREATE TABLE IF NOT EXISTS cb_people (
first_name varchar(65535),
last_name varchar(65535),
country_code varchar(65535),
state_code varchar(65535),
city varchar(65535),
cb_url varchar(65535),
twitter_url varchar(65535),
facebook_url varchar(65535),
primary_affiliation_organization varchar(65535),
primary_affiliation_title varchar(65535),
primary_organization_uuid varchar(65535),
uuid varchar(65535) primary key
);
CREATE TABLE IF NOT EXISTS cb_events (
uuid varchar(65535) primary key,
name varchar(65535),
short_description varchar(65535),
started_on timestamp,
ended_on timestamp,
registration_details varchar(65535),
registration_url varchar(65535),
start_time varchar(65535),
end_time varchar(65535),
venue_name varchar(65535),
venue_address varchar(65535),
location_uuid varchar(65535),
cost varchar(65535),
description varchar(65535),
city varchar(65535),
region varchar(65535),
country_code varchar(65535),
continent varchar(65535),
permalink varchar(65535),
logo_url varchar(65535),
event_roles varchar(65535),
created_at timestamp,
updated_at timestamp
);
CREATE TABLE IF NOT EXISTS cb_event_relationships (
event_uuid varchar(65535),
relationship_to_event varchar(65535),
entity_uuid varchar(65535),
type varchar(65535),
relationship_detail varchar(65535),
created_at timestamp,
updated_at timestamp
);
CREATE TABLE IF NOT EXISTS cb_competitors (
entity_uuid varchar(65535),
competitor_uuid varchar(65535),
created_at timestamp,
updated_at timestamp
);
CREATE TABLE IF NOT EXISTS cb_org_parents (
org_uuid varchar(65535),
parent_org_uuid varchar(65535),
relationship_to_parent varchar(65535),
created_at timestamp,
updated_at timestamp
);
CREATE TABLE IF NOT EXISTS cb_customers (
entity_uuid varchar(65535),
customer_uuid varchar(65535),
created_at timestamp,
updated_at timestamp
);
CREATE TABLE IF NOT EXISTS cb_jobs (
person_uuid varchar(65535),
org_uuid varchar(65535),
started_on timestamp,
ended_on timestamp,
is_current boolean,
title varchar(65535),
job_role boolean,
executive_role boolean,
advisory_role boolean
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment