Home Technology Subscribe to RSS

What Do You Know About Relation Keys?

Answer Question

1 Answer - Sort by: Date | Rating

    A relation is defined as a set of tuples. By definition, a relation has no duplicate tuples. It means that no two tuples can have the same combination of values for all their attributes. An attribute (or combination of attributes) of a relation is selected as a key that uniquely identifies the tuples of a relation. The value of a key attribute can be used to identify uniquely each tuple in the relation.

    A relation schema may have more than one key. In this case, each of the keys is candidate key. It is common to designate one of the candidate keys as the primary key of the relation. In this case, other candidate keys are called the secondary keys. A primary key is a candidate key whose values are used to identify tuples in the relation. The primary key is underlined in relation schema, Each relation schema must have a primary key. A primary key must not contain null values (undefined values).

    A foreign key is an attribute or combination of attributes of a relation that is the primary key of another relation. For example, Roll-No may be an attribute of 'Marks' relation but not the primary key of 'Marks'. However, it is the primary key of the 'Student' relation. In 'Marks' relation, Roll-No attribute will be referred to as foreign key.
    0 0

    Azi 

    answered 3 years ago

      Answer Question - Answers are editable for 5 min.

      If you do not Sign-in or Register your answers will

      be anonymous, your answers may also be

      checked before going online.

      0

      More

      More

         
         

        Ask a Question via Twitter

        Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

        Blurtit Store

        Get T-shirts, hoodies, caps and more at the Blurtit store

        Blurtit International