Results 1 to 5 of 5

Thread: Parent Child Table Relationship

  1. #1

    Parent Child Table Relationship

    Do you think – that is possible to have a foreign key enable on a child table with the data which is not available in parent table.


  2. #2
    Contributing Member
    Join Date
    Sep 2007
    Answers
    35

    Re: Parent Child Table Relationship

    its not possible to enter data in child table which is not available in parent table.

    it will gives an error like integrity constraint voilated.parent key not found,when ur trying to insert.


  3. #3
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Parent Child Table Relationship

    If you can do that ,then what is the use of foreign key then.


  4. #4
    Junior Member
    Join Date
    Feb 2008
    Answers
    1

    Re: Parent Child Table Relationship

    Quote Originally Posted by srivastava.sujata View Post
    Do you think – that is possible to have a foreign key enable on a child table with the data which is not available in parent table.
    Well this is not possible. This doesn't make sense either, how can u have a child record without parent. But one can have a view without the actual parent table, for that one must use FORCE keyword while creating a view.


  5. #5
    Junior Member
    Join Date
    Mar 2008
    Answers
    3

    Re: Parent Child Table Relationship

    Hi All,

    One silly question from my side.

    Is it possible to have a parent child relationship with parent as a database block and child as non database block ? Both of them are having a cust_id column as a primary key.

    Thanks and Regards,
    Sandeep


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact