Hi
So in the editing can you change the direction? or rather the way that the relationships works?
Regards from
Tom
________________________________
From: Girvin R. Herr <girvin.herr@sbcglobal.net>
To: Tom Davies <tomdavies04@yahoo.co.uk>
Cc: Dan Lewis <elderdanlewis@gmail.com>; "users@global.libreoffice.org" <users@global.libreoffice.org>
Sent: Thursday, 10 January 2013, 21:44
Subject: Re: [libreoffice-users] Re: Base scenarioTom,
Yes. I confirmed that right-clicking on a join line does allow deleting or editing.
If I understand you correctly, no, relationship definitions should not be part of the back-end. The table relationship is defined for the back-end by the front-end through the SQL statements. For example, I have a table of suppliers, with names and addresses and other contact information. This table is related to almost all of my database (main) tables. Additionally, each "main" table has its own set of table relationships with other (sub?) tables, most of which are for selecting options with a join. Each record of these option tables contains a primary key and a text field for the option. For example, I have a table of statuses for the item in the main table record. An integer foreign key in the main table contains a primary key value corresponding to the text element of the statuses table record. That way, I am only storing an integer (key value) in the main table, rather than the option text, and with no repeated option text. It
also standardizes the option texts. All of these multiple relationships must be defined by me - ergo it needs to be in the front-end.
Hope this helps clarify this.
Girvin HerrTom Davies wrote:
Hi
Can you right-click on a relationship's join-line and edit it's properties? Shouldn't the relationships be part of the back-end rather than defined in the front-end? Regards from
Tom________________________________
From: Dan Lewis <elderdanlewis@gmail.com>
To: users@global.libreoffice.org Sent: Wednesday, 9 January 2013, 4:14
Subject: Re: [libreoffice-users] Re: Base scenarioComment inline below.
--Dan
Ian,
Have you actually drawn any relationships? Base will not do that for you. Just adding the tables in the 'Relationships Window' will not create the relationships automagically. You must click and hold on the one table element (remote key) and drag over to the related table's element (primary key), then release the mouse button. Base will then draw a line between the two. Note, the order of the drag is important. It determines the type of join. Joins are confusing to me too, so I can't help much there. I had to experiment with the direction to get it to work right. I think it was remote key to primary key, but I am not sure of that any more.Warning! The way the SQL language is set up, if either of the ends of a join (relationship) is NULL, then the record will be discarded and not show up in your result set. No warnings, no errors. Data records will just be missing. IMHO, this is stupid (my mantra is: "thou shall not lose data"), but that is how the SQL language was set up. So, make sure any joined data elements in all of your table records are not NULL. Note that NULL is not zero (0) and vice-versa! NULL means that there is no data in the record element. I use a lot of remote keys in my database main tables that point to primary keys (options) in other tables. In those other tables, I have made it a point to make the data elements of the first record to be "-", which is my equivalent of unknown, just to have something to select that is not NULL. You could probably use a blank (" "), but I prefer seeing the "-" in forms and reports. Most times in reports, it is
hard