Hi guru's what is forign key , and what is foriegn key table

hi guru's what is forign key , and what is foriegn key table

hi...
Foreign key is nothing but simply we can say,
A field in one table related to field in another table..see the below example...
consider, there are two tables like emp_personal and emp_official .
In emp_personal table , the fields are  empid,empname, dob for example. In this table, empid is the primary key field.
In emp_official table , the fields are empid,dept,designat ion for example. In this also, empid is the Primary key or may not be a Primary key field.
now we relate these two tables using the foreign key relationship. Foreign key relationship is used to avoid the redundancy mainly...
now, emp_personal is the Check table( Bcos it holds the empid field, which has the primary key...)
emp_official table is the Foreign key table (Bcos it holds the empid field, which may or may not be a Primary key).
now, we foreign key relationship is given. (click the KEY Like  icon in ABAP Dict - Database Table : Emp Official )
Tables are ready to enter the records...for example create some 5 records in the emp_personal table .
Table : emp_personal :   Primary Key - empid
empid     empname    empdob             Status
   1            AAA          1.1.1990          Record saved successfully
   2            BBB          2.2.1990          Record saved successfully
   3            CCC          3.3.1990          Record saved successfully
   4            DDD          4.4.1990          Record saved successfully
   5            EEE          5.5.1990          Record saved successfully
records are saved in the table : emp_personal.
now, we are tryiing to create records in emp_official table.
Table : emp_official :   Primary Key or not a Primary Key - empid
empid          dept        designation             Status
   1            Dept1        S.E                 Record saved successfully
   2            Dept2       S.SE               Record saved successfully
now, if u try to create the record which is not in the table emp_personal , which has the empid = 6. but it'll not allow us to create the record 6, bcos of the foreign key relationship between these two tables....
   6            Dept6       P.M                Record doesn't exist......
now, the foreign key relationship helps us to avoid the duplicate entry......
Foreign key relationship is possbile between the tables having atleast one same type of field. Also the Technical characteristics of the fields should be same . this is done in the value table.....
this is the concept of Foreign key...I think this explantion is enough to describe the Foreign key....

Similar Messages

  • Where is list of keys and what they do?

    Where can I find a list of keys and what they do. I'm a command line kind of guy.
    Using Mac mini / Panther
    larryalk

    364/2810
    Hi larryalk,
    welcome to Discussions!
    In addition to Kurt's excellent link,
    Here are the ones you can print "just in case":
    - Shortcuts for freezes
    This one has all useful links:
    - Mac OS X keyboard shortcuts
    This one is very handy:
    - Mac OS: Apple Pro Keyboard Shortcuts for Shut Down and Restart
    Also:
    Many keyboard shortcuts are not documented. Just try holding the Option key in combination with the usual ones, see what it does. Same with the Control key and the Shift key.
    In popping dialog boxes:
    Usually command+dot = Cancel, and
    hitting the initial letter often equals a mouse-click.
    In the menubar and the menus:
    Also simply hitting a letter.
    Or two letters if needed, like HI = History when H(E) = Help.
    ⇧ Shift
    ⌥ Option
    ⌘ Command
    ⌃ Control
    Have fun!
    Axl
    Happy New Year Kurt!

  • HT3205 In place of the percentage number next to my battery icon, it now says "single percent format." What does this mean and what do i do about it?

    In place of the percentage number next to my battery icon, it now says "single percent format." What does this mean and what do i do about it?

    You can use a keyboard command to prevent your iPod auto-syncing with iTunes. While connecting the iPod to the computer on a Mac hold down the Option and Command (⌥ and ⌘ Apple) keys together. This will stop the iPod from auto-syncing with iTunes and it will appear in the source list. Wait until you are sure the iPod has mounted, and that it will not auto sync and then you can let the keys go. This may take between 20 to 30 seconds depending on your computer. Once you are safely connected go to the iPod Summary tab and make sure "manually manage music and videos" is checked:
    iTunes for Mac - Keyboard Shortcuts
    Managing content manually on iPod and iPhone

  • What is Implicit Enhancement and what is explicit enhancement.

    Hi,
    I am new to Enhancements.
    What is implicit enhancement and what is explicit enhancement.
    where exactly we have to create those.
    Thanks and regards,
    swami
    Moderator message - Please search before asking - post locked
    Edited by: Rob Burbank on Oct 26, 2009 9:43 AM

    Hi Swaminath ,
    Go through the following Blogs  on enhancement Frame work. It will help u in understanding This concept in detail.
    /people/thomas.weiss/blog/2007/12/12/the-three-use-cases-of-the-enhancement-and-switch-framework--part-1
    /people/thomas.weiss/blog/2008/01/07/the-three-use-cases-of-the-enhancement-and-switch-framework--part-2
    /people/thomas.weiss/blog/2008/01/14/the-three-use-cases-of-the-enhancement-and-switch-framework--part-3
    /people/thomas.weiss/blog/2008/01/23/the-three-use-cases-of-the-enhancement-and-switch-framework--part-4-the-many-ways-to-enhance-a-sap-application-with-the-new-framework
    /people/thomas.weiss/blog/2008/02/04/the-three-use-cases-of-the-enhancement-and-switch-framework--part-5-the-basics-about-switching
    /people/thomas.weiss/blog/2008/02/29/second-try-the-three-use-cases-of-the-enhancement-and-switch-framework--part-6-the-re-integration-of-the-sap-industry-solutions-into-the-erp-core
    /people/thomas.weiss/blog/2008/03/11/the-three-use-cases-of-the-enhancement-and-switch-framework-part-7--the-enhancement-package-strategy-of-sap-erp-60
    /people/thomas.weiss/blog/2009/01/15/how-to-get-the-most-from-the-enhancement-and-switch-framework-as-a-customer-or-partner--tips-from-the-experts
    Regards,
    Eswar

  • I do not receive all my e-mailson all my devices. I seem to get them all on my iPhone 5s, but not all show up on my iPad and iMac. they are all set up the same. Any Ideas on what is going on and what I can do to remedy this? thanks

    I have an iMac with OS X Lion 10.7.5,an iPhone 5s with iOS 7.1.2 and an iPad with iOS 7.1.2. all software is up to date. My problem is I do not receive all my e-mail on all 3 devices all the time. I seem to get them on my phone , but not all show up on my iMac or iPad. Any ideas as to what is going on and what can I do to resolve this issue? thanks

    On the iPhone, go into Settings -> Store and turn off "Automatic Downloads" for Apps (and Music and Books, if you wish). You can also do that on the iPad to prevent it from going in the opposite direction.
    That will stop any automatic downloading... to prevent them from coming over when using iTunes, select the phone (under Devices), Apps, and then uncheck "Automatically sync new apps." Again, do the same for the iPad if you wish.

  • This sign appeared in my account: "Your payment method was declined. Update your biiling info'. After adding new information about my others cards I see the same sign. Can't understand what the problem is and what should I do. Need help!!!

    This sign appeared in my account: "Your payment method was declined. Update your biiling info'. After adding new information about my others cards I see the same sign. Can't understand what the problem is and what should I do. Everything used to be good before.
    Do anyone know what I supposed to do in that situation?
    Really need help!
    Thanks in advance.

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • After installing the update I get this message on an app from facebook "502 Bad Gateway nginx" what is the issue and what do I need to do to solve the issue?

    after installing the update I get this message on an app from facebook "502 Bad Gateway
    nginx" what is the issue and what do I need to do to solve the issue?

    Hi there, harleygirl.
    A look around the internet and my previous knowledge indicates this is not an issue with firefox, but with how the server that the app is run on is incorrectly configured. To test this, please install an old version of firefox. You can download an older version from http://www.mozilla.org/en-US/firefox/all-older.html then try to visit the website again. Please let us know if it turns out that it works with version 3.6

  • The drop down view by menu (Song, album, etc) at the right side of the iTunes window is like a ghost. It flashes into view for a millisecond once in awhile but never lets me click on it. Anyone know what this is about and what to do?

    The drop down view by menu (Song, album, etc) at the right side of the iTunes window is like a ghost. It flashes into view for a millisecond once in awhile but never lets me click on it. Anyone know what this is about and what to do?

    Short answer:
    Click Hide Song(s), it is what you wanted to do...
    Long answer:
    iTunes in the Cloud is a feature of your iTunes store account that allows you to redownload or stream your past purchases. When you delete a purchased track that is downloaded to your computer (like the first one shown here) you are asked if you also want to hide the song from iCloud. This would remove it from the computer and also stop it showing up with the iCloud symbol as the other tracks from that album (which are not downloaded) do.
    If a track shows with the cloud symbol you can play (stream) it by double-clicking the title, or click the cloud symbol to download a local copy to your library. If you try to delete one of these tracks you get a slightly different message confirming that you want to hide the track. Clicking hide will remove the listing from the library and any other device that shows your past purchases.
    Should you want to retrieve any item hidden in this way at a later date use Store > View My Account > iTunes in the Cloud > Hidden Purchases > Manage.
    To hide all your previous purchases that are not downloaded to your computer use Edit > Preferences > Store and untick Show iTunes in the Cloud purchases.
    tt2

  • In IOS7 none of my YouTube movies show up on my site build with iWeb and its YouTube widget. On an iPad running IOS6 the site still works fine, and all movies play well. What is going on,and what can I do to solve this problem ???

    In IOS7 none of my YouTube movies show up on my site build with iWeb and its YouTube widget. On an iPad running IOS6 the site still works fine, and all movies play well. What is going on,and what can I do to solve this problem ???

    It's only Safari/iOS7. Chrome iOS7 works fine.
    Solution?
    Go to YT and grab the code.
    Paste it in a HTML Snippet.

  • What is the provisioning feature in the settings under, general profile? It says something about "provisioning". What does that mean and what does it do?? (It's on my 5th generation iPod touch, black, iOS 6.1.3

    What is the provisioning feature in the settings under, general>profile? It says something about "provisioning". What does that mean and what does it do?? (It's on my 5th generation iPod touch, black, iOS 6.1.3

    A profile is used on iOS device to add specific settings and similar things to an iOS device.  Tryically, they are added when the iOS devices is controlled by a company or school.
    However, some apps install a profile. If your iPod is not controlled by a company or school then it seems an app added the profile. You can good the title if the profile and see if that gives any info.

  • What is this icon, and what does it do?

    When you open an email and are in the read mode, at the bottom of the
    Screen, right in the middle there is an icon that looks like a box with an arrow
    Pointing into it. When I hit that, the piece of mail I am reading disappears.
    I can't find the description even in the iOS manual. What is this icon and what
    Is it doing to the mail that disappears? Occasionally I can find that email in the
    All mail folder.. But not always.. So confusing!

    I believe that is the "archive" button. You have a setting for that instead of delete. Do you see the trash can? If not, that is what it is. Here is a link to the iPhone manual and you can see about changing that, but I would have to say it is probably in settings, mail.
    http://manuals.info.apple.com/enUS/iPhone_iOS4_UserGuide.pdf

  • What is the keychain and what does it do for me?

    As I recently upgraded to Mac OS 10.4.4 Tiger, I was reminded of the recurring keychain questions I am asked as I use my browsers. Since I do not know its function or security or privacy implications, I always elect not to engage the keychain function. Anyone out there know what it really does and what risks I accept if I allow it to do what it asks me?

    As far as I know, there are no known security risks with it (at least no widely reported cases). I've used it for about three years, and have had no security problems with it. The UNIX programmer folks on here will have more specific technical information, but from a user standpoint it's perfectly safe to use. In fact, if you add other user accounts to your own computer, the other users can't even attempt to access it. It's pretty neat...
    PowerBook G4 12 1.5GHz and a bag full of goodies!   Mac OS X (10.4.4)   80GB HD, 512 MB ram, 300GB Maxtor OneTouch II FireWire 400 External HD.

  • What is boot camp and what does it do? Do we need anything to use it?

    What is boot camp and what does it do?
    What do we need to start this thing?
    What things do we have to be careful with it?

    Make good backups of your OSX partition before any BootCamp operation (setup or removal).
    BootCamp alters the boot sector of the disk, which hold information about the OSX partition.  Some people report that BootCamp has left the boot sector data about the OSX partition damaged -- very rarely, but it happens.

  • I recently rented a movie from iTunes but it will not play. I get an error message, number (-42408). What does this mean and what do I do about it?

    I rented Sherlock Holmes: A Game of Shadows and when I tried to watch it, the movie would not play. I received the error message (-42408). What does this mean and what should I do?

    Is all other content purchased using the same iTunes Store account also failing to play with that error message?

  • I am using iPad 3rd generation and in my settings I am getting notification in settings general profile IITDistribution_feb12 is expiring, what's that mean and what to do?

    I am using iPad 3rd generation and in my settings I am getting notification in settings>general>profile>IITDistribution_feb12 is expiring, what's that mean and what to do?

    That you have a beta copy of iOS or an iPad tied to a corporate account and the beta or corporate credentials are expiring soon.

Maybe you are looking for

  • Download and upload program

    Hello to everybody, I'm looking for a standard program that can download and upload program' source codes. I found the program REPTRAN (in SAP release 6.0) that can only download the source code (with the include as well), but i didn't find the uploa

  • Lumia 1020 vs Whatsapp

    So I noticed that some people were getting issues with the battery I noticed the typical turn off this, this and this advice which although obvious makes a huge difference.  The problem I notice is that although we're told to turn off background apps

  • SAP HA ASCS Instance service Shared Memory Problem

    Hi Gurus, I have completed the setup of ASCS and ERS instance for SAP HA.  The system was working fine, but yesterday when I was trying to start the ASCS instance, it shows following error in the dev_enqsrv log file. ShadowTable:attach: ShmCreate - p

  • TS1871 my ipad is frozen !! on the screen it has itunes symbol and usb cord under it cant get it to espond

    ipad is frozen

  • Commit to SQL statement

    Hello N. Gasparotto, I have written and tried the code. I got the desired result. Actually I have a form. That form has "slope" as label with the list of values: 0-2% 2-6% 10-15% 6-8% and so on. the code for that form is written in jsp which includes