Explain the integrity constraints, Database Management System

Assignment Help:

Explain the integrity constraints: Not Null,  Unique, Primary Key with an example each. Is the combination 'Not Null, Primary Key' a valid combination. Justify.

Not Null - Should hold valid values and cannot be NULL.

Unique - An attribute or a combination of two or more attributes must have a unique value in each row. The unique key can have NULL values.

Primary Key - It is similar as unique key but cannot have NULL values. A table can have at most one primary key in it.

For example:

STUDENT

Roll No

Name

City

Mobile

 

17

Ankit Vats

Delhi

9891663808

16

Vivek rajput

Meerut

9891468487

6

Vanita

Punjab

NULL

75

Bhavya

delhi

9810618396

Roll No is a primary key.

Name is defined with NOT NULL, means each student must have a name.

'Not Null, Primary Key' is a valid combination. Primary key constraint already includes

'Not Null' constraint in it but we can also add 'Not Null' constraint with it. The use of

'Not Null' with 'Primary Key' will not have any effect. It is same as if we are using just 'Primary Key'.


Related Discussions:- Explain the integrity constraints

What is an object design, What is an object design? Object design is a ...

What is an object design? Object design is a very interactive method, which decides the relationship among objects, classifies operations on classes, determines overall system

Database administrator, Database Administrator One of the main perpos...

Database Administrator One of the main perpose for having the database management system is to have control of both data or programs accessing that data. The person having li

Property management database, You are to write a property management databa...

You are to write a property management database program that allows a real estate agent to view, add, search, and save property listings. The program is to do the following: 1.

Processing arrays, 1. A company wants a report containing a breakdown of pa...

1. A company wants a report containing a breakdown of payroll by department. Input, which should be stored in 3 parallel arrays, includes each employee's department number, hourly

Explain the integrity constraints, Explain the integrity constraints: Not N...

Explain the integrity constraints: Not Null,  Unique, Primary Key with an example each. Is the combination 'Not Null, Primary Key' a valid combination. Justify. Not Null - Shou

ERD, A student entity type has the following attributes,name..

A student entity type has the following attributes,name..

E-commerce and business intelligence systems., Your friend owns and operate...

Your friend owns and operates a wholesale shoe business with annual revenues of $5 million dollars. His wholesale business specializes in supplying and supporting retailers with sh

Explain growing phase of locking, Explain Growing Phase of locking Grow...

Explain Growing Phase of locking Growing Phase: In this phase the transaction can only obtain locks, but cannot release any lock. The transaction enters the growing phase as so

What is functional dependency, A Functional dependency is described by ...

A Functional dependency is described by X Y between two groups of attributes Y and X that are subsets of R specifies a constraint on the possible tuple that can make a relation

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd