This winter holiday season, give a precious gift to your career by upgrading your skills. | Get Flat 15 - 20% OFF on All Courses | Save Today

[iqquestion id=16]

11 thoughts on “Database : Basics of Database Discussion 7

  • karim

    Primary key of a relational table uniquely identifies each record(row). Every table should have a primary key, but a table can not have more than one primary key.
    Foreign key in one table is a key pointing to primary key in another table.

  • Pamela halbhavi

    primary key a unique identifier for each and every row within a database table. Primary key are used to enforce entity integrity. Foreign keys are used to maintain referential integrity with the database by making sure the parent record is not removed if there are still child records.

  • Essa

    The PRIMARY KEY constraint uniquely identifies each record in a database table.
    Primary keys must contain UNIQUE values.
    A primary key column cannot contain NULL values.
    Most tables should have a primary key, and each table can have only ONE primary key.
    Foreign Keys are used for referential purpose for one person/account from different tables such as Employe Information and Employee salary table.

  • nabeel

    Primary key is a unique ID given to column and all the data that needs to be stored under it has to follow that. For example A table containing personal info data which has a primary key as SSN# which cannot be null. This not null feature makes it unique.
    Foreign key is a column often-primary key of parent column that ensures referential integrity of data. For example in a Customer table, CustomerID is a primary key. And in other table ORDERS, it the act as a foreign key for referential of data.

  • nasir

    Primary key – is used to uniquely identify a row in a database table, no two rows can have the same primary key. Identification numbers are often used as primary key. Any field that is not necessarily unique, such as a person’s name, is not suitable for being a primary key. In the United States, people are often identified by their Social Security number, because it is guaranteed to be unique.
    Foreign key – is a column (or group of columns) in a relational database table that provides a link between data in two tables. A foreign key in one table corresponds to a primary key in another table. For example in an employee table, employee_ID is a primary key and in corresponding table it will correspond as foreign key.

  • collins

    primary key is the thing that will identify each individual without mistaking it with someone else and a foreign key links the primary key to the foreign key

  • Olubunmi Ogunsola

    A primary key is a way to identify each record in the table by giving each record a unique qualifier. Foreign key provides a relationship between data in two tables
    – Tomiwa

  • bruno

    – A primary key is a column or group of columns that uniquely identify a row. Every table should have a primary key. And a table can not have more than one primary key.
    – A foreigh key is a column or set of columns in one table whose values must have matching values in the primary key of another table.

  • sivi ramesh

    Primary Key is a column which has a unique value for each of the row within that column. It can’t have NULL value. Primary key in one table is foreign key to the another table.For example, a table called customer has a primary key called customer_id. Another table called Orders has a foreign key which references customer_id in order to uniquely identify the relationship between both the tables

  • michael

    A primary key is an example of a constraint which contain values that are unique and not null. The foreing key is also a type of constraint that maps one table to another

  • smriti

    Primary key is a type of constraint which is unique and cannot contain a null value.Each table must contain a primary key. For ex: In HRM-Personal Details table, Employee ID is the primary key

    Foreign key is a type of constraint in a relational database which links one table to another (data mapping). For ex: Employee Id can be used as a foreign key in another table to relate the second table to the first table.

Leave a Reply