CHILD RECORDS WITHOUT PARENT
Posted: Mon 28 Dec 2009 23:57
I have a situation in which there are 2 tables, a parent and a child, but in my case the child table is filled first. When the user finishes typing the child records he or she can decide whether or not to keep the information. If the data is kept then a record is generated in the parent table and at this time the child records are connected. While no parent record exists, the field in the child table that will connect to the parent table is temporarily filled with a value of -1, such a field is of type bigint. This issue prevents me from defining a relation because the user is inserting child records with no parent. I asked this question in a PostgreSQL forum and I was told to set the value of NULL instead of -1.
Is this possible for an integer or bigint field? If so, how?
Respectfully,
Jorge Maldonado
Is this possible for an integer or bigint field? If so, how?
Respectfully,
Jorge Maldonado