 insert into catalog.objects values(15, 'mimic2v26.d_labitems', 'itemid,test_name,fluid,category,loinc_code,loinc_description', 2, 2);
 insert into catalog.objects values(16, 'mimic2v26.d_meditems', 'itemid,label', 2, 2);
 insert into catalog.objects values(17, 'mimic2v26.d_parammap_items', 'category,description', 2, 2);
-insert into catalog.objects values(18, 'mimic2v26.d_patients', 'subject_id,sex,dob,dod,hospital_expire_flg', 2, 2);
+insert into catalog.objects values(18, 'mimic2v26.d_patients', 'subject_id,sex,dob,dod,hospital_expire_flg', 2, 3);
 insert into catalog.objects values(19, 'mimic2v26.db_schema', 'created_dt,created_by,updated_dt,updated_by,schema_dt,version,comments', 2, 2);
 insert into catalog.objects values(20, 'mimic2v26.deliveries', 'subject_id,icustay_id,ioitemid,charttime,elemid,cgid,cuid,site,rate,rateuom', 2, 2);
-insert into catalog.objects values(21, 'mimic2v26.demographic_detail', 'subject_id,hadm_id,marital_status_itemid,marital_status_descr,ethnicity_itemid,ethnicity_descr,overall_payor_group_itemid,overall_payor_group_descr,religion_itemid,religion_descr,admission_type_itemid,admission_type_descr,admission_source_itemid,admission_source_descr', 2, 2);
+insert into catalog.objects values(21, 'mimic2v26.demographic_detail', 'subject_id,hadm_id,marital_status_itemid,marital_status_descr,ethnicity_itemid,ethnicity_descr,overall_payor_group_itemid,overall_payor_group_descr,religion_itemid,religion_descr,admission_type_itemid,admission_type_descr,admission_source_itemid,admission_source_descr', 2, 3);
 insert into catalog.objects values(22, 'mimic2v26.demographicevents', 'subject_id,hadm_id,itemid', 2, 2);
-insert into catalog.objects values(23, 'mimic2v26.drgevents', 'subject_id,hadm_id,itemid,cost_weight', 2, 2);
-insert into catalog.objects values(24, 'mimic2v26.icd9', 'subject_id,hadm_id,sequence,code,description', 2, 2);
-insert into catalog.objects values(25, 'mimic2v26.icustay_days', 'icustay_id,subject_id,seq,begintime,endtime,first_day_flg,last_day_flg', 2, 2);
-insert into catalog.objects values(26, 'mimic2v26.icustay_detail', 'icustay_id,subject_id,gender,dob,dod,expire_flg,subject_icustay_total_num,subject_icustay_seq,hadm_id,hospital_total_num,hospital_seq,hospital_first_flg,hospital_last_flg,hospital_admit_dt,hospital_disch_dt,hospital_los,hospital_expire_flg,icustay_total_num,icustay_seq,icustay_first_flg,icustay_last_flg,icustay_intime,icustay_outtime,icustay_admit_age,icustay_age_group,icustay_los,icustay_expire_flg,icustay_first_careunit,icustay_last_careunit,icustay_first_service,icustay_last_service,height,weight_first,weight_min,weight_max,sapsi_first,sapsi_min,sapsi_max,sofa_first,sofa_min,sofa_max,matched_waveforms_num', 2, 2);
-insert into catalog.objects values(27, 'mimic2v26.icustayevents', 'icustay_id,subject_id,intime,outtime,los,first_careunit,last_careunit', 2, 2);
+insert into catalog.objects values(23, 'mimic2v26.drgevents', 'subject_id,hadm_id,itemid,cost_weight', 2, 3);
+insert into catalog.objects values(24, 'mimic2v26.icd9', 'subject_id,hadm_id,sequence,code,description', 2, 3);
+insert into catalog.objects values(25, 'mimic2v26.icustay_days', 'icustay_id,subject_id,seq,begintime,endtime,first_day_flg,last_day_flg', 2, 3);
+insert into catalog.objects values(26, 'mimic2v26.icustay_detail', 'icustay_id,subject_id,gender,dob,dod,expire_flg,subject_icustay_total_num,subject_icustay_seq,hadm_id,hospital_total_num,hospital_seq,hospital_first_flg,hospital_last_flg,hospital_admit_dt,hospital_disch_dt,hospital_los,hospital_expire_flg,icustay_total_num,icustay_seq,icustay_first_flg,icustay_last_flg,icustay_intime,icustay_outtime,icustay_admit_age,icustay_age_group,icustay_los,icustay_expire_flg,icustay_first_careunit,icustay_last_careunit,icustay_first_service,icustay_last_service,height,weight_first,weight_min,weight_max,sapsi_first,sapsi_min,sapsi_max,sofa_first,sofa_min,sofa_max,matched_waveforms_num', 2, 3);
+insert into catalog.objects values(27, 'mimic2v26.icustayevents', 'icustay_id,subject_id,intime,outtime,los,first_careunit,last_careunit', 2, 3);
 insert into catalog.objects values(28, 'mimic2v26.ioevents', 'subject_id,icustay_id,itemid,charttime,elemid,altid,realtime,cgid,cuid,volume,volumeuom,unitshung,unitshunguom,newbottle,stopped,estimate', 2, 2);
 insert into catalog.objects values(29, 'mimic2v26.labevents', 'subject_id,hadm_id,icustay_id,itemid,charttime,value,valuenum,flag,valueuom', 2, 2);
 insert into catalog.objects values(30, 'mimic2v26.medevents', 'subject_id,icustay_id,itemid,charttime,elemid,realtime,cgid,cuid,volume,dose,doseuom,solutionid,solvolume,solunits,route,stopped', 2, 2);

--add database catalog engines: engine_id, name, host, port, connection_properties
insert into catalog.engines values(0,'postgres1','localhost',5431,'PostgreSQL 9.4.5');
insert into catalog.engines values(1,'postgres2','localhost',5430,'PostgreSQL 9.4.5');
insert into catalog.engines values(2,'scidb_codd7','codd07',1239,'SciDB 14.12');
insert into catalog.engines values(3,'scidb_codd6','codd06',1239,'SciDB 14.12');
insert into catalog.engines values(4,'postgres_codd8','codd08',5432,'PostgreSQL 9.4.5');
insert into catalog.engines values(5,'postgres_codd9','codd09',5432,'PostgreSQL 9.4.5');

-- catalog.shims
-- shim_id	island_id	engine_id	access_method	
insert into catalog.shims values (0, 0, 0, 'N/A');
insert into catalog.shims values (1, 0, 1, 'N/A');
insert into catalog.shims values (2, 1, 2, 'N/A');
insert into catalog.shims values (3, 1, 3, 'N/A');
insert into catalog.shims values (4, 0, 4, 'N/A');
insert into catalog.shims values (5, 0, 5, 'N/A');

--add catalog.databases inside the database instances: dbid, engine_id, name, userid, password
insert into catalog.databases values(0,0,'bigdawg_catalog','postgres','test');
insert into catalog.databases values(1,0,'bigdawg_schemas','postgres','test');
insert into catalog.databases values(2,0,'mimic2','pguser','test');
insert into catalog.databases values(3,1,'mimic2_copy','pguser','test');
insert into catalog.databases values(4,0,'genbase','pguser','test');
insert into catalog.databases values(5,1,'genbase','pguser','test');
insert into catalog.databases values(6,4,'tpch','pguser','test');
insert into catalog.databases values(7,5,'tpch','pguser','test');
insert into catalog.databases values(8,2,'codd07','scidb','scidb123');
insert into catalog.databases values(9,3,'codd06','scidb','scidb123');

-- catalog.scidbbinapath
-- binary path to scidb utilities: csv2scidb, iquery, etc.
insert into catalog.scidbbinpaths values (2,'/opt/scidb/14.12/bin/');
insert into catalog.scidbbinpaths values (3,'/opt/scidb/14.12/bin/');
-- insert into catalog.scidbbinpaths values (5,'/opt/scidb/14.12/bin/');
-- insert into catalog.scidbbinpaths values (6,'/opt/scidb/14.12/bin/');

-- catalog.objects
-- oid	name	fields	logical_db	physical_db
insert into catalog.objects values(0, 'mimic2v26.a_chartdurations', 'subject_id,icustay_id,itemid,elemid,starttime,startrealtime,endtime,cuid,duration', 2, 2);
insert into catalog.objects values(1, 'mimic2v26.a_iodurations', 'subject_id,icustay_id,itemid,elemid,starttime,startrealtime,endtime,cuid,duration', 2, 2);
insert into catalog.objects values(2, 'mimic2v26.a_meddurations', 'subject_id,icustay_id,itemid,elemid,starttime,startrealtime,endtime,cuid,duration', 2, 2);
insert into catalog.objects values(3, 'mimic2v26.additives', 'subject_id,icustay_id,itemid,ioitemid,charttime,elemid,cgid,cuid,amount,doseunits,route', 2, 2);
insert into catalog.objects values(4, 'mimic2v26.admissions', 'hadm_id,subject_id,admit_dt,disch_dt', 2, 2);
insert into catalog.objects values(5, 'mimic2v26.censusevents', 'census_id,subject_id,intime,outtime,careunit,destcareunit,dischstatus,los,icustay_id', 2, 2);
insert into catalog.objects values(6, 'mimic2v26.chartevents', 'subject_id,icustay_id,itemid,charttime,elemid,realtime,cgid,cuid,value1,value1num,value1uom,value2,value2num,value2uom,resultstatus,stopped', 2, 2);
insert into catalog.objects values(7, 'mimic2v26.comorbidity_scores', 'subject_id,hadm_id,category,congestive_heart_failure,cardiac_arrhythmias,valvular_disease,pulmonary_circulation,peripheral_vascular,hypertension,paralysis,other_neurological,chronic_pulmonary,diabetes_uncomplicated,diabetes_complicated,hypothyroidism,renal_failure,liver_disease,peptic_ulcer,aids,lymphoma,metastatic_cancer,solid_tumor,rheumatoid_arthritis,coagulopathy,obesity,weight_loss,fluid_electrolyte,blood_loss_anemia,deficiency_anemias,alcohol_abuse,drug_abuse,psychoses,depression', 2, 2);
insert into catalog.objects values(8, 'mimic2v26.d_caregivers', 'cgid,label', 2, 2);
insert into catalog.objects values(9, 'mimic2v26.d_careunits', 'cuid,label', 2, 2);
insert into catalog.objects values(10, 'mimic2v26.d_chartitems', 'itemid,label,category,description', 2, 2);

insert into catalog.objects values(36, 'mimic2v26.procedureevents', 'subject_id,hadm_id,itemid,sequence_num,proc_dt', 2, 2);
insert into catalog.objects values(37, 'mimic2v26.totalbalevents', 'subject_id,icustay_id,itemid,charttime,elemid,realtime,cgid,cuid,pervolume,cumvolume,accumperiod,approx,reset,stopped', 2, 2);

insert into catalog.objects values(38,'region','r_regionkey,r_name,r_comment',4,4);
insert into catalog.objects values(39,'nation','n_nationkey,n_name,n_regionkey,n_comment',4,5);
insert into catalog.objects values(40,'part','p_partkey,p_name,p_mfgr,p_brand,p_type,p_size,p_container,p_retailprice,p_comment',4,4);
insert into catalog.objects values(41,'supplier','s_suppkey,s_name,s_address,s_nationkey,s_phone,s_acctbal,s_comment',4,5);
insert into catalog.objects values(42,'partsupp','ps_partkey,ps_suppkey,ps_availqty,ps_supplycost,ps_comment',4,4);
insert into catalog.objects values(43,'customer','c_custkey,c_name,c_address,c_nationkey,c_phone,c_acctbal,c_mktsegment,c_comment',4,5);
insert into catalog.objects values(44,'orders','o_orderkey,o_custkey,o_orderstatus,o_totalprice,o_orderdate,o_orderpriority,o_clerk,o_shippriority,o_comment',4,4);
insert into catalog.objects values(45,'lineitem','l_orderkey,l_partkey,l_suppkey,l_linenumber,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag,l_linestatus,l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment',4,5);

-- insert into catalog.objects values(46,'go_matrix','geneid,goid,belongs',7,7);
-- insert into catalog.objects values(47,'genes','id,target,pos,len,func',7,7);
-- insert into catalog.objects values(48,'patients','id,age,gender,zipcode,disease,response',7,7);
-- insert into catalog.objects values(49,'geo','geneid,patientid,expr_value',7,7);
