Re: Informix Help Needed
Posted in 1995
> > I'm trying to implement a table with over 2.5M tuples. I'm currently > having problems defining the fields in my table and its type. Some of > the problems are: > > 1. Is there a way to define this type of linked list > (i.e. (parent child1) (parent child2) (parent child3)) in a > table without defining 6 fields: > > ---------------------------------------------------- > | parent | child | parent | child | parent | child | > ---------------------------------------------------- Why not have seperate a table for the parents with a unique integer ( say a social security number (SSN), for example) representing each parent: PARENT TABLE --------------------------- | parent ID | parent 1 | other info --------------------------- Then, relate each child to a parent through a second table: CHILD TABLE ------------------------------------------ | child ID | child 1 | parent ID | other info. ------------------------------------------ | child ID | child 2 | parent ID | other info. ------------------------------------------ and so on... Or, have a CHILD TABLE and a relationship table: CHILD TABLE --------------------------------- | child ID | child 1 | other info. --------------------------------- | child ID | child 2 | other info. --------------------------------- and so on... PARENT/CHILD RELATIONSHIP TABLE ------------------------ | parent ID | child ID | ------------------------ | parent ID | child ID | ------------------------ and so on...