what is the difference between primary key & foreign key?
Answer Posted / pravin
The primary key of a relational table uniquely identifies
each record in the table. It can either be a normal
attribute that is guaranteed to be unique (such as Social
Security Number in a table with no more than one record per
person) or it can be generated by the DBMS (such as a
globally unique identifier, or GUID, in Microsoft SQL
Server). Primary keys may consist of a single attribute or
multiple attributes in combination.
Examples:
Imagine we have a STUDENTS table that contains a record for
each student at a university. The student's unique student
ID number would be a good choice for a primary key in the
STUDENTS table. The student's first and last name would not
be a good choice, as there is always the chance that more
than one student might have the same name.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to create additional tablespaces for an new database?
How does oracle handle read consistency?
How to start instance with a minimal initialization parameter file?
How to build data dictionary view an new database?
Give the different types of rollback segments.
How to change program global area (pga) in oracle?
Why do I get java.lang.abstractmethoderror when trying to load a blob in the db?
What do you mean by redo log file mirroring?
What types of joins are used in writing subqueries?
Explain about your project and its relation to the current job position you are applying to?
How to export data to a csv file?
Where is the export dump file located?
How i can handle exception in large code like 1000 line without distrubing the code or without exception handler sction?
What are the common oracle dba tasks?
What is the quickest way to export a table to a flat file?