what is primary key,unique key, foreign key? can u teach me
in simple language?
Answer Posted / nitin bisht
PRIMARY KEY: A tabLe can aontain only one PRIMARY KEY. It
Doesn't allow null values, it is used as Foreign Key In
Another Table(like Reference Key).
UNIQUE KEY: A Table may Contain one or more UNIQUE
constraints. Its aloow only one null value . Use this key We
maintain unique vales in the table.
FOREIGN KEY: A key used in one table to represent the value
of a primary key in a related table. While primary keys must
contain unique values, foreign keys may have duplicates. For
instance, if we use student ID as the primary key in a
Students table (each student has a unique ID), we could use
student ID as a foreign key in a Courses table: as each
student may do more than one course, the student ID field in
the Courses table (often shortened to Courses.student ID)
will hold duplicate values.
| Is This Answer Correct ? | 123 Yes | 43 No |
Post New Answer View All Answers
What is a trace file?
5. Explain about relational algebra.
What is the best database?
What is the best database software for small businesses?
what are wrappers and build ups and what it's use?
Two tables emp(empid,name,deptid,sal) and dept(deptid,deptname) are there.write a query which displays empname,corresponding deptname also display those employee names who donot belong to any dept.
What are the advantages of using database?
What is database client?
Explain artificial key?
What is a Database?
can u combine pipeline parallelism and partition parallalism? how and whan?
What is database and its types?
What is aws documentdb?
What is ole db provider for sql server?
Explain various types of locks in a transaction? Which is better and why?