Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Primary key should always be auto increment - Database
Home
>>
Category
>>
Programming Language (MCQ) questions
>>
Database
Q. Primary key should always be auto increment.
- Published on 26 Aug 15
a.
True
b.
False
ANSWER: True
Related Content
Networking (
207
)
Database (
97
)
C programming (
58
)
Software Engineering (
28
)
SQL (
5
)
HTML (
74
)
Web Technologies (
11
)
Data Structure (
140
)
Operating System (
96
)
Java (
25
)
Oracle (
5
)
C++ (
50
)
Algorithms (
7
)
PL/SQL (
13
)
JavaScript (
7
)
XML (
0
)
CSS (
1
)
Discussion
Nirja Shah
-Posted on 02 Nov 15
- Auto-incrementing primary keys are useful for several reasons:
1. They do not allow duplicate user names.
2. They allow the user name (or email address, if that's used to login) to be changed (easily)
3. Selects, joins and inserts are faster than varchar primary keys as its much faster to maintain a numeric index
4. Validation becomes very simple.
5. Sanitation of input is trivial
6. There is far less overhead as foreign keys don't have to duplicate potentially large string values
➨
Post your comment / Share knowledge
Required!
Required!
Invalid Email Id!
Required!
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
MCQs
English
Tutorials
Download
▲