<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: primary and foreign keys in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476758#M557578</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check out the following link it might help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/important-abap-faq.htm" target="test_blank"&gt;http://www.sap-img.com/abap/important-abap-faq.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******&lt;STRONG&gt;please reward points if the information is helpful to you&lt;/STRONG&gt;***************&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Jun 2007 04:59:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-21T04:59:56Z</dc:date>
    <item>
      <title>primary and foreign keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476756#M557576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wht is the use of primary key and foregin key and wht is different between them&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2007 04:57:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476756#M557576</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-21T04:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: primary and foreign keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476757#M557577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Primary Key:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;A primary key is a field or combination of fields that uniquely identify a record in a table, so that an individual record can be located without confusion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Foreign Key:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;A foreign key (sometimes called a referencing key) is a key used to link two tables together. Typically you take the primary key field from one table and insert it into the other table where it becomes a foreign key (it remains a primary key in the original table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For eg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.databasedev.co.uk/primary_foreign_key_constraints.html" target="test_blank"&gt;http://www.databasedev.co.uk/primary_foreign_key_constraints.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suruchi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2007 04:59:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476757#M557577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-21T04:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: primary and foreign keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476758#M557578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check out the following link it might help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/important-abap-faq.htm" target="test_blank"&gt;http://www.sap-img.com/abap/important-abap-faq.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******&lt;STRONG&gt;please reward points if the information is helpful to you&lt;/STRONG&gt;***************&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2007 04:59:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476758#M557578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-21T04:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: primary and foreign keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476759#M557579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;primary key defines the uniqueness of the table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's take the example..MARA..the unique key or the primary key is MATERIAL number..So you cannot have two records of the same material number..the primary key is used to avoid duplicates..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By setting a foreign key brings a relation between two tables..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's take the example..VBAP-MATNR it has got the foreign key to the table MARA...so that you cannot enter a value which is not in the table MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check these links for more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ea77446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ea77446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2007 05:02:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476759#M557579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-21T05:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: primary and foreign keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476760#M557580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    In a table, you may need some field values to be unique, that is only one entry for that particular field value .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Ex,  u want to create a table with a field 'Name' . You want only one entry for a value of 'Name' . Say only 'Praveen' . So in the table with two 'Praveen' can't exist . Here the field 'Name ' is your primary key .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Primary key can be one field or combination of multiple fields .&lt;/P&gt;&lt;P&gt;If it is later, the table will have one unique entry for the comination of fields .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Foreign Key : In a table, you want the values of a field present in another table .&lt;/P&gt;&lt;P&gt;Say u have table A, and u want to create table B, for which u want a particular field say B1 to take values from a field of table a say A1 .&lt;/P&gt;&lt;P&gt; it implies tht B1 can  take values if the same values are there in A1 .&lt;/P&gt;&lt;P&gt;Here A1 is the foreign key for B1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~ Laxmi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Pls reward points for helpful answers&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2007 05:05:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476760#M557580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-21T05:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: primary and foreign keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476761#M557581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;primary key: to maintain data consistency of a database primary is used for database tables. in sap for every database table you should have atleast one primary key and generally all primary ket fields are top most fields of a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;foreign key: mainly used to provide referential integrities. i.e to provide relation between two tables the foreign keya are used. foreign of one table is the primary for that table and becomes foreign for another table which must have a primary key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to have main properties of database&lt;/P&gt;&lt;P&gt;     1. data intergrity.&lt;/P&gt;&lt;P&gt;      2. data consistency.&lt;/P&gt;&lt;P&gt;      3. relations b/w database tables.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;these two keys are used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helpful reward some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;withregards,&lt;/P&gt;&lt;P&gt;suresh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2007 05:05:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476761#M557581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-21T05:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: primary and foreign keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476762#M557582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Primary key : It is an unique key.That is, it is an unique field in the table .&lt;/P&gt;&lt;P&gt; Foreign key : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link. It will surely help u.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ea77446011d189700000e8322d00/content.htm&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Thasneem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2007 05:07:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476762#M557582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-21T05:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: primary and foreign keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476763#M557583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can define a dependency between two tables that affects the tables when changes are made to rows. This relationship is called a referential constraint (or a foreign key dependency).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can define foreign key dependencies that refer to only one primary key column in a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the CREATE TABLE statement to define foreign keys when you create a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if it is usefull ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2007 05:11:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/primary-and-foreign-keys/m-p/2476763#M557583</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-21T05:11:03Z</dc:date>
    </item>
  </channel>
</rss>

