Relations as Tables ?

Creating tables and queries
Post Reply
Althusser
Posts: 3
Joined: Sun Dec 27, 2009 3:39 pm

Relations as Tables ?

Post by Althusser »

Hi,

i have two tables, Clients and Employees, and i want to create a Relation "Meeting" which relates an employee to a client at a certain date and time.

Afaik, this is being done by Defining a table "Meeting" with the required entries Client, Employee, Date and Time. However, using the table designer, i can only select raw data types as entries into my table and not other tables, as it should be the case for defining a relation between two entities (?)

How is this supposed to be done in OO Base ?

thanks
OpenOffice 3.1 on Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Relations as Tables ?

Post by Villeroy »

menu:Tools>Relations...
Add tables, drag connection lines between the fields.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Althusser
Posts: 3
Joined: Sun Dec 27, 2009 3:39 pm

Re: Relations as Tables ?

Post by Althusser »

Thanks

It seems i can't define any attributes for the relation, like Meeting.Date
OpenOffice 3.1 on Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Relations as Tables ?

Post by Villeroy »

Attached database with 3 lists E, C and C_E.
Watch the primary key of C_E and the relations. While in table design I selected all 3 fields and marked them as primary key.
The relation designer seems to have some bug. I created one relation (1---n), then I saved and closed the relations, refreshed the tables view (Edit>Refresh Tables) before I created the second relation (which fails to get the referencial integrity when done in one session).

The 2 forms depict the symetrical relations where each E has a set of meetings with one C and each C has a set of meetings with one E.
Both forms can be used with an additional grid view on the respective main form. When using the form, push the last button on the navigation tool bar.
The form wizard can not create this except for the main form.
The clients form has one main form with clients and a subform. The subform has a grid control which can show more than one list box of employees with associated dates.
The emplyoyees form has one main form with emplyoyees and a subform. The subform has a grid control which can show more than one list box of clients with associated dates.
Watch the hierarchy of forms, controls and grid columns using menu:View>Toolbars>Form Design, Button #5 calls the "form navigator".
Attachments
meetings.odb
another many-to-many-relation
(20.28 KiB) Downloaded 771 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply