This topic is locked

Help in database design

6/17/2010 11:46:15 AM
PHPRunner General questions
S
softy author

Hi I downloaded Phprunner to make things little automated. But I am stuck at very first step. That is database designing. I am unable to grasp as to how to go about following problem.
I am creating a database on chemicals. There are over 60000 Chemicals.

Each chemical has following category.

Name,Generic name,physical property,color,luster,hardness,melting point,boiling point etc.
I have list of approx 400 other unique chemicals classified in (base/compounds) and (metal/alloys) with their reaction formula with every 60000 chemicals.There could be many blanks(nulls - where experiments are yet to be conducted) or multiple duplicates. In short there will be (60000X200)+(60000X200) formulas in the form of strings.
The query is based on formula stored in database. Purpose of Query is to feed two inputs (x-formula and Y-formula) for search. The x-formula is to search one set of chemicals (base/compounds) while y-formula is to search (metal/alloys). Both the results from mentioned queries should update with condition "AND " to another table (common for both queries) for getting distinct record.
All the advices are welcome.

lewisgr 6/17/2010



Hi I downloaded Phprunner to make things little automated. But I am stuck at very first step. That is database designing. I am unable to grasp as to how to go about following problem.
I am creating a database on chemicals. There are over 60000 Chemicals.

Each chemical has following category.

Name,Generic name,physical property,color,luster,hardness,melting point,boiling point etc.
I have list of approx 400 other unique chemicals classified in (base/compounds) and (metal/alloys) with their reaction formula with every 60000 chemicals.There could be many blanks(nulls - where experiments are yet to be conducted) or multiple duplicates. In short there will be (60000X200)+(60000X200) formulas in the form of strings.
The query is based on formula stored in database. Purpose of Query is to feed two inputs (x-formula and Y-formula) for search. The x-formula is to search one set of chemicals (base/compounds) while y-formula is to search (metal/alloys). Both the results from mentioned queries should update with condition "AND " to another table (common for both queries) for getting distinct record.
All the advices are welcome.


Is there a Database Backend you are using? MySQL, Access, MSSQL?

J
joker 6/17/2010



Hi I downloaded Phprunner to make things little automated. But I am stuck at very first step. That is database designing. I am unable to grasp as to how to go about following problem.
I am creating a database on chemicals. There are over 60000 Chemicals.

Each chemical has following category.

Name,Generic name,physical property,color,luster,hardness,melting point,boiling point etc.
I have list of approx 400 other unique chemicals classified in (base/compounds) and (metal/alloys) with their reaction formula with every 60000 chemicals.There could be many blanks(nulls - where experiments are yet to be conducted) or multiple duplicates. In short there will be (60000X200)+(60000X200) formulas in the form of strings.
The query is based on formula stored in database. Purpose of Query is to feed two inputs (x-formula and Y-formula) for search. The x-formula is to search one set of chemicals (base/compounds) while y-formula is to search (metal/alloys). Both the results from mentioned queries should update with condition "AND " to another table (common for both queries) for getting distinct record.
All the advices are welcome.



Hello Soniaa,
The general rule (as far as i've read) is that you never want to duplicate data or have null values in tables. The reason for both is that they can have strange results in database tables where your queries are pulling odd data sets because of syntax errors.
I would set your tables up as follows:
Table Name - chemicals_standard

Field Names - Name,Generic name,physical property,color,luster,hardness,melting point,boiling point
Table Name - chemicals_basecompounds

Field Names - Name,Generic name,physical property,color,luster,hardness,melting point,boiling point
Table Name - chemicals_metalalloys

Field Names - Name,Generic name,physical property,color,luster,hardness,melting point,boiling point
Table Name - reaction_formula

Field Names - compounds, reaction type,combination name,physical property,color,luster,hardness,melting point,boiling point
At this point your queries would be directed to your "reaction_formula" table to see if a record exists based on your search for x-formula and Y-formula in the compounds field.
Just a guess, hope it helps.
-joker