Changes

Jump to navigation Jump to search
703 bytes added ,  12:18, 17 July 2017
Clean firmbase and check valid key (firmname, foundingdate)
==DatabaseLoading starting data into database==
Database is named vcdb2. It is located in /bulk/VentureCapitalData/SDCVCData. Launch with psql vcdb2. Load the following tables by running the commands below. Make sure the sql scripts and data txt files are all located in the folder. Check that the line numbers copied into your new tables match the line numbers in the Load files.
\i LoadLongDescription.sql
\i LoadRound.sql
 
==Creating Base Tables==
Create the base tables, companybase and round, by running the following scripts. These are the initial tables you will need to clean and join in order to get the master tables.
DROP TABLE companybase;
CREATE TABLE companybase AS
SELECT DISTINCT
coname,updateddate,foundingdate,datelastinv,datefirstinv,investedk,city,description,msa,msacode,nationcode,statecode,addr1,ad
dr2,indclass,indsubgroup3,indminor,url,zip
FROM roundbase
ORDER BY coname;
 
DROP TABLE round;
CREATE TABLE round AS
SELECT DISTINCT coname,statecode,datefirstinv,rounddate,stage1,stage3,rndamtdisck,rndamtestk,roundnum,numinvestors
FROM roundbase
ORDER BY coname;

Navigation menu