Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

ParadoxField?

 
   Database Forums (Home) -> Paradox RSS
Next:  Mal-Pasting  
Author Message
MichaelR

External


Since: Apr 22, 2008
Posts: 3



(Msg. 1) Posted: Tue Apr 22, 2008 7:20 am
Post subject: ParadoxField?
Archived from groups: comp>databases>paradox (more info?)

Hi,
I am trying to create a Database which should have fields
pointing to a Paradox field. e.g:

Table1 {
int value;
int value2;
char Name;
Table1 Person; <----- Is that possible, and how it's done?
}


regards
M.

 >> Stay informed about: ParadoxField? 
Back to top
Login to vote
Tony McGuire2

External


Since: Feb 25, 2004
Posts: 519



(Msg. 2) Posted: Tue Apr 22, 2008 7:20 am
Post subject: Re: ParadoxField? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You would probably be better served to ask this in a forum for your
particular programming language.

That said, I've never heard of what you are asking for being a part of
any language/table structure.


--
------------------------------
Tony McGuire

 >> Stay informed about: ParadoxField? 
Back to top
Login to vote
Jim Giner

External


Since: Mar 14, 2008
Posts: 7



(Msg. 3) Posted: Tue Apr 22, 2008 11:19 am
Post subject: Re: ParadoxField? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Maybe you could try explaining what you want to do without the example - be
specific even.
wrote in message

> Hi,
> I am trying to create a Database which should have fields
> pointing to a Paradox field. e.g:
>
> Table1 {
> int value;
> int value2;
> char Name;
> Table1 Person; <----- Is that possible, and how it's done?
> }
>
>
> regards
> M.
 >> Stay informed about: ParadoxField? 
Back to top
Login to vote
MichaelR

External


Since: Apr 22, 2008
Posts: 3



(Msg. 4) Posted: Wed Apr 23, 2008 7:18 am
Post subject: Re: ParadoxField? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,
I'd like to do a Table containing my Family-Relationship( Record no1:
Me, Record No2: My Mother,...) I need a field in the Record which
contains the pointer to the Record containing the data of that
specific person.

e.g.: Table Person
RecordSet:
Field1 Name;
Field2 Birthday;
Field3 Adress;
Field4 Mother; <--------- other Record in the same table;
Field5 Father; <---------- " " " ;

I am sorry for that last example. I'm into C-Programming too.
Hope that helps.
M.

On Tue, 22 Apr 2008 11:19:32 -0400, "Jim Giner"
wrote:

>Maybe you could try explaining what you want to do without the example - be
>specific even.
> wrote in message
>
>> Hi,
>> I am trying to create a Database which should have fields
>> pointing to a Paradox field. e.g:
>>
>> Table1 {
>> int value;
>> int value2;
>> char Name;
>> Table1 Person; <----- Is that possible, and how it's done?
>> }
>>
>>
>> regards
>> M.
>
 >> Stay informed about: ParadoxField? 
Back to top
Login to vote
rdapres

External


Since: Jan 21, 2005
Posts: 71



(Msg. 5) Posted: Wed Apr 23, 2008 9:51 am
Post subject: Re: ParadoxField? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

There was a long discussion on just this sort of structure for
normalizing a set of relationships for people (and another for cows
IIRC) in the newsgroups. You may want to search for it (search on words
like Mother & Father (not child as that will get you a ton of non
relevant stuff) and maybe cows (in case I am remembering correctly) and
you should find the threads.

You may also want to read my Normalization primer which you can find on
our paradox resources page (link in my signature). It will help you with
things like why you should break addresses into a separate table and a
bunch of fields and then link people to addresses (some likely live
together, others will move over time, etc.) and break Name into parts,
pull out the relationships to a separate relationship table, etc.

Denn Santoro
President
Resource Development Associates
http://www.RDAWorldWide.Com
Offices in the United States and Germany
Providing solutions to health care, business, governments and
non-profits since 1982

MichaelR RemoveThis @niemand.org wrote:
> Hi,
> I'd like to do a Table containing my Family-Relationship( Record no1:
> Me, Record No2: My Mother,...) I need a field in the Record which
> contains the pointer to the Record containing the data of that
> specific person.
>
> e.g.: Table Person
> RecordSet:
> Field1 Name;
> Field2 Birthday;
> Field3 Adress;
> Field4 Mother; <--------- other Record in the same table;
> Field5 Father; <---------- " " " ;
>
> I am sorry for that last example. I'm into C-Programming too.
> Hope that helps.
> M.
>
> On Tue, 22 Apr 2008 11:19:32 -0400, "Jim Giner"
> wrote:
>
>> Maybe you could try explaining what you want to do without the example - be
>> specific even.
>> wrote in message
>>
>>> Hi,
>>> I am trying to create a Database which should have fields
>>> pointing to a Paradox field. e.g:
>>>
>>> Table1 {
>>> int value;
>>> int value2;
>>> char Name;
>>> Table1 Person; <----- Is that possible, and how it's done?
>>> }
>>>
>>>
>>> regards
>>> M.
>
 >> Stay informed about: ParadoxField? 
Back to top
Login to vote
Tom Krieg

External


Since: Apr 23, 2008
Posts: 3



(Msg. 6) Posted: Wed Apr 23, 2008 7:04 pm
Post subject: Re: ParadoxField? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ah! recursion. If it's only to one level, then it's easy.

Persons
Field1 PersonID (Meaningless Identifier)
Field2 Name
Field3 Birthday
Field4 Address
Primary Key = PersonID

Relationships
Field1 RecordID (Meaningless Identifier)
Field1 PersonID - points to Persons record of this person
Field2 RelativeType - 1 = Father; 2 = Mother, 3 = Brother, 4 = Sister
Field2 RelativeID - points to PersonID of relative
Primary Key = RecordID
Secondary Index on PersonID + RelativeType + RelativeID (Unique)

Then you can look at a person and find all their relatives. For father,
look for RelativeType = 1, Mother = 2, all brothers = 3, all sisters = 4.

HTH

MichaelR.TakeThisOut@niemand.org wrote:
> Hi,
> I'd like to do a Table containing my Family-Relationship( Record no1:
> Me, Record No2: My Mother,...) I need a field in the Record which
> contains the pointer to the Record containing the data of that
> specific person.
>
> e.g.: Table Person
> RecordSet:
> Field1 Name;
> Field2 Birthday;
> Field3 Adress;
> Field4 Mother; <--------- other Record in the same table;
> Field5 Father; <---------- " " " ;
>

--
Tom Krieg

---------------
http://www.krieg.com.au
http://www.fam.krieg.com.au
Please use the contact page to contact me via email
 >> Stay informed about: ParadoxField? 
Back to top
Login to vote
Tom Krieg

External


Since: Apr 23, 2008
Posts: 3



(Msg. 7) Posted: Wed Apr 23, 2008 7:12 pm
Post subject: Re: ParadoxField? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In the Relationships table, also create another secondary index on
RelativeID, then you can do a reverse search. This gets a little more
complicated.

Add an extra 2 options to RelativeType -5 = Son, 6=Daughter

Tom Krieg wrote:
> Ah! recursion. If it's only to one level, then it's easy.
>
> Persons
> Field1 PersonID (Meaningless Identifier)
> Field2 Name
> Field3 Birthday
> Field4 Address
> Primary Key = PersonID
>
> Relationships
> Field1 RecordID (Meaningless Identifier)
> Field1 PersonID - points to Persons record of this person
> Field2 RelativeType - 1 = Father; 2 = Mother, 3 = Brother, 4 = Sister
> Field2 RelativeID - points to PersonID of relative
> Primary Key = RecordID
> Secondary Index on PersonID + RelativeType + RelativeID (Unique)
>

--
Tom Krieg

---------------
http://www.krieg.com.au
Please use the contact page to contact me via email
 >> Stay informed about: ParadoxField? 
Back to top
Login to vote
MichaelR

External


Since: Apr 22, 2008
Posts: 3



(Msg. 8) Posted: Thu Apr 24, 2008 7:15 am
Post subject: Re: ParadoxField? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,
yes it's recursion. But I suppose more than one level. I would take it
as fas as plausible data takes me.
In the Table Relationships.Field1 (PersonsID) which field type do you
take? That is my main problem.


M.

On Wed, 23 Apr 2008 19:12:35 +1000, Tom Krieg <"Please use the website
contact form"> wrote:

>In the Relationships table, also create another secondary index on
>RelativeID, then you can do a reverse search. This gets a little more
>complicated.
>
>Add an extra 2 options to RelativeType -5 = Son, 6=Daughter
>
>Tom Krieg wrote:
>> Ah! recursion. If it's only to one level, then it's easy.
>>
>> Persons
>> Field1 PersonID (Meaningless Identifier)
>> Field2 Name
>> Field3 Birthday
>> Field4 Address
>> Primary Key = PersonID
>>
>> Relationships
>> Field1 RecordID (Meaningless Identifier)
>> Field1 PersonID - points to Persons record of this person
>> Field2 RelativeType - 1 = Father; 2 = Mother, 3 = Brother, 4 = Sister
>> Field2 RelativeID - points to PersonID of relative
>> Primary Key = RecordID
>> Secondary Index on PersonID + RelativeType + RelativeID (Unique)
>>
 >> Stay informed about: ParadoxField? 
Back to top
Login to vote
Tom Krieg

External


Since: Apr 23, 2008
Posts: 3



(Msg. 9) Posted: Thu Apr 24, 2008 5:08 pm
Post subject: Re: ParadoxField? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Sorry, that should be

Relationships
Field1 RecordID (Meaningless Identifier)
Field2 PersonID - points to Persons record of this person
Field3 RelativeType - 1 = Father; 2 = Mother, 3 = Brother, 4 = Sister
Field4 RelativeID - points to PersonID of relative
Primary Key = RecordID
Secondary Index on PersonID + RelativeType + RelativeID (Unique)

You should also include son/daughter in the relative type.

In Paradox, I would make PersonID and RecordID fields meaningless long
Integers, in a MS SQL database a GUID would be suitable. The RecordID
field identifies a unique relationship of one person to one other
person. You wouldn't necessarily use this in your logic but Paradox
requires a unique primary key to have secondary indexes. You could, of
course, have a primary key of PersonID + Relative Type + RelativeID as a
compound key.

It's the PersonID key in the Persons table that has a relationship to
the PersonsID field in the Relationships table (1 -->>M) via the
secondary index (this links all immediate relatives 1 generation up, one
down and one sideways), and the RelativeID field in the Relationships
table relates back (1 --> 1) to the PersonID of the relative via the key
of the Persons table.

Through recursion, you can step through the database up, sideways or
down for as many levels as you want.

MichaelR.DeleteThis@niemand.org wrote:
> Hi,
> yes it's recursion. But I suppose more than one level. I would take it
> as fas as plausible data takes me.
> In the Table Relationships.Field1 (PersonsID) which field type do you
> take? That is my main problem.
>
>



--
Tom Krieg

---------------
http://www.krieg.com.au
Please use the contact page to contact me via email
 >> Stay informed about: ParadoxField? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
TREEVIEW EN PARADOX - He desarrollado una aplicación utilizando el TImage List de Microsoft pero en algunos eventos me saca el mensaje GPV. ? que puede ser. La aplicación se encuentra en esta direccion ftp.gestioninformatica.com.co

A Paradoxical SQL Problem - I'm trying to solve this in an old Paradox database. Any suggestions (other than "don't use Paradox") would be appreciated: I have two tables USER_SKILL (USER,SKILL_ID,SKILL_LEVEL) e.g. Fred 10 3 Fred 12 4 Jim 11 4 SKILLS (SKILL_ID,SKILL_NA...

Desktop forms - Hi, I am getting back into Paradox after a long absence and am having a hard time trying to remember how to open a form as the desktop without having the Paradox desktop in the background. I know Paradox has to be open and minimized. The command is..

Pdx v11(?) ODBC - Hi Does anyone know where I might find an ODBC driver for Paradox v11 (I think! - they're certainly quite recent vintage) tables? Thanks Brian Abbott

Paradox 8 - Hi, I have recently been searching the job sites for Paradox contract work and havee been seeing alot of Paradox 8 positions. What's the big deal about Paradox 8? Thanks, Fred
   Database Forums (Home) -> Paradox All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]