User a4960ab6cd
26-01-2011 19:06:57
Folks
I am a new academic user trying to learn the basics. I set up a new project with a new data tree and structure table. When I created the data tree and structure table, I checked the box marked "duplicate filtering," but then I realized that I might have more than one batch of the same material. Is there a way to change this setting once the data tree is set up and in use? If not, do I need to create a new data tree and start from scratch, or is there some other way to track different batches of the same material? Thanks.
Benjamin E Blass
ChemAxon fa971619eb
28-01-2011 09:14:40
Hi, the duplicate filtering setting can be changed at any time. The current setting will be used for import. If you have already imported structures and need to change how duplicates for those are handled then you will mot likely need to start again.
For handling batch data the simplest approach is just to use a single table and allow duplicates. However this is a bit simplistic. A better approach is to have two tables, one to handle the structures (without duplicates) and the other to handle the batch data. There would be a one-to-many relationship between the two (one structure can have many batches). You can create this sort of arrangment with the schema editor, ot just be creating a new detail table for the structure table to handle the batch data. See here for more info:
http://www.chemaxon.com/instantjchem/ijc_latest/docs/user/help/htmlfiles/editing_database/ways_of_editing.html
/>http://www.chemaxon.com/instantjchem/ijc_latest/docs/user/help/htmlfiles/relational_data/about_relationships.html
As an example look at the Wombat data that is include in the IJC demo project. In this case the detail table is for assay result, not batch data, but the idea is the same.
Tim
User a4960ab6cd
28-01-2011 13:15:46
Tim
Thanks for the information. I found the way to turn off the duplicate filtering settings, but you are correct, this is a litle too simplistic of an approach. I do not want the team that I am working with the enter multiple copies of the same structure. As to the relationship system set up in the Wombat examlpes, I saw that when I was reading/watching the demos and information on the software, but have been having difficulty understanding how to set up the second table and the relationships. I realize I am probably being a little dense here, but once I have my first table set up with the structurak data, how do I establish the link to the second table. I have tried but keep getting error message about improper relationships (no jokes there, please:). Thanks.
Benjamin E Blass
ChemAxon fa971619eb
28-01-2011 14:01:13
This is one of the more advanced topics. Information on how to do this can be found here, and the pages linked to from that page:
http://www.chemaxon.com/instantjchem/ijc_latest/docs/user/help/htmlfiles/relational_data/about_relationships.html
But in summary:
1. Create a table for the batch and add a field for the strucutre ID to it. The field should be an integer field and will contain the IDs (the CdID field) of the structure table.
2. Create a relationship betwen the two entities. In your case this will be a many-to-one relationship from the batch to the structure entity using the structure ID fields in both.
3. Add a "edge" to the structure data tree using this relationship so that the batch entity is a child of the strucutre
4. Create/modify forms so that data from both entities are seen.
If you have problems creating the relationship it is likley to be because values for structure IDs in the batches table to not exist in the structure table.
An alternative approach to steps 1, 2 and 3 is to use the "New detail table..." function from the r-click menu of the data tree in the project window. This provides simpler way to do these steps, but with less control and options. But it should be sufficient for this purpose.
Tim
User a4960ab6cd
28-01-2011 18:14:27
Tim
Thanks for the information. I followed the instruction you provided, but I am still having some problems. I was able to set up the new field, establish the relationship, and create the edge with the child relationship, but it is not clear to me how I enter the additional batches of the single compound. That is to say, if I prepare and register a first batch of phenethylamine (not currently in the database, duplicate structure detection on), I can enter that compound as a new line in the grid view of the structures part of the data table and a new line will appear with the relavant data. How and where do I enter in the information when a second batch of phenethylamine is prepared? The calculated values and structure will be the same, only the batch number changes, but there does not seem to be a way in the structures section of the tree to indicate that a new batch of the same material has been prepared, even though I have created a batch table (see attachments). I get the feeling I am missing something very basic here, so I apoligize for that, but I am still very new to database creation. Thanks.
Benjamin E Blass
ChemAxon fa971619eb
29-01-2011 17:52:39
Hi Benjamin,
from your screenshots it looks like you have set up the data tree correctly. So the problem now moves on to how to insert the data. To do this you should create a form for the data tree and put appropriate widgets for both entities (tables) on the form. You should use a table widget for the batch entity as there will be multiple batches, one per row.
For the structure entity you can use a table widget to see all strucutres or widgets that display data from only a single row, whichever you prefer. See here for an animation on how to do this.
http://www.chemaxon.com/instant-jchem-animations/working-with-data/relational-forms/
Then to add data use the 'New row' button in the toolbar. To control which entity the row is inserted into you select a widget from the appropriate entity. e.g. select the structure widget and the 'New row' dialog will work for the structure entity, or select the table widget for the batch and then the 'New row' will work for the batch entity.
So to do your case of adding 2 batches for phenylanine first insert this moleucle into the structure table, then select the batch table widget, and add two new rows to it.
Tim