Database People?

ICRS

Banned
Apr 20, 2008
1,328
0
0
Here is an image of what I am trying to do I can't explain it well in text, so look at the diagram. Any help is appreciated, so thanks in advance.

Database help


Hope this will clear it up.

Think of it like this.

You have persons in Group A.

You have persons in Group B.

You have persons in Group C.


Each A, B, C are different and need to be stored in different tables.

People in group B must always enter into an agreement 1 or many people in group A. Two different people in group B can enter into an agreement with the same person in group A.
This agreement shall be referred the joint AB entity, and stored in table AB.

People in Group C are even more dependent, they must set up an agreement with 1 or more joint AB entity. Two different people in C can also set up an agreement with the same joint AB entity. This agreement shall be refered to as the joint ABC entity and stored in table ABC.

Here is what you have:

People in Group A (Table A)
People in Group B (Table AB)
People in Group C (Table C)

Joint agreement with a person in group A and B (Table AB)
Joint agreement with a person in group C and With a joint AB (Table ABC)


Now bank accounts D. (Table D):

Now we need to tie these bank accounts to EITHER
A person in table A.
A joint agreement between A and B.
A joint agreement between AB and C.



-----------------------------
There are proper forums for such questions.

This is the second time you have posted in OT on this subject.

This thread will not be moved.
The next time you will be given a chance to review the forum guidelines without the distraction of posting.

Senior Anandtech Moderator
Common Courtesy
 

Saint Nick

Lifer
Jan 21, 2005
17,722
6
81
Thats quite possibly the most confusing ER diagram I've ever seen, same with the business rules listed below it
 

Zach

Diamond Member
Oct 11, 1999
3,400
1
81
I have seen way worse..

Wouldn't you make all the letters the primary keys (serial ints) and add columns as needed to reference the other tables?
 

KLin

Lifer
Feb 29, 2000
29,555
163
106
What's wrong with the previous thread you posted that got moved to the programming forum?
 

XZeroII

Lifer
Jun 30, 2001
12,572
0
0
I see your problem. A, B, C and D need to be renamed to Alf, BigBoy, Charles and Doggie.

Glad to help...anytime.
 

I Saw OJ

Diamond Member
Dec 13, 2004
4,923
2
76
Originally posted by: XZeroII
I see your problem. A, B, C and D need to be renamed to Alf, BigBoy, Charles and Doggie.

Glad to help...anytime.

Win
 

Axoliien

Senior member
Mar 6, 2002
342
0
0
Yeah I don't quite get it... Why is this not a standard ER diagram with business intelligence through design or triggers, etc? I mean I get you want your data to be stored in a certain way, but eh? Oh yeah, and ditto to alkemyst...
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
That's one of the most perplexing descriptions I think I've ever read. That said, in parsing what was written in about 10 seconds, it sounds like you're trying to accomplish what's called a junction table. Googling around will produce plenty of results for you on that.
 

ICRS

Banned
Apr 20, 2008
1,328
0
0
Originally posted by: alkemyst
WTF are you trying to accomplish with this schema?

Something complex.

These are hard business relationship between each table. The database MUST capture this relationship in full.
 

ICRS

Banned
Apr 20, 2008
1,328
0
0
Originally posted by: alkemyst
WTF are you trying to accomplish with this schema?

Something complex.

These are hard business relationship between each table. The database MUST capture this relationship in full.

The ER table is directly from SQL 2005, I just redid it in paint. Also it is only part of the whole database which has over 100 tables and relationships all over the place.
 

ICRS

Banned
Apr 20, 2008
1,328
0
0
Some info. We are also making the database as normalized as possible. It is actually very normalized.
 

ICRS

Banned
Apr 20, 2008
1,328
0
0
Hope this will clear it up.

Think of it like this.

You have persons in Group A.

You have persons in Group B.

You have persons in Group C.


Each A, B, C are different and need to be stored in different tables.

People in group B must always enter into an agreement 1 or many people in group A. Two different people in group B can enter into an agreement with the same person in group A.
This agreement shall be referred the joint AB entity, and stored in table AB.

People in Group C are even more dependent, they must set up an agreement with 1 or more joint AB entity. Two different people in C can also set up an agreement with the same joint AB entity. This agreement shall be refered to as the joint ABC entity and stored in table ABC.

Here is what you have:

People in Group A (Table A)
People in Group B (Table AB)
People in Group C (Table C)

Joint agreement with a person in group A and B (Table AB)
Joint agreement with a person in group C and With a joint AB (Table ABC)


Now bank accounts D. (Table D):

Now we need to tie these bank accounts to EITHER
A person in table A.
A joint agreement between A and B.
A joint agreement between AB and C.



 

sao123

Lifer
May 27, 2002
12,650
203
106
Originally posted by: ICRS
Hope this will clear it up.

Think of it like this.

You have persons in Group A.

You have persons in Group B.

You have persons in Group C.


Each A, B, C are different and need to be stored in different tables.

People in group B must always enter into an agreement 1 or many people in group A. Two different people in group B can enter into an agreement with the same person in group A.
This agreement shall be referred the joint AB entity, and stored in table AB.

People in Group C are even more dependent, they must set up an agreement with 1 or more joint AB entity. Two different people in C can also set up an agreement with the same joint AB entity. This agreement shall be refered to as the joint ABC entity and stored in table ABC.

Here is what you have:

People in Group A (Table A)
People in Group B (Table AB)
People in Group C (Table C)

Joint agreement with a person in group A and B (Table AB)
Joint agreement with a person in group C and With a joint AB (Table ABC)


Now bank accounts D. (Table D):

Now we need to tie these bank accounts to EITHER
A person in table A.
A joint agreement between A and B.
A joint agreement between AB and C.



Ill say the same thing i said in your otheer thread... this relationship might make more sense if you could explain it in the business case..

no matter, one of the D relationships is going to have the be the primary on, otherwise you will have cyclical redundancy and your queries will fail.
 

mugs

Lifer
Apr 29, 2003
48,920
46
91
Originally posted by: ICRS
Hope this will clear it up.

Think of it like this.

You have persons in Group A.

You have persons in Group B.

You have persons in Group C.


Each A, B, C are different and need to be stored in different tables.

People in group B must always enter into an agreement 1 or many people in group A. Two different people in group B can enter into an agreement with the same person in group A.
This agreement shall be referred the joint AB entity, and stored in table AB.

People in Group C are even more dependent, they must set up an agreement with 1 or more joint AB entity. Two different people in C can also set up an agreement with the same joint AB entity. This agreement shall be refered to as the joint ABC entity and stored in table ABC.

Here is what you have:

People in Group A (Table A)
People in Group B (Table AB)
People in Group C (Table C)

Joint agreement with a person in group A and B (Table AB)
Joint agreement with a person in group C and With a joint AB (Table ABC)


Now bank accounts D. (Table D):

Now we need to tie these bank accounts to EITHER
A person in table A.
A joint agreement between A and B.
A joint agreement between AB and C.

Is an AB agreement always one to one? Meaning person B1 has an agreement with A1, and another agreement with A2? Or are persons B1, B2, B43, A4, A7, A9 all in a single agreement together (as well as possibly other agreements with other groups)?

Same question with C.
 

OdiN

Banned
Mar 1, 2000
16,430
3
0
Okay....I'm a Database Analyst by day...and you're confusing me.

Mainly because I have NO CLUE what you're trying to accomplish. A, B, C, D, AB, A, CA, DA, ABC....wtf?

There are not data types, nor any real information about what's in the tables. How do I even know if your design is correct? There may be a MUCH simpler way to organize the data so that you can accomplish what you need. That diagram doesn't help.

It really sounds like a mess. I would need to know what kind of data you're storing, what you're actually trying to do with the data. Not this esoteric A, B, C crap.

Why are A, B, C different and need to be stored in different tables? You have people in each one - okay so what - why can't you have a Department ID or some identifier to show which department they work in or something like that? Then you'd reduce those 3 tables down to 1 table with people in it. Less confusing.

What is this "agreement" you're talking about?

We really need more information in order to help you.
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
Why do A B C need separate main tables? People should be in a people table, and people groups should be in a different table. Two tables total, one to house people, and one to say if they are A B C. Or if they can only be in one group, one table.
 

OdiN

Banned
Mar 1, 2000
16,430
3
0
Originally posted by: torpid
Why do A B C need separate main tables? People should be in a people table, and people groups should be in a different table. Two tables total, one to house people, and one to say if they are A B C. Or if they can only be in one group, one table.

Yeah I think the OP needs to read up on DB normalization before he gets too far into something like this.

He may not be able to normalize for some reason, but we need to know why.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |