Informatics Practices
What is a primary key? What is its function in a table?
Relational Database
1 Like
Answer
A primary key is a set of one or more attributes/fields which uniquely identifies a tuple/row in a table.
Its function in a table is to uniquely identify tuples or rows and prevent the entry of duplicate rows, thus ensuring data integrity.
Answered By
1 Like
Related Questions
What is DBMS? Write names of any two DBMSs.
How is data organized in a table?
Write SQL queries to perform the following based on the table Product having fields as (prod_id, prod_name, quantity, unit_rate, price, city)
(a) Display those records from table Product where prod_id is more than 100.
(b) List records from table Product where prod_name is 'Almirah'.
(c) List all those records whose price is between 200 and 500.
(d) Display the product names whose quantity is not given.
(e) Show the detailed records in the table Product.
Define database.