iam supposed to addthese compounds properties in database using java.i know how
ID: 3609456 • Letter: I
Question
iam supposed to addthese compounds properties in database using java.i know how tocreate table and update the properties but iam not sure as to how ishud put in these values in the database.i have around 1000compounds so i cannot do manually.CID is the primary key and therest are the various column heading with the values.can someoneplease help me out?CID: 4112
IUPAC NAME:2-[[4-[(2,4-diaminopteridin-6-yl)methyl-methylamino]benzoyl]amino]pentanedioicacid
canonical smile:CN(CC1=CN=C2C(=N1)C(=NC(=N2)N)N)C3=CC=C(C=C3)C(=O)NC(CCC(=O)O)C(=O)O
rotatable bond count: 9
mol formula: C20H22N8O5
mol weight: 454.439280
total formal charge: 0
xlog p: -1.8
hydrogen bond donor count: 5
hydrogen bond acceptor count: 12
complexity: 704.000000
heavy atom count: 33
atom chiral count: 1
atom chiral def count: 0
atom chiral undef count: 1
bond chiral count: 0
bond chiral def count: 0
bond chiral undef count: 0
isotope atom count: 0
covalent unit count: 1
tautomer count: 24
tpsa: 211
CID: 62432
IUPAC NAME:bis(aziridin-1-yl)-morpholin-4-yl-sulfanylidene-$l^{5}-phosphane
canonical smile: C1CN1P(=S)(N2CC2)N3CCOCC3
rotatable bond count: 3
mol formula: C8H16N3OPS
mol weight: 233.270901
total formal charge: 0
xlog p: 0.4
hydrogen bond donor count: 0
hydrogen bond acceptor count: 4
complexity: 258.000000
heavy atom count: 14
atom chiral count: 0
atom chiral def count: 0
atom chiral undef count: 0
bond chiral count: 0
bond chiral def count: 0
bond chiral undef count: 0
isotope atom count: 0
covalent unit count: 1
tautomer count: 1
tpsa: 18.5
CID: 6444632
IUPAC NAME:2-[[(1Z)-1-(diaminomethylidenehydrazinylidene)propan-2-ylidene]amino]guanidine;sulfuric acid
canonical smile: CC(=NN=C(N)N)C=NN=C(N)N.OS(=O)(=O)O
rotatable bond count: 3
mol formula: C5H14N8O4S
mol weight: 282.280860
total formal charge: 0
xlog p:
hydrogen bond donor count: 6
hydrogen bond acceptor count: 12
complexity: 346.000000
heavy atom count: 18
atom chiral count: 0
atom chiral def count: 0
atom chiral undef count: 0
bond chiral count: 2
bond chiral def count: 2
bond chiral undef count: 0
isotope atom count: 0
covalent unit count: 2
tautomer count: 8
tpsa: 228
CID: 2907
IUPAC NAME:N,N-bis(2-chloroethyl)-1-oxo-6-oxa-2-aza-1$l^{5}-phosphacyclohexan-1-amine
canonical smile: C1CNP(=O)(OC1)N(CCCl)CCCl
rotatable bond count: 5
mol formula: C7H15Cl2N2O2P
mol weight: 261.085961
total formal charge: 0
xlog p: 0.6
hydrogen bond donor count: 1
hydrogen bond acceptor count: 4
complexity: 212.000000
heavy atom count: 14
atom chiral count: 1
atom chiral def count: 0
atom chiral undef count: 1
bond chiral count: 0
bond chiral def count: 0
bond chiral undef count: 0
isotope atom count: 0
covalent unit count: 1
tautomer count: 2
tpsa: 41.6
CID: 31010
IUPAC NAME:2-[[3,5-dichloro-4-[(2,4-diaminopteridin-6-yl)methyl-methylamino]benzoyl]amino]pentanedioicacid
canonical smile:CN(CC1=CN=C2C(=N1)C(=NC(=N2)N)N)C3=C(C=C(C=C3Cl)C(=O)NC(CCC(=O)O)C(=O)O)Cl
rotatable bond count: 9
mol formula: C20H20Cl2N8O5
mol weight: 523.329400
total formal charge: 0
xlog p: -0.1
hydrogen bond donor count: 5
hydrogen bond acceptor count: 12
complexity: 770.000000
heavy atom count: 35
atom chiral count: 1
atom chiral def count: 0
atom chiral undef count: 1
bond chiral count: 0
bond chiral def count: 0
bond chiral undef count: 0
isotope atom count: 0
covalent unit count: 1
tautomer count: 24
tpsa: 211
CID: 233022
IUPAC NAME:(2S)-2-amino-N-[(3R,4R,4aR,5R,6R)-1,5,6-trihydroxy-3-methyl-8-oxo-3,4,4a,5,6,7-hexahydroisochromen-4-yl]propanamide
canonical smile: CC1C(C2C(C(CC(=O)C2=C(O1)O)O)O)NC(=O)C(C)N
rotatable bond count: 2
mol formula: C13H20N2O6
mol weight: 300.307700
total formal charge: 0
xlog p: -1.7
hydrogen bond donor count: 5
hydrogen bond acceptor count: 7
complexity: 491.000000
heavy atom count: 21
atom chiral count: 6
atom chiral def count: 6
atom chiral undef count: 0
bond chiral count: 0
bond chiral def count: 0
bond chiral undef count: 0
isotope atom count: 0
covalent unit count: 1
tautomer count: 10
tpsa: 142 iam supposed to addthese compounds properties in database using java.i know how tocreate table and update the properties but iam not sure as to how ishud put in these values in the database.i have around 1000compounds so i cannot do manually.CID is the primary key and therest are the various column heading with the values.can someoneplease help me out?
CID: 4112
IUPAC NAME:2-[[4-[(2,4-diaminopteridin-6-yl)methyl-methylamino]benzoyl]amino]pentanedioicacid
canonical smile:CN(CC1=CN=C2C(=N1)C(=NC(=N2)N)N)C3=CC=C(C=C3)C(=O)NC(CCC(=O)O)C(=O)O
rotatable bond count: 9
mol formula: C20H22N8O5
mol weight: 454.439280
total formal charge: 0
xlog p: -1.8
hydrogen bond donor count: 5
hydrogen bond acceptor count: 12
complexity: 704.000000
heavy atom count: 33
atom chiral count: 1
atom chiral def count: 0
atom chiral undef count: 1
bond chiral count: 0
bond chiral def count: 0
bond chiral undef count: 0
isotope atom count: 0
covalent unit count: 1
tautomer count: 24
tpsa: 211
CID: 62432
IUPAC NAME:bis(aziridin-1-yl)-morpholin-4-yl-sulfanylidene-$l^{5}-phosphane
canonical smile: C1CN1P(=S)(N2CC2)N3CCOCC3
rotatable bond count: 3
mol formula: C8H16N3OPS
mol weight: 233.270901
total formal charge: 0
xlog p: 0.4
hydrogen bond donor count: 0
hydrogen bond acceptor count: 4
complexity: 258.000000
heavy atom count: 14
atom chiral count: 0
atom chiral def count: 0
atom chiral undef count: 0
bond chiral count: 0
bond chiral def count: 0
bond chiral undef count: 0
isotope atom count: 0
covalent unit count: 1
tautomer count: 1
tpsa: 18.5
CID: 6444632
IUPAC NAME:2-[[(1Z)-1-(diaminomethylidenehydrazinylidene)propan-2-ylidene]amino]guanidine;sulfuric acid
canonical smile: CC(=NN=C(N)N)C=NN=C(N)N.OS(=O)(=O)O
rotatable bond count: 3
mol formula: C5H14N8O4S
mol weight: 282.280860
total formal charge: 0
xlog p:
hydrogen bond donor count: 6
hydrogen bond acceptor count: 12
complexity: 346.000000
heavy atom count: 18
atom chiral count: 0
atom chiral def count: 0
atom chiral undef count: 0
bond chiral count: 2
bond chiral def count: 2
bond chiral undef count: 0
isotope atom count: 0
covalent unit count: 2
tautomer count: 8
tpsa: 228
CID: 2907
IUPAC NAME:N,N-bis(2-chloroethyl)-1-oxo-6-oxa-2-aza-1$l^{5}-phosphacyclohexan-1-amine
canonical smile: C1CNP(=O)(OC1)N(CCCl)CCCl
rotatable bond count: 5
mol formula: C7H15Cl2N2O2P
mol weight: 261.085961
total formal charge: 0
xlog p: 0.6
hydrogen bond donor count: 1
hydrogen bond acceptor count: 4
complexity: 212.000000
heavy atom count: 14
atom chiral count: 1
atom chiral def count: 0
atom chiral undef count: 1
bond chiral count: 0
bond chiral def count: 0
bond chiral undef count: 0
isotope atom count: 0
covalent unit count: 1
tautomer count: 2
tpsa: 41.6
CID: 31010
IUPAC NAME:2-[[3,5-dichloro-4-[(2,4-diaminopteridin-6-yl)methyl-methylamino]benzoyl]amino]pentanedioicacid
canonical smile:CN(CC1=CN=C2C(=N1)C(=NC(=N2)N)N)C3=C(C=C(C=C3Cl)C(=O)NC(CCC(=O)O)C(=O)O)Cl
rotatable bond count: 9
mol formula: C20H20Cl2N8O5
mol weight: 523.329400
total formal charge: 0
xlog p: -0.1
hydrogen bond donor count: 5
hydrogen bond acceptor count: 12
complexity: 770.000000
heavy atom count: 35
atom chiral count: 1
atom chiral def count: 0
atom chiral undef count: 1
bond chiral count: 0
bond chiral def count: 0
bond chiral undef count: 0
isotope atom count: 0
covalent unit count: 1
tautomer count: 24
tpsa: 211
CID: 233022
IUPAC NAME:(2S)-2-amino-N-[(3R,4R,4aR,5R,6R)-1,5,6-trihydroxy-3-methyl-8-oxo-3,4,4a,5,6,7-hexahydroisochromen-4-yl]propanamide
canonical smile: CC1C(C2C(C(CC(=O)C2=C(O1)O)O)O)NC(=O)C(C)N
rotatable bond count: 2
mol formula: C13H20N2O6
mol weight: 300.307700
total formal charge: 0
xlog p: -1.7
hydrogen bond donor count: 5
hydrogen bond acceptor count: 7
complexity: 491.000000
heavy atom count: 21
atom chiral count: 6
atom chiral def count: 6
atom chiral undef count: 0
bond chiral count: 0
bond chiral def count: 0
bond chiral undef count: 0
isotope atom count: 0
covalent unit count: 1
tautomer count: 10
tpsa: 142
Explanation / Answer
import java.sql.*;
public class JdbcConnectionUrl {
public static void main(String args[]) {
Connection con =null;
Statement st =null;
ResultSet rs =null;
String url = "jdbc:mysql://localhost:3306/";
String db ="xxx";
String driver= "com.mysql.jdbc.Driver";
String user ="my user";
String pass ="my pass word";
try {
Class.forName(driver);
con = DriverManager.getConnection(url + db, user, pass);
System.out.println("Connection url : "+url +db);
st = con.createStatement();
String sql = "select * from IUPAC";
rs = st.executeQuery(sql);
System.out.println("CID mol weight");
while (rs.next()) {
System.out.print(rs.getString("CID ") + " ");
System.out.println(rs.getString("mol weight "));
}
} catch (Exception e){
System.out.println(e);
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.