0
#!/usr/bin/python
import MySQLdb as mdb
def datainit():
\t con=mdb.connect('localhost','chemistrystudent', 'chem', 'thermochem');
\t with con:
\t \t cur=con.cursor()
\t \t #Aluminum
\t \t cur.execute("CREATE TABLE Aluminum(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Aluminum(Substance,dH,dG,dS) Values ('Al(s)',0,0,28.32)")
\t \t cur.execute("INSERT INTO Aluminum(Substance,dH,dG,dS) Values ('AlCl3(s)',-705.6,-630.0,109.3)")
\t \t cur.execute("INSERT INTO Aluminum(Substance,dH,dG,dS) Values ('Al2O3(s)',-1669.8,-1576.5,51.00)")
\t \t print "aluminum"
\t \t # Barium
\t \t cur.execute("CREATE TABLE Barium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Barium(Substance,dH,dG,dS) Values ('Ba(s)',0,0,63.2)")
\t \t cur.execute("INSERT INTO Barium(Substance,dH,dG,dS) Values ('BaCO3(s)',-1216.3,-1137.6,112.1)")
\t \t cur.execute("INSERT INTO Barium(Substance,dH,dG,dS) Values ('BaO(s)',-553.5,-525.1,70.42)")
\t \t print "barium"
\t \t # Beryllium
\t \t cur.execute("CREATE TABLE Beryllium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Beryllium(Substance,dH,dG,dS) Values ('Be(s)',0,0,9.44)")
\t \t cur.execute("INSERT INTO Beryllium(Substance,dH,dG,dS) Values ('BeO(s)',-608.4,-579.1,13.77)")
\t \t cur.execute("INSERT INTO Beryllium(Substance,dH,dG,dS) Values ('Be(OH)2(s)',-905.8,-817.9,50.21)")
\t \t print "beryllium"
\t \t # Bromine
\t \t cur.execute("CREATE TABLE Bromine(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Bromine(Substance,dH,dG,dS) Values ('Br(g)',111.8,82.38,174.9)")
\t \t cur.execute("INSERT INTO Bromine(Substance,dH,dG,dS) Values ('Br-(aq)',-120.9,-102.8,80.71)")
\t \t cur.execute("INSERT INTO Bromine(Substance,dH,dG,dS) Values ('Br2(g)',30.71,3.14,245.3)")
\t \t cur.execute("INSERT INTO Bromine(Substance,dH,dG,dS) Values ('Br2(l)',0,0,152.3)")
\t \t cur.execute("INSERT INTO Bromine(Substance,dH,dG,dS) Values ('HBr(g)',-36.23,-53.22,198.49)")
\t \t print "Bromine" \t \t
\t \t # Calcium
\t \t cur.execute("CREATE TABLE Calcium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Calcium(Substance,dH,dG,dS) Values ('Ca(g)',179.3,145.5,154.8)")
\t \t cur.execute("INSERT INTO Calcium(Substance,dH,dG,dS) Values ('Ca(s)',0,0,41.4)")
\t \t cur.execute("INSERT INTO Calcium(Substance,dH,dG,dS) Values ('CaCO3(s,calcite)',-1207.1,-1128.76,92.88)")
\t \t cur.execute("INSERT INTO Calcium(Substance,dH,dG,dS) Values ('CaCl2(s)',-795.8,-748.1,104.6)")
\t \t cur.execute("INSERT INTO Calcium(Substance,dH,dG,dS) Values ('CaF2(s)',-1219.6,-1167.3,68.87)")
\t \t cur.execute("INSERT INTO Calcium(Substance,dH,dG,dS) Values ('CaO(s)',-635.5,-604.17,39.75)")
\t \t cur.execute("INSERT INTO Calcium(Substance,dH,dG,dS) Values ('Ca(OH)2(s)',-986.2,-898.5,83.4)")
\t \t cur.execute("INSERT INTO Calcium(Substance,dH,dG,dS) Values ('CaSO4(s)',-1434.0,-1321.8,106.7)")
\t \t print "Calcium"
\t \t # Carbon
\t \t cur.execute("CREATE TABLE Carbon(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C(g)',718.4,672.9,158.0)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C(s,diamond)',1.88,2.84,2.43)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C(s,graphite)',0,0,5.69)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('CCl4(g)',-106.7,-64.0,309.4)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('CCl4(l)',-139.3,-68.6,214.4)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('CF4(g)',-679.9,-635.1,262.3)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('CH4(g)',-74.8,-50.8,186.3)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C2H2(g)',226.77,209.2,200.8)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C2H4(g)',52.30,68.11,219.4)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C2H6(g)',-84.68,-32.89,229.5)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C3H8(g)',-103.85,-23.47,269.9)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C4H10(g)',-124.73,-15.71,310.0)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C4H10(l)',-147.6,-15.0,231.0)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C6H6(g)',82.9,129.7,269.2)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C6H6(l)',49.0,124.5,172.8)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('CH3OH(g)',-201.2,-161.9,237.6)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('CH3OH(l)',-238.6,-166.23,126.8)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C2H5OH(g)',-235.1,-168.5,282.7)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C2H5OH(l)',-277.7,-174.76,160.7)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('C6H12O6(s)',-1273.02,-910.4,212.1)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('CO(g)',-110.5,-137.2,197.9)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('CO2(g)',-393.5,-394.4,213.6)")
\t \t cur.execute("INSERT INTO Carbon(Substance,dH,dG,dS) Values ('CH3COOH(l)',-487.0,-392.4,159.8)")
\t \t print "carbon"
\t \t # Cesium
\t \t cur.execute("CREATE TABLE Cesium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Cesium(Substance,dH,dG,dS) Values ('Cs(g)',76.50,49.53,175.6)")
\t \t cur.execute("INSERT INTO Cesium(Substance,dH,dG,dS) Values ('Cs(l)',2.09,0.03,92.07)")
\t \t cur.execute("INSERT INTO Cesium(Substance,dH,dG,dS) Values ('Cs(s)',0,0,85.15)")
\t \t cur.execute("INSERT INTO Cesium(Substance,dH,dG,dS) Values ('CsCl(s)',-442.8,-414.4,101.2)")
\t \t print "cesium"
\t \t # Chlorine
\t \t cur.execute("CREATE TABLE Chlorine(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Chlorine(Substance,dH,dG,dS) Values ('Cl(g)',121.7,105.7,165.2)")
\t \t cur.execute("INSERT INTO Chlorine(Substance,dH,dG,dS) Values ('Cl(aq)',-167.2,-131.2,56.5)")
\t \t cur.execute("INSERT INTO Chlorine(Substance,dH,dG,dS) Values ('Cl2(g)',0,0,222.96)")
\t \t cur.execute("INSERT INTO Chlorine(Substance,dH,dG,dS) Values ('HCl(aq)',-167.2,-131.2,56.5)")
\t \t cur.execute("INSERT INTO Chlorine(Substance,dH,dG,dS) Values ('HCl(g)',-92.30,-95.27,186.69)")
\t \t print "chlorine"
\t \t # Chromium
\t \t cur.execute("CREATE TABLE Chromium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Chromium(Substance,dH,dG,dS) Values ('Cr(g)',397.5,352.6,174.2)")
\t \t cur.execute("INSERT INTO Chromium(Substance,dH,dG,dS) Values ('Cr(s)',0,0,23.6)")
\t \t cur.execute("INSERT INTO Chromium(Substance,dH,dG,dS) Values ('Cr2O3(s)',-1139.7,-1058.1,81.2)")
\t \t print "chromium"
\t \t # Cobalt
\t \t cur.execute("CREATE TABLE Cobalt(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Cobalt(Substance,dH,dG,dS) Values ('Co(g)',439,393,179)")
\t \t cur.execute("INSERT INTO Cobalt(Substance,dH,dG,dS) Values ('Co(s)',0,0,28.4)")
\t \t print "cobalt"
\t \t # Copper
\t \t cur.execute("CREATE TABLE Copper(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Copper(Substance,dH,dG,dS) Values ('Cu(g)',338.4,298.6,166.3)")
\t \t cur.execute("INSERT INTO Copper(Substance,dH,dG,dS) Values ('Cu(s)',0,0,33.30)")
\t \t cur.execute("INSERT INTO Copper(Substance,dH,dG,dS) Values ('Cucl2(2)',-205.9,-161.7,108.1)")
\t \t cur.execute("INSERT INTO Copper(Substance,dH,dG,dS) Values ('CuO(s)',-156.1,-128.3,42.59)")
\t \t cur.execute("INSERT INTO Copper(Substance,dH,dG,dS) Values ('Cu2O(s)',-170.7,-147.9,92.36)")
\t \t print "copper"
\t \t # Fluorine
\t \t cur.execute("CREATE TABLE Fluorine(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Fluorine(Substance,dH,dG,dS) Values ('F(g)',80.0,61.9,158.7)")
\t \t cur.execute("INSERT INTO Fluorine(Substance,dH,dG,dS) Values ('F(aq)',-332.6,-278.8,-13.8)")
\t \t cur.execute("INSERT INTO Fluorine(Substance,dH,dG,dS) Values ('F2(g)',0,0,202.7)")
\t \t cur.execute("INSERT INTO Fluorine(Substance,dH,dG,dS) Values ('HF(g)',-268.61,270.70,173.51)")
\t \t # Hydrogen
\t \t cur.execute("CREATE TABLE Hydrogen(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Hydrogen(Substance,dH,dG,dS) Values ('H(g)',217.94,203.26,114.60)")
\t \t cur.execute("INSERT INTO Hydrogen(Substance,dH,dG,dS) Values ('H+(aq)',0,0,0)")
\t \t cur.execute("INSERT INTO Hydrogen(Substance,dH,dG,dS) Values ('H+(g)',1536.2,1517.0,108.9)")
\t \t cur.execute("INSERT INTO Hydrogen(Substance,dH,dG,dS) Values ('H2(g)',0,0,130.58)")
\t \t # Iodine
\t \t cur.execute("CREATE TABLE Iodine(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Iodine(Substance,dH,dG,dS) Values ('I(g)',106.60,70.16,180.66)")
\t \t cur.execute("INSERT INTO Iodine(Substance,dH,dG,dS) Values ('I-(aq)',-55.19,-51.57,111.3)")
\t \t cur.execute("INSERT INTO Iodine(Substance,dH,dG,dS) Values ('I2(g)',62.25,19.37,260.57)")
\t \t cur.execute("INSERT INTO Iodine(Substance,dH,dG,dS) Values ('I2(s)',0,0,116.73)")
\t \t cur.execute("INSERT INTO Iodine(Substance,dH,dG,dS) Values ('HI(g)',25.94,1.30,206.3)")
\t \t # Iron
\t \t cur.execute("CREATE TABLE Iron(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Iron(Substance,dH,dG,dS) Values ('Fe(g)',415.5,369.8,180.5)")
\t \t cur.execute("INSERT INTO Iron(Substance,dH,dG,dS) Values ('Fe(s)',0,0,27.15)")
\t \t cur.execute("INSERT INTO Iron(Substance,dH,dG,dS) Values ('Fe2+(aq)',-87.86,-84.93,113.4)")
\t \t cur.execute("INSERT INTO Iron(Substance,dH,dG,dS) Values ('Fe3+(aq)',-47.69,-10.54,293.3)")
\t \t cur.execute("INSERT INTO Iron(Substance,dH,dG,dS) Values ('FeCl2(s)',-341.8,-302.3,117.9)")
\t \t cur.execute("INSERT INTO Iron(Substance,dH,dG,dS) Values ('FeCl3(s)',-400,-334,142.3)")
\t \t cur.execute("INSERT INTO Iron(Substance,dH,dG,dS) Values ('FeO(s)',-271.9,-253.2,60.75)")
\t \t cur.execute("INSERT INTO Iron(Substance,dH,dG,dS) Values ('Fe2O3(s)',-822.16,-740.98,89.96)")
\t \t cur.execute("INSERT INTO Iron(Substance,dH,dG,dS) Values ('Fe3O4(s)',-1117.1,-1014.2,146.4)")
\t \t cur.execute("INSERT INTO Iron(Substance,dH,dG,dS) Values ('FeS2(s)',-171.5,-160.1,52.92)")
\t \t # Lead
\t \t
\t \t cur.execute("CREATE TABLE Lead(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Lead(Substance,dH,dG,dS) Values ('Pb(s)',0,0,68.85)")
\t \t cur.execute("INSERT INTO Lead(Substance,dH,dG,dS) Values ('PbBr2(s)',-277.4,-260.7,161)")
\t \t cur.execute("INSERT INTO Lead(Substance,dH,dG,dS) Values ('PbCO3(s)',-699.1,-625.5,131.0)")
\t \t cur.execute("INSERT INTO Lead(Substance,dH,dG,dS) Values ('Pb(NO3)2(aq)',-421.3,-246.9,303.3)")
\t \t cur.execute("INSERT INTO Lead(Substance,dH,dG,dS) Values ('Pb(NO3)2(s)',-451.9,0,)")
\t \t cur.execute("INSERT INTO Lead(Substance,dH,dG,dS) Values ('PbO(s)',-217.3,-187.9,68.70)")
\t \t
\t \t # Lithium
\t \t cur.execute("CREATE TABLE Lithium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Lithium(Substance,dH,dG,dS) Values ('Li(g)',159.3,126.6,138.8)")
\t \t cur.execute("INSERT INTO Lithium(Substance,dH,dG,dS) Values ('Li(s)',0,0,29.09)")
\t \t cur.execute("INSERT INTO Lithium(Substance,dH,dG,dS) Values ('Li+(aq)',-278.5,-273.4,12.2)")
\t \t cur.execute("INSERT INTO Lithium(Substance,dH,dG,dS) Values ('Li+(g)',685.7,648.5,133.0)")
\t \t cur.execute("INSERT INTO Lithium(Substance,dH,dG,dS) Values ('LiCl(s)',-408.3,-384.0,59.30)")
\t \t # Magnesium
\t \t cur.execute("CREATE TABLE Magnesium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Magnesium(Substance,dH,dG,dS) Values ('Mg(g)',147.1,112.5,148.6)")
\t \t cur.execute("INSERT INTO Magnesium(Substance,dH,dG,dS) Values ('Mg(s)',0,0,32.51)")
\t \t cur.execute("INSERT INTO Magnesium(Substance,dH,dG,dS) Values ('MgCl2(s)',-641.6,-592.1,89.6)")
\t \t cur.execute("INSERT INTO Magnesium(Substance,dH,dG,dS) Values ('MgO(s)',-601.8,-569.6,26.8)")
\t \t cur.execute("INSERT INTO Magnesium(Substance,dH,dG,dS) Values ('Mg(OH)2(s)',-924.7,-833.7,63.24)")
\t \t # Manganese
\t \t cur.execute("CREATE TABLE Manganese(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Manganese(Substance,dH,dG,dS) Values ('Mn(g)',280.7,238.5,173.6)")
\t \t cur.execute("INSERT INTO Manganese(Substance,dH,dG,dS) Values ('Mn(s)',0,0,32.0)")
\t \t cur.execute("INSERT INTO Manganese(Substance,dH,dG,dS) Values ('MnO(s)',-385.2,-362.9,59.7)")
\t \t cur.execute("INSERT INTO Manganese(Substance,dH,dG,dS) Values ('MnO2(s)',-519.6,-464.8,53.14)")
\t \t cur.execute("INSERT INTO Manganese(Substance,dH,dG,dS) Values ('MnO4(aq)',-541.4,-447.2,191.2)")
\t \t # Mercury
\t \t cur.execute("CREATE TABLE Mercury(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Mercury(Substance,dH,dG,dS) Values ('Hg(g)',60.83,31.76,174.89)")
\t \t cur.execute("INSERT INTO Mercury(Substance,dH,dG,dS) Values ('Hg(l)',0,0,77.40)")
\t \t cur.execute("INSERT INTO Mercury(Substance,dH,dG,dS) Values ('HgCl2(s)',-230.1,-184.0,144.5)")
\t \t cur.execute("INSERT INTO Mercury(Substance,dH,dG,dS) Values ('Hg2Cl2(s)',-264.9,-210.5,192.5)")
\t \t # Nickel
\t \t cur.execute("CREATE TABLE Nickel(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Nickel(Substance,dH,dG,dS) Values ('Ni(g)',429.7,384.5,182.1)")
\t \t cur.execute("INSERT INTO Nickel(Substance,dH,dG,dS) Values ('Ni(s)',0,0,29.9)")
\t \t cur.execute("INSERT INTO Nickel(Substance,dH,dG,dS) Values ('NiCl2(s)',-305.3,-259.0,97.65)")
\t \t cur.execute("INSERT INTO Nickel(Substance,dH,dG,dS) Values ('NiO(s)',-239.7,-211.7,37.99)")
\t \t # Nitrogen
\t \t cur.execute("CREATE TABLE Nitrogen(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('N(g)',472.7,455.5,153.3)")
\t \t print "nitrogen executed" \t \t \t
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('N2(g)',0,0,191.50)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('NH3(aq)',-80.29,-26.50,111.3)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('NH3(g)',-46.19,-16.66,192.5)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('NH4+(aq)',-132.5,-79.31,113.4)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('N2H4(g)',95.40,159.4,238.5)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('NH4CN(s)',00,0,)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('NH4Cl(s)',-314.4,-203.0,94.6)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('NH4NO3(s)',-365.6,-184.0,151)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('NO(g)',90.37,86.71,210.62)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('NO2(g)',33.84,51.84,240.45)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('N2O(g)',81.6,103.59,220.0)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('N2O4(g)',9.66,98.28,304.3)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('NOCl(g)',52.6,66.3,264)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('HNO3(aq)',-206.6,-110.5,146)")
\t \t cur.execute("INSERT INTO Nitrogen(Substance,dH,dG,dS) Values ('HNO3(g)',-134.3,-73.94,266.4)")
\t \t
\t \t # Oxygen
\t \t cur.execute("CREATE TABLE Oxygen(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Oxygen(Substance,dH,dG,dS) Values ('O(g)',247.5,230.1,161.0)")
\t \t cur.execute("INSERT INTO Oxygen(Substance,dH,dG,dS) Values ('O2(g)',0,0,205.0)")
\t \t cur.execute("INSERT INTO Oxygen(Substance,dH,dG,dS) Values ('O3(g)',142.3,163.4,237.6)")
\t \t cur.execute("INSERT INTO Oxygen(Substance,dH,dG,dS) Values ('OH-(aq)',-230.0,-157.3,-10.7)")
\t \t cur.execute("INSERT INTO Oxygen(Substance,dH,dG,dS) Values ('H2O(g)',-241.82,-228.57,188.83)")
\t \t cur.execute("INSERT INTO Oxygen(Substance,dH,dG,dS) Values ('H2O(l)',-285.83,-237.13,69.91)")
\t \t cur.execute("INSERT INTO Oxygen(Substance,dH,dG,dS) Values ('H2O2(g)',-136.10,-105.48,232.9)")
\t \t cur.execute("INSERT INTO Oxygen(Substance,dH,dG,dS) Values ('H2O2(l)',-187.8,-120.4,109.6)")
\t \t # Phosphorus
\t \t cur.execute("CREATE TABLE Phosphorus(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('P(g)',316.4,280.0,163.2)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('P2(g)',144.3,103.7,218.1)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('P4(g)',58.9,24.4,280)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('P4(s,red)',-17.46,-12.03,22.85)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('P4(s,white)',0,0,41.08)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('PCl3(g)',-288.07,-269.6,311.7)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('PCl3(l)',-319.6,-272.4,217)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('PF5(g)',-1594.4,-1520.7,300.8)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('PH3(g)',5.4,13.4,210.2)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('P4O6(s)',-1640.1,,)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('P4O10(s)',-2940.1,-2675.2,228.9)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('POCl3(g)',-542.2,-502.5,325)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('POCl3(l)',-597.0,-520.9,222)")
\t \t cur.execute("INSERT INTO Phosphorus(Substance,dH,dG,dS) Values ('H3PO4(aq)',-1288.3,-1142.6,158.2)")
\t \t # Potassium
\t \t cur.execute("CREATE TABLE Potassium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Potassium(Substance,dH,dG,dS) Values ('K(g)',89.9,61.17,160.2)")
\t \t cur.execute("INSERT INTO Potassium(Substance,dH,dG,dS) Values ('K(s)',0,0,64.67)")
\t \t cur.execute("INSERT INTO Potassium(Substance,dH,dG,dS) Values ('KCl(s)',-435.9,-408.3,82.7)")
\t \t cur.execute("INSERT INTO Potassium(Substance,dH,dG,dS) Values ('KClO3(s)',-391.2,-289.9,143.0)")
\t \t cur.execute("INSERT INTO Potassium(Substance,dH,dG,dS) Values ('KClO3(aq)',-349.5,-284.9,265.7)")
\t \t cur.execute("INSERT INTO Potassium(Substance,dH,dG,dS) Values ('K2CO3(s)',-1150.18,-1064.58,155.44)")
\t \t cur.execute("INSERT INTO Potassium(Substance,dH,dG,dS) Values ('KNO3(s)',-492.70,-393.13,132.9)")
\t \t cur.execute("INSERT INTO Potassium(Substance,dH,dG,dS) Values ('K2O(s)',-363.2,-322.1,94.14)")
\t \t cur.execute("INSERT INTO Potassium(Substance,dH,dG,dS) Values ('KO2(s)',-284.5,-240.6,122.5)")
\t \t cur.execute("INSERT INTO Potassium(Substance,dH,dG,dS) Values ('K2O2(s)',-495.8,-429.8,113.0)")
\t \t cur.execute("INSERT INTO Potassium(Substance,dH,dG,dS) Values ('KOH(s)',-424.7,-378.9,78.91)")
\t \t cur.execute("INSERT INTO Potassium(Substance,dH,dG,dS) Values ('KOH(aq)',-482.4,-440.5,91.6)")
\t \t # Rubidium
\t \t cur.execute("CREATE TABLE Rubidium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Rubidium(Substance,dH,dG,dS) Values ('Rb(g)',85.8,55.8,170.0)")
\t \t cur.execute("INSERT INTO Rubidium(Substance,dH,dG,dS) Values ('Rb(s)',0,0,76.78)")
\t \t cur.execute("INSERT INTO Rubidium(Substance,dH,dG,dS) Values ('RbCl(s)',-430.5,-412.0,92)")
\t \t cur.execute("INSERT INTO Rubidium(Substance,dH,dG,dS) Values ('RbClO3(s)',-392.4,-292.0,152)")
\t
\t \t # Scandium
\t \t #cur.execute("DROP TABLE IF EXISTS Scandium")
\t \t cur.execute("CREATE TABLE Scandium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Scandium(Substance,dH,dG,dS) Values ('Sc(g)',377.8,336.1,174.7)")
\t \t cur.execute("INSERT INTO Scandium(Substance,dH,dG,dS) Values ('Sc(s)',0,0,34.6)")
\t \t # Selenium
\t \t cur.execute("CREATE TABLE Selenium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Selenium(Substance,dH,dG,dS) Values ('H2Se(g)',29.7,15.9,219.0)")
\t \t # Silicon
\t \t cur.execute("CREATE TABLE Silicon(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Silicon(Substance,dH,dG,dS) Values ('Si(g)',368.2,323.9,167.8)")
\t \t cur.execute("INSERT INTO Silicon(Substance,dH,dG,dS) Values ('Si(s)',0,0,18.7)")
\t \t cur.execute("INSERT INTO Silicon(Substance,dH,dG,dS) Values ('SiC(s)',-73.22,-70.85,16.61)")
\t \t cur.execute("INSERT INTO Silicon(Substance,dH,dG,dS) Values ('SiCl4(l)',-640.1,-572.8,239.3)")
\t \t cur.execute("INSERT INTO Silicon(Substance,dH,dG,dS) Values ('SiO2(s,quartz)',-910.9,-856.5,41.84)")
\t \t # Silver
\t \t cur.execute("CREATE TABLE Silver(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Silver(Substance,dH,dG,dS) Values ('Ag(s)',0,0,42.55)")
\t \t cur.execute("INSERT INTO Silver(Substance,dH,dG,dS) Values ('Ag+(aq)',105.90,77.11,73.93)")
\t \t cur.execute("INSERT INTO Silver(Substance,dH,dG,dS) Values ('AgCl(s)',-127.0,-109.70,96.11)")
\t \t cur.execute("INSERT INTO Silver(Substance,dH,dG,dS) Values ('Ag2O(s)',-31.05,-11.20,121.3)")
\t \t cur.execute("INSERT INTO Silver(Substance,dH,dG,dS) Values ('AgNO3(s)',-124.4,-33.41,140.9)")
\t \t # Sodium
\t \t cur.execute("CREATE TABLE Sodium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('Na(g)',107.7,77.3,153.7)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('Na(s)',0,0,51.45)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('Na+(aq)',-240.1,-261.9,59.0)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('Na+(g)',609.3,574.3,148.0)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('NaBr(aq)',-360.6,-364.7,141.00)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('NaBr(s)',-361.4,-349.3,86.82)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('Na2CO3(s)',-1130.9,-1047.7,136.0)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('NaCl(aq)',-407.1,-393.0,115.5)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('NaCl(g)',-181.4,-201.3,229.8)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('NaCl(s)',-410.9,-384.0,72.33)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('NaHCO3(s)',-947.7,-851.8,102.1)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('NaNO3(aq)',-446.2,-372.4,207)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('NaNO3(s)',-467.9,-367.0,116.5)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('NaOH(aq)',-469.6,-419.2,49.8)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('NaOH(s)',-425.6,-379.5,64.46)")
\t \t cur.execute("INSERT INTO Sodium(Substance,dH,dG,dS) Values ('Na2SO4(s)',-1387.1,-1270.2,149.6)")
\t \t # Strontium
\t \t #cur.execute("DROP TABLE IF EXISTS Strontium")
\t \t cur.execute("CREATE TABLE Strontium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Strontium(Substance,dH,dG,dS) Values ('SrO(s)',-592.0,-561.9,54.9)")
\t \t cur.execute("INSERT INTO Strontium(Substance,dH,dG,dS) Values ('Sr(g)',164.4,110.0,164.6)")
\t \t # Sulfur
\t \t cur.execute("CREATE TABLE Sulfur(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Sulfur(Substance,dH,dG,dS) Values ('S(s,rhombic)',0,0,31.88)")
\t \t cur.execute("INSERT INTO Sulfur(Substance,dH,dG,dS) Values ('S8(g)',102.3,49.7,430.9)")
\t \t cur.execute("INSERT INTO Sulfur(Substance,dH,dG,dS) Values ('SO2(g)',-296.9,-300.4,248.5)")
\t \t cur.execute("INSERT INTO Sulfur(Substance,dH,dG,dS) Values ('SO3(g)',-395.2,-370.4,256.2)")
\t \t cur.execute("INSERT INTO Sulfur(Substance,dH,dG,dS) Values ('SO42-(aq)',-909.3,-744.5,20.1)")
\t \t cur.execute("INSERT INTO Sulfur(Substance,dH,dG,dS) Values ('SOCl2(l)',-245.6,,)")
\t \t cur.execute("INSERT INTO Sulfur(Substance,dH,dG,dS) Values ('H2S(g)',-20.17,-33.01,205.6)")
\t \t cur.execute("INSERT INTO Sulfur(Substance,dH,dG,dS) Values ('H2SO4(aq)',-909.3,-744.5,20.1)")
\t \t cur.execute("INSERT INTO Sulfur(Substance,dH,dG,dS) Values ('H2SO4(l)',-814.0,-689.9,156.1)")
\t \t # Titanium
\t \t cur.execute("CREATE TABLE Titanium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Titanium(Substance,dH,dG,dS) Values ('Ti(g)',468,422,180.3)")
\t \t cur.execute("INSERT INTO Titanium(Substance,dH,dG,dS) Values ('Ti(s)',0,0,30.76)")
\t \t cur.execute("INSERT INTO Titanium(Substance,dH,dG,dS) Values ('TiCl4(g)',-763.2,-726.8,354.9)")
\t \t cur.execute("INSERT INTO Titanium(Substance,dH,dG,dS) Values ('TiCl4(l)',-804.2,-728.1,221.9)")
\t \t cur.execute("INSERT INTO Titanium(Substance,dH,dG,dS) Values ('TiO2(s)',-944.7,-889.4,50.29)")
\t \t # Vanadium
\t \t cur.execute("CREATE TABLE Vanadium(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Vanadium(Substance,dH,dG,dS) Values ('V(g)',514.2,453.1,182.2)")
\t \t cur.execute("INSERT INTO Vanadium(Substance,dH,dG,dS) Values ('V(s)',0,0,28.9)")
\t \t # Zinc
\t \t cur.execute("CREATE TABLE Zinc(Substance VARCHAR(25) NOT NULL PRIMARY KEY, dH DOUBLE, dG DOUBLE, dS DOUBLE)")
\t \t cur.execute("INSERT INTO Zinc(Substance,dH,dG,dS) Values ('Zn(g)',130.7,95.2,160.9)")
\t \t cur.execute("INSERT INTO Zinc(Substance,dH,dG,dS) Values ('Zn(s)',0,0,41.63)")
\t \t cur.execute("INSERT INTO Zinc(Substance,dH,dG,dS) Values ('ZnCl2(s)',-415.1,-369.4,111.5)")
\t \t cur.execute("INSERT INTO Zinc(Substance,dH,dG,dS) Values ('ZnO(s)',-348.0,-318.2,43.9)")
\t
print "Has the database been initiated? y/n"
init=str(raw_input())
if init.lower()=="n":
\t try:
\t \t datainit()
\t except mdb.Error,e:
\t \t print "Error %d: %s" % (e.args[0],e.args[1])
\t print "Initialized"
\t
你好, 我試圖創建,地層的標準熵,以及形成的標準吉布斯自由能的標準焓的數據庫,適用於各種不同的物質。
函數datainit()意味着爲數據庫中稱爲「熱化學」的數據庫中各種元素的化合物創建上述信息的多個表。不幸的是,當我執行這個函數時,只有那些直到創建氮的表的那個語句似乎被執行。奇怪的是,之後的聲明的語法似乎是正確的。最相關的代碼部分位於註釋#Nitrogen下方。
我是MySQL的新手,我可能犯了一些明顯的錯誤。函數沒有完全執行,因爲我一次創建的表太多了?
如果你問這個問題,可能是你的設計有問題! – Strawberry 2015-03-08 18:29:39
我在單個數據庫中沒有看到超過幾千個表格。但是,通常情況下,有很多表格的設計很差,特別是當它們都具有相同的一組列時。 – 2015-03-08 21:40:33