Skip to Content
author's profile photo Former Member
Former Member

really it is very very serious (primary v foreign key relationship)(4.7v)

I am working in 4.7 version

I have a requirement in that i have to create two tables with primary key and foreign key relationship.

ex : Department table- fields: dept_no (p), dept_name.

Employee table :- fields : emp_id(p), emp_name, dept_id (f).

Even though I created the tables with primary and foreign key relationship. while creating table entries in Employee table the entries which are not avail for dept_no in Department table it accepting with out showing error, and record is inserting successfully.

can any body help me.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 11:22 AM

    Hello Miskin,

    Please check you foreign key relation ship and data element used for table creation once more. I tried the same scenarion and for me I could not maintain the entries in the child table which are not in Parent table.

    This seems to be bit strange that you are able to maintain entry in the child table which are not there in the parent table.

    Please check both the table settings and revert back if this problem is still there.

    Thanks,

    Lalit Kabra

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 11:28 AM

    Hi Miskin,

    By looking at the table I concluded ...

    Department table: Master table .dept_no (p), dept_name

    Employee table : emp_id(p), emp_name, dept_id (f).

    It can only accept values

    if it has foreign key relationship the dept_id and the dep_no .

    (I believe they are of the same domain.....)

    Plz check once the foreign key relationship is it with the same mentioned table.

    Thanks

    Mohinder Singh Chauhan

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.