I'm not talking "Days of our Lives", only church stuff. What's the
most efficient way to show relations among members, have a member
table, then a relations table (member 1, member 2, relation)? Or is
there a better way?
Another need might be church activities of members. I guess that
could be activity table and a member -- activity table.
Thanks.
Pete Keillor 19 2180
Assuming a person can only be a member of one family:
person is an entity.
family is an entity.
fam_name is the descriptor ("The Bob Smith Family")
per_family_id is a foreign key in person table
per_family_role is a descriptor of their role
Now, if you want to go "Days of Our Lives", you need a bridge table between
person and family, with family_id and person_id both being foreign keys in
table per_fam_table.
Darryl Kerkeslager
"Peter T. Keillor III" <ke*********@ch artermi.net> wrote: I'm not talking "Days of our Lives", only church stuff. What's the most efficient way to show relations among members, have a member table, then a relations table (member 1, member 2, relation)? Or is there a better way?
Peter,
Two tables, person & relation. Person has anything related to an individual
like name, etc. Relation has three columns, person, related person and
relationship. Same schema, in essence, as you would find in a
bill-of-materials or company organization chart.
"Peter T. Keillor III" <ke*********@ch artermi.net> wrote in message
news:f4******** *************** *********@4ax.c om... I'm not talking "Days of our Lives", only church stuff. What's the most efficient way to show relations among members, have a member table, then a relations table (member 1, member 2, relation)? Or is there a better way?
Another need might be church activities of members. I guess that could be activity table and a member -- activity table.
Thanks.
Pete Keillor
Hi Peter. This question is somewhat bigger than it sounds.
Presumably you already have a table of individuals, with a PersonID as
primary key.
The simplest approach is just to identify a grouping of some kind (e.g. a
household):
GroupID Autonumber primary key
GroupName Text e.g. "The Smith family"
and then have a related table to identify the members of this group:
GroupID Number foreign key to tblGroup.GroupI D
PersonID Number foreign key to tblPerson.Perso nID
With that approach, a person can be a member of 2 households (e.g. half time
with Dad, and half with Mum). The tables are often named Household and
HouseholdDetail , but the concept works exactly the same for the members of a
golf club, the members of a committee, and so on. You may want another field
in the GroupDetail table to specify the person's main role in the group,
e.g. mother, secretary, ...
The weakness of that approach is that it gives you no information about
extented families. A person is a member of a group or not. It also doesn't
tell you details of the relationships, e.g. your son, step-son, and
foster-son are all just members of the same family, so you cannot determine
the biological relationships between them. If you need to go that way, then
the approach you suggested starts to come into the picture. It does start to
get messy, though trying to define the web of relationships should be
implied through the existing relationships.
The table you suggested - fields Member1, Member2, Role - works well for
directional relations, e.g. Alex is the father of Bill. It does not work
well for reflexive relationships where Mary is the sister of Martha, and so
you want to find out if Matha is the sister of Mary, you don't know whether
to look for Matha in the Member1 field or the Member2 field.
Ultimately it comes down to finding the minimal complexity that meets your
actual needs. In some scenarios, you actually want the corporate entities
(households, committees, schools, organizations, businesses) in the Client
table, along with the individuals because it gives you ease of searching and
makes it simple to accept donations and write out receipts for both
individuals and corporate entities. In this case, the groups will be in the
Client table, and the main Group table will have a foreign key to the Client
table, and so will the GroupDetail table. This allows you to specify the
household in the Group table, and the members of the household in the
GroupDetail table. But if you make the foreign key in the Group table
optional (not required, and yes, that's possible even with Referential
Integrity enforced), you can also create ad hoc reflexive groupings of
people with a Null foreign key in the Group table and the members of the
grouping in the GroupDetail table. I think that's about as flexible as it
gets without getting complex.
If other people have different suggestions, we'd love to hear them.
(BTW, don't use Group as a table name. It's a reserved word in SQL. Perhaps
tblGroup.)
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Peter T. Keillor III" <ke*********@ch artermi.net> wrote in message
news:f4******** *************** *********@4ax.c om... I'm not talking "Days of our Lives", only church stuff. What's the most efficient way to show relations among members, have a member table, then a relations table (member 1, member 2, relation)? Or is there a better way?
Another need might be church activities of members. I guess that could be activity table and a member -- activity table.
Thanks.
Pete Keillor
I agree with what you're saying for most applications, but I'm not sure its
best for this one. For purposes of this application, I think we can say that
everyone in a family belongs to one family and no other, and that we don't
need a traceable model of the nature of people's individual
inter-relationships. The extra complexity involved in making a more "correct"
schema is probably not justified.
With that simplifying assumption, we can simply have a family table and a
person table, with each person record having a family id and a family member
type which can be free form text like parent, child, grandson which will be
reasonable to the application user in context.
Even in cases where we would need to express the relations more directly,
there are problems with your suggested schema, but that's not to berate it
because there are equally bad or worse problems with the alternatives as I'll
get to below.
The main problem with your suggested scheme is that it assumes that a
relationship only goes in one direction, from the first person, to the second.
Nevertheless, it's less problematic than the more technically correct model in
which each relationship is actually a collection containing 2 members. That
schema would require 3 records (in addition to the person records) to describe
a single relationship. That's a bit much, though it does have the possibly
dubious benefit of being able to model a polygamous marriage (one relation
involving >2 people, not represented via a common relation to another single
person).
Since I'm agreeing with your schema (regardless of its problems) for most
cases that need any more rigor that what this app seems to need, here's how I
like to work around those problems. When you do a query of relatives, you
actually need a UNION of 2 selects of the relation table, one from the first
relation id, and one from the second. You also need 2 relation type names in
the relation types table, one for the forward direction, and one for the
reverse (e.g. RelationNameFor ward="Child", RelationNameRev erse="Parent"), and
query from the appropriate type name column depending on the direction the
SELECT statement is going.
This solution leads to a new UI problem, though. You can't directly edit data
via a UNION query, so you need to use unbound forms, or some sort of
self-linked subform trickery to edit the data via MS Access.
On Sat, 13 Nov 2004 21:57:47 -0500, "Alan Webb" <kn*****@hotmai l.com> wrote: Peter, Two tables, person & relation. Person has anything related to an individual like name, etc. Relation has three columns, person, related person and relationship . Same schema, in essence, as you would find in a bill-of-materials or company organization chart.
"Peter T. Keillor III" <ke*********@ch artermi.net> wrote in message news:f4******* *************** **********@4ax. com... I'm not talking "Days of our Lives", only church stuff. What's the most efficient way to show relations among members, have a member table, then a relations table (member 1, member 2, relation)? Or is there a better way?
Another need might be church activities of members. I guess that could be activity table and a member -- activity table.
Thanks.
Pete Keillor
RE/ What's the most efficient way to show relations among members, have a member table, then a relations table (member 1, member 2, relation)? Or is there a better way?
I don't have any experience, but this sounds huge to me.
How about going to the Mormon church to see what they're doing? They're really
big on geneologies and, by implication, families.
--
PeteCresswell
It's harder to explain that to demo, so have just uploaded a basic demo of
this kind of thing at: http://allenbrowne.com/human.zip
40KB zip file.
Access 2000 or later.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message
news:41******** *************** @per-qv1-newsreader-01.iinet.net.au ... Hi Peter. This question is somewhat bigger than it sounds.
Presumably you already have a table of individuals, with a PersonID as primary key.
The simplest approach is just to identify a grouping of some kind (e.g. a household): GroupID Autonumber primary key GroupName Text e.g. "The Smith family" and then have a related table to identify the members of this group: GroupID Number foreign key to tblGroup.GroupI D PersonID Number foreign key to tblPerson.Perso nID
With that approach, a person can be a member of 2 households (e.g. half time with Dad, and half with Mum). The tables are often named Household and HouseholdDetail , but the concept works exactly the same for the members of a golf club, the members of a committee, and so on. You may want another field in the GroupDetail table to specify the person's main role in the group, e.g. mother, secretary, ...
The weakness of that approach is that it gives you no information about extented families. A person is a member of a group or not. It also doesn't tell you details of the relationships, e.g. your son, step-son, and foster-son are all just members of the same family, so you cannot determine the biological relationships between them. If you need to go that way, then the approach you suggested starts to come into the picture. It does start to get messy, though trying to define the web of relationships should be implied through the existing relationships.
The table you suggested - fields Member1, Member2, Role - works well for directional relations, e.g. Alex is the father of Bill. It does not work well for reflexive relationships where Mary is the sister of Martha, and so you want to find out if Matha is the sister of Mary, you don't know whether to look for Matha in the Member1 field or the Member2 field.
Ultimately it comes down to finding the minimal complexity that meets your actual needs. In some scenarios, you actually want the corporate entities (households, committees, schools, organizations, businesses) in the Client table, along with the individuals because it gives you ease of searching and makes it simple to accept donations and write out receipts for both individuals and corporate entities. In this case, the groups will be in the Client table, and the main Group table will have a foreign key to the Client table, and so will the GroupDetail table. This allows you to specify the household in the Group table, and the members of the household in the GroupDetail table. But if you make the foreign key in the Group table optional (not required, and yes, that's possible even with Referential Integrity enforced), you can also create ad hoc reflexive groupings of people with a Null foreign key in the Group table and the members of the grouping in the GroupDetail table. I think that's about as flexible as it gets without getting complex.
If other people have different suggestions, we'd love to hear them.
(BTW, don't use Group as a table name. It's a reserved word in SQL. Perhaps tblGroup.)
"Peter T. Keillor III" <ke*********@ch artermi.net> wrote in message news:f4******** *************** *********@4ax.c om... I'm not talking "Days of our Lives", only church stuff. What's the most efficient way to show relations among members, have a member table, then a relations table (member 1, member 2, relation)? Or is there a better way?
Another need might be church activities of members. I guess that could be activity table and a member -- activity table.
Thanks.
Pete Keillor
> "Peter T. Keillor III" <ke*********@ch artermi.net> wrote: I'm not talking "Days of our Lives", only church stuff. What's the most efficient way to show relations among members, have a member table, then a relations table (member 1, member 2, relation)? Or is there a better way?
The cleanest way to do this is to model marriages as one table
and children of that union as another.
Unions has each partner's personID as a column, plus the date of
union and the date of dissolution.
Children has the unionID and the child's personID.
Each person's address is separate, which handles childrea away at
school, etc.A little code allows to copy from a parent's address
to a child's or spouse's
Relationships to grandparents, second cousins and such can easily
be deduced from the parent-child relationships.
--
Bob Quintal
PA is y I've altered my email address.
Assuming frmPeople shows data from tblPeople, and has
frmsubRelations hips, with another PeopleID and RelationshipTyp eID.
Person1
has the following:
sister Person2
friend Person3
parent Person4
child Person5
When you want to add a relationship to Person1, and the Person2 is
new, the not-in-list event opens a pop-up to enter the new person,
Person2.
I find that if I try to enter the reciprocal relationship (Person2 is
related to Person1 as well) the entire database closes, but only on
the second person I enter. I've tried adding saves all other the
place. Could the problem be as simple as opening tblPeople too many
times? Would a recordset clone do anything better?
You are experiencing a crash? i.e. "This application has been closed by
Windows, sorry for the inconvenience." ?
We would need to know a bit more to pin-point the cause.
Name AutoCorrect is a possible culprit: http://members.iinet.net.au/~allenbrowne/bug-03.html
If this is Access 2002 or 2003, and a subform is involved, try adding a text
box to the subform for the foreign key field.
Any subqueries in the SQL statement you use to try to create the reciprocal
relation?
If none of those help, see:
Preventing Corruption
at: http://members.iinet.net.au/~allenbrowne/ser-25.html
If you are still stuck, please tell us the version of your msaccess.exe file
(typically in c:\program files\microsoft office\office), and also
msjet40.dll (typically in windows\system3 2).
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Penguin" <pe***********@ aol.com> wrote in message
news:2a******** *************** **@posting.goog le.com... Assuming frmPeople shows data from tblPeople, and has frmsubRelations hips, with another PeopleID and RelationshipTyp eID.
Person1 has the following: sister Person2 friend Person3 parent Person4 child Person5
When you want to add a relationship to Person1, and the Person2 is new, the not-in-list event opens a pop-up to enter the new person, Person2.
I find that if I try to enter the reciprocal relationship (Person2 is related to Person1 as well) the entire database closes, but only on the second person I enter. I've tried adding saves all other the place. Could the problem be as simple as opening tblPeople too many times? Would a recordset clone do anything better? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Zenobia |
last post by:
Is there a problem with the CSS font-family property with IE6 -
or is it my understanding of the font-family property?
I was under the impression that the browser tried to use the
first font. If it couldn't find that font it used the next on
the list and so on. If it couldn't find any on the list, prior
to the last it would use the last - which, as you can see is
sans-serif here.
When I use the following style I get what I think is...
|
by: lostinspace |
last post by:
Is it possible to define individual font sizes for each type in the family?
I'd like to define a 10pt font for Verdana while having the remainder of the
family options display at 12pt.
FONT-FAMILY: verdana, arial, helvetica, sans-serif;
Thanks in advance
|
by: B McDonald |
last post by:
Hi. I am trying to straighten out some DIV issues in the rendering of my
no-tables CSS website. Right now the biggest issue is trying to render 2
columns several DIVs deep in the box model for my index page. If you go to
http://galtsvalley.com/newindex.html - you will see the problem area. I've
highlighted the relevant blocks with nice, harsh primary colors.
Clearly there are positioning problems begetting flow issues - the blocks...
|
by: Fabian Neumann |
last post by:
Hi!
I got a problem with font-family inheritance. Let's say I have CSS
definitions like:
p {
font:normal 10pt Verdana;
}
strong {
font:normal 14pt inherit;
|
by: Guy Naor |
last post by:
Hi,
Are there any built in or known structures I can use in Postgres to represent a family tree?
The usual tree representations in SQL are for regular hierarchy of data, but on a family each node had usually 2 parents and a few child nodes. What will be the best way to represent something like this in an efficient manner?
Guy.
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your...
| |
by: Cliff Chapin |
last post by:
I want to create a Family database some of these "families " are single
fathers with children some are single women with children they will be
assigned Rooms /w children.
what would be the best to relate to the childrem ?
|
by: HumanJHawkins |
last post by:
Say for example, that I have a fairly complicated record of a thing
meant for the US market. Then, a Canadian version is created based on
the US one with a few changes so I want to track the connection. It is
fairly easy to make a ParentID field that would indicate the Canadian
thing descended from the US thing.
But, if I then make a British thing from the Canadian one (and I want
to do this because the Canadian one is a closer match to...
|
by: redslider |
last post by:
now for my dumb-question (i note the other forum on 'inheritance' is closed):
my question is about inheriting text properties, and specifically, if font-family values can be cumulatively inherited? That is,
if i have a font-family in a parent div, and I specify 'font-family:"some font" in a child div, will the child also inherit the parent div's font-family if an instance fails to locate the child's specification? - in the sketchout...
|
by: Giampaolo Rodola' |
last post by:
Hi there,
since the socket.socket.family attribute has been introduced only in
Python 2.5 and I need to have my application to be backward compatible
with Python 2.3 and 2.4 I'd like to know how could I determine the
family of a socket.socket instance which may be AF_INET or AF_INET6.
Is there some kind of getsockopt() directive I could use?
For now I've been able to determine the family by using:
# self.socket = a connected...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |