Jump to content

Barbapapa24

Members
  • Content Count

    15
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Barbapapa24

  • Rank
    member
  1. Attached are a cleaned up relationship graph and the final script : it works! There is one interesting quirk though: if there is a set of sentence records which has no morpheme records associated with it, the last of those records gets associated all the morphemes associated with the translations. This is not a problem in real life, as all sentence records have morpheme records associated with them (there are no 'missing' translations in the Sentence table), but it was a problem while testing as I kept wondering what was going on with that! I'm going to try it on my real database now
  2. Hi comment - thanks so much for creating the database and the script, it works really well - I have the same script, the same relationships, and it just doesn't seem to work! I really don't understand why... I'm posting the relationships and my version of your script again - hopefully it's just some glaring stupid thing I am just not seeing - (really sorry to be so tedious..).
  3. Sorry about all the confusion...thanks for not giving up on me! Yes, OriSentMorphemes is the table which is connected to the Sentence table connected by SentenceID (see below). Yes, it is also true that the relationship between the second instance of the Morphemes table (let's call it TransMorphemes) is connected to the Translations table via the Translation ID, but through a different foreign key: Sentences - pk_sentence_ID - fk1_morpheme_ID - Morphemes Translations - pk_translation_ID - fk2_morpheme_ID - Morphemes I think my problems arise from this unlucky construction
  4. You are right and I understand what you are saying, but I am unsure how to implement this in the script... Your step: Replace Field Contents [ Morphemes::TranslationID ; $translationID ] Does sort of conform with Replace Field Contents [ OriSentMorphemes::fk2_morpheme_ID; $translationID ] because OriSentMorphemes is the table which is connected to the Sentence table, but the ID used (fk2_morpheme_ID) is used for the connection between the Morphemes and the Translation table. So I understand why I got that result, but I'm not sure what to do about it: Replace Field Conte
  5. Sorry for not being clearer: the script now relates ALL the morpheme records (all the Morphemes records present) to the LAST record that is copied from Sentences to Translations; instead of relating each Morpheme record that was associated with each copied Sentence record to each of the newly copied record in Translations. So I think we need another step somewhere to make sure the latter and not the former happens?
  6. You are right, of course: I had the wrong table occurence for the Morphemes table. Sorry! We seem to be on the right track: the current version (see attachment) correctly imports the sentence records, and copies all of the morphemes related to them into the last record that is copied. So I think we miss a step somewhere...?
  7. Aha, you were right of course! Now it works so far in that correctly imports the sentences, but the morpheme part is not working. I'm wondering whether it would be a good idea to make this work with a specific loop again, going through all the different morphemes associated with each record from sentences and then creating new records from them (duplicating them in the same table I guess, but I wouldn't mind!)? Or is there something wrong with the script in this respect?
  8. Yes, the table occurences are fine - I've just taken out the bit about the Morphemes to see more clearly what it is doing, and this version makes one correct copy from Sentences to Translations (the first record), and then stops...?
  9. Hi comment and bcooney! Thanks for that script outline, I really think something like that should work! It makes a lot of sense. However, for some reason it doesn't... I've attached a print-screen of one version of your outline. For some reason, even copying the content of sentence fields into the newly created Translation record doesn't work, and I don't understand why. The morphemes don't get transferred either... The relationships that you assumed are the ones that are present in the database.... so I'm unsure why it is not working! As for bcooney's comment, I work on an phylogene
  10. Hi comment and bcooney, yes, comment is right - the sentence can be considered as one of it's own translations, so that is why I want it to be in the Translations table. I have to export all the records into a tab separated format and run scripts on them quite often, and it's just a hassle to export from two tables instead of one. Another reason for the import is that I want to change some things to the database, add some fields etc., which need to be added for both the sentences and the translations. It doesn't make sense to do things twice, so I'd like to make those changes in the trans
  11. Hi! I want the second option you mention: I want to import all my sentence records to the translations table, and the imported records should still be related to the same child records (from morphemes) as the original sentence. I really don't know what would be the best option, so if you have some ideas I'd be happy to hear them!
  12. Hi, I've attached three screen-shots that hopefully make things more clear (please don't look at my terrible lay out and cluttered relationship design...). One is the relationship structure, and the other two are of a record in 'Sentences' and the same record now imported in 'Translations'. As you can see, with the record in 'Sentences' there is related information in a portal with the table Morphemes, it's the third portal reading 'ja', '3SG', 'wel', etc. (This is all just fantasy words made up for the purpose of this post.) In the imported record in Translations, we see that the se
  13. Hi, I'm sorry, I've tried several different things now and I really cannot figure out how to do this by myself... I really need some help! Immense thanks to anyone who might be able to help!
  14. Hi, yes, I believe this should be possible too, but I simple do not know how ! So, Sentences and Translations are related through the primary key of Sentences and the foreign key of translations. Each sentence record is related to several translation records in this way. I think that if I would import the sentences records, making the foreign key of the newly created Translations records correspond to the primary key of the Sentences records that are imported, each 'new' Translation record will be associated with the right parent record in Sentences (i.e., for each individual record
  15. Dear all, I have a question about duplicating records. I have two tables: ‘Sentences’ and ‘Translations’. The table Sentences consists of a set of records that have ‘original’ sentences taken from books, the table Translations consists of a set of records that have translations of those original sentences into a set of different languages. What I actually often need to extract from the database is a data from both the original sentences and the translations. Now, I need to do that once for the Sentences table and once for the Translations table, so that is not very handy. This i
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.