Results 1 to 5 of 5

Thread: Foreign key relationship among tables in SQL

  1. #1
    Join Date
    Dec 2010
    Posts
    59

    Foreign key relationship among tables in SQL

    Hello friends I am an IT student , I am looking forward to be a DBA , but for that I know that I will have to do a lot of hard work and do my query language . So for that reason I want to post and ask something about the tables and their relationship , I was eager to know about the foreign key relation ship being established among the tables and entities. ?

  2. #2
    Join Date
    Apr 2009
    Posts
    569

    Re: Foreign key relationship among tables in SQL

    I am not quite sure about it , but I can tell you that you can do this with the help of a primary key. Since you know that there is a unique and not null key called as private key in any table , so if that same column is used as some column on another table the n there is a parent and child relationship being established and thus that column becomes the foreign key of the table.

  3. #3
    Join Date
    May 2009
    Posts
    543

    Re: Foreign key relationship among tables in SQL

    A relationship between 2 entities is set up when the data in one of the columns in the primary table go with the data in a column in the next table. To understand this further you will have to comprehend SQL relational notions– Primary Key and Foreign Key. Primary Key is a field or a grouping of columns that exclusively recognizes each row in a table. Thus a relationship is established.

  4. #4
    Join Date
    Apr 2009
    Posts
    488

    Re: Foreign key relationship among tables in SQL

    Foreign Key is a field or a grouping of columns whose values go with a Primary Key in a particular table. In the the majority of ordinary situations the relationship between 2 entities go with the Primary Key in one of the entities with a Foreign Key in the following table. But always remember that a primary key is always having unique and not null values. It cannot have duplicate values.

  5. #5
    Join Date
    May 2009
    Posts
    539

    Re: Foreign key relationship among tables in SQL

    There are 3 kinds of relations between entities – One-To-Many relationship , and then there is Many-To-Many and in there is last that shows One-To-One. The relation that was formed in the one of the relations in One-To-Many kind of relation and is the most ordinary of the 3 kind. In One-To-Many relation a tuple in one of the tables can have a lot of matching tuples in the subsequent table, but a row the second table can match only one row in the first table.

Similar Threads

  1. Relationship among tables in access
    By Bindusar in forum Windows Software
    Replies: 5
    Last Post: 08-01-2010, 05:47 AM
  2. Primary key and foreign key differentiation
    By Smita.bendal in forum Software Development
    Replies: 3
    Last Post: 05-12-2009, 08:55 AM
  3. SQL query between 2 tables linked by many to many relationship
    By Luis234 in forum Software Development
    Replies: 2
    Last Post: 09-05-2009, 02:17 PM
  4. When to use foreign keys ?
    By Balgovind in forum Software Development
    Replies: 4
    Last Post: 21-04-2009, 12:11 PM
  5. Multiple Foreign Key in T-SQL Syntax
    By Amaresh in forum Software Development
    Replies: 3
    Last Post: 18-02-2009, 01:20 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,201,571.85638 seconds with 17 queries