SDF import issue

User 677b9c22ff

14-08-2007 00:44:48

Hi,


I had a strange problem with the SDF import,


I exported a local DB as SDF file. Under a localDB branch I created a new JChem database table. Then I imported this compound library with some manual values and calculated values back into this new data tree.





A) The first problems was that instead of n compounds it had now 2*n compounds. In the first part all the molecules were imported (without any values) and in the second part (2*n)


it had also all table values from the SDF fields imported.





B) The table did not show up in the Schema editor





C) If I tried to delete some of my values, it always asked me if I wanted delete values from my very first DB (The whole localDB project has 10 sub DBs), which I denied, even after activating this new DB branch several times.





So I just deleted these wrong branches (at least wrong for me) and the imported the SDF file as is via File import, in this way everything was OK.





Tobias

ChemAxon e189db4705

14-08-2007 20:27:31

Hi,





according to symptoms you described I guess you haven't created a new table, but just new data tree on top of you previous table (entity). Let me quickly explain it:





So called entity represents one (in current IJC version) or more (in the future) real database tables. So it means the entity represents real physical table(s) in your DB. We call it "entity" as it's not always just one DB table, but in the future will e.g. represent more DB tables joined together. Entity is an abstraction which represents set of fields (columns) and rows. Entity contains tabular data.





Entities are connected through Relationships. So called relationship is given by pair of fields. Each Field (AKA column) belongs to one specific entity. So it means relationships are connecting entities using some fields on each side.





You can imagine entities and relationships like a graph: http://en.wikipedia.org/wiki/Graph_(mathematics)


... where entities are nodes and relationships edges.





And the last term is a Data tree. DataTrees are built on top of the mentioned graph. DataTree always has some "root entity" and then takes zero or more relationships and the end entities. So datatree is a sub-graph of such a graph. In most trivial case it contains only one entity, but if you want to browse relational data it must contain at least someEntity->rel->someOtherEntity. DataTree is always oriented, so for example if you have entities A and B connected using relationship R connecting them, then you can have four possible different datatrees:


- A


- B


- A -> B


- B -> A





Datatree is just virtual object in IJC, which means it doesn't represent any physical DB table. Datatrees are built on top of physical tables (which are in IJC represented as entities). You can create more single-entity-datatrees for the same entity. then these datatree will share the entity and of course also DB table.





Schema editor shows entities with their fields. Main project explorer shows datatrees with their views (visualizations).





For more details please check docs: http://www.chemaxon.com/instantjchem/ijc_2_0/docs/user/getting-started-guide.html#keyConcepts





-----------


Back to problems you reported:


I think you created a new datatree on top of the old entity. Then if you import data into this new datatree:


(A) you will see each row twice, because each was already there before import


(B) new table is not in schema editor - as there is no new table (=no entity), just another datatree with the same root entity.


(C) Delete action is asking about deleting from entity, not datatree, because data actually always belongs to some entity, not datatree.





Maybe I am wrong and don't understand problems you described, but I don't see any other explanation for it.





Petr

User 677b9c22ff

17-08-2007 08:41:48

Hi Petr,


thank you for your explanations, I admit that I did not yet explore all the possibilities with the relational connections mainly because I would like to store www links, pictures, formated text (WIN copy paste) and spectral data together with proper views. As long this is not possible I am not likely to use that feature soon (ok maybe next week :-)





Also there was such a firework of new developments without any warning so it was just really hard to follow up. I am still dealing with converting my old work DBs to the new versions and need to check most of the entries that nothing went wrong, which is hard because I need to do that externally.





Kind regards


Tobias