Difference between revisions of "Msaeedi23 Week 6"

From LMU BioDB 2015
Jump to: navigation, search
(table creations for application and product in SQL)
 
(Table Creation on PostgreSQL)
Line 8: Line 8:
  
 
In PostgreSQL I typed the following to create an "application" table:
 
In PostgreSQL I typed the following to create an "application" table:
 
 
  create table application (ApplNo int primary key, ApplType varchar,  
 
  create table application (ApplNo int primary key, ApplType varchar,  
 
  SponsorApplicant varchar, MostRecentLabelFlag boolean, CurrentPatentFlag boolean,  
 
  SponsorApplicant varchar, MostRecentLabelFlag boolean, CurrentPatentFlag boolean,  

Revision as of 02:30, 15 October 2015

Table Creation on PostgreSQL

Start by logging into ssh & enter password

ssh <msaeedi@my.cs.lmu.edu>

Then I inputted:

ls To show the files in the directory that we want to use.

In PostgreSQL I typed the following to create an "application" table:

create table application (ApplNo int primary key, ApplType varchar, 
SponsorApplicant varchar, MostRecentLabelFlag boolean, CurrentPatentFlag boolean, 
ActionType varchar, ChemicalType int, Ther_Potential varchar, OrphanCode varchar)

Using similar techniques I typed in the following command into PostgreSQL to create the "Product" table:

create table product (ApplNo int references application, ProductNo int, Form varchar,
Dosage varchar, ProductMktStatus int, TECode varchar, ReferenceDrug int,
drugname varchar, activeingred varchar)