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

Data dictionary

Hi experts.

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

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2007 at 07:50 AM

    Hi Miskin,

    The field Dept_id should be there in the department table. Set the dept_id as primary key. use the same data element & domain for the field in both the tables.

    Regards,

    J.Joe

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2007 at 09:12 AM

    Ramesh,

    In the Employee table, fo Department ID at domain level use the Department Table as the check table.

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 06:25 AM

    hi

    you take dep_no field in emp table with the same data element which r u taken in Depart table for the field dep_no.

    And In the EMP table assign dept_no field as foreign key.

    Try this and then after do the entry in both tables.

    I hope it will done.

    Prashant.

    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.