Skip to content

Instantly share code, notes, and snippets.

@ddrone
Created October 4, 2011 20:13
Show Gist options
  • Save ddrone/1262658 to your computer and use it in GitHub Desktop.
Save ddrone/1262658 to your computer and use it in GitHub Desktop.
BrandAnalyst DB schema
drop table if exists InfoSource;
create table InfoSource(
id int primary key not null,
title varchar(100),
description text,
website varchar(400)
);
drop table if exists Article;
create table Article(
id int primary key not null,
infosource_id int,
title varchar(100),
publ_time timestamp,
author varchar(150),
content text
);
drop table if exists Mention;
create table Mention(
brand_id int,
article_id int,
opinion text,
primary key (brand_id, article_id)
);
drop table if exists Brand;
create table Brand(
id int primary key not null,
title varchar(100),
description text,
website varchar(400),
additional_info text
);
drop table if exists BrandStats;
create table BrandStats(
brand_id int,
stats_data text,
data_time timestamp,
primary key (brand_id, data_time)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment