0 like 0 dislike
30 views
in Computer Science by (1.0m points)
Differentiate between primary and secondary key.

1 Answer

0 like 0 dislike
by (1.0m points)
A primary key is a unique identifier for a discrete object on a table, and a secondary key provides a second reference point for objects whose primary keys do not adequately distinguish them for reference purposes. The two are vital to the functions of databases, list tables and other archival tools.

There are several examples of primary keys, including:

Unique last name

Social Security number

Online username

These keys allow for the unique treatment of objects on a table by search algorithms and other programs as well as by human reference searches. Without strong primary keys, objects could be mislabeled as identical or databases rendered impossible to search effectively. Strings of unique numbers generated inside a predetermined numerical set are the most common primary keys, and they are used by everyone from insurance providers to reference librarians.

Examples of secondary keys include:

Street address number

Phone number

Middle name

In the event that a primary key is not enough to distinguish an object, a secondary key can be used to render that object unique. It is processed and sorted in relation to a primary key, clarifying search terms so that only desired results appear when a table is consulted. This creates clearer, cleaner databases.

Some keys, called foreign keys, are objects on a given table that function as keys to entire additional tables. These keys are used in concert with primary keys to streamline database size and store relevant information without redundancy. A strong understanding of keys is the first step to creating a usable table.

Related questions

0 like 0 dislike
1 answer 124 views
0 like 0 dislike
1 answer 255 views
0 like 0 dislike
1 answer 34 views
0 like 0 dislike
1 answer 31 views
0 like 0 dislike
1 answer 23 views
asked Feb 11, 2019 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 29 views
asked Feb 11, 2019 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 23 views
0 like 0 dislike
1 answer 48 views
0 like 0 dislike
1 answer 118 views
asked Apr 4, 2019 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 37 views
Welcome to Free Homework Help, where you can ask questions and receive answers from other members of the community. Anybody can ask a question. Anybody can answer. The best answers are voted up and rise to the top. Join them; it only takes a minute: School, College, University, Academy Free Homework Help

19.4k questions

18.3k answers

8.7k comments

3.3k users

Free Hit Counters
...