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 the meaning of data independence, What is the meaning of Data indep...

What is the meaning of Data independence? Data independence means a programs that are not dependent on the physical attributes of data and a programs that are not dependent on

Define access time, Define access time. Access time is the time from wh...

Define access time. Access time is the time from when a read or write request is issued to when data transfer starts.

Explain the disadvantages of file oriented approach, Explain the disadvanta...

Explain the disadvantages of file oriented approach? In the oriented approach Applications are designed in isolation. Design of application is optimized for one application. In

List and also explain the dissimilar stages of ddlc, List and also explain ...

List and also explain the dissimilar stages of DDLC ?

FIELDS, 4. Describe three ways to handle missing field values

4. Describe three ways to handle missing field values

What are the uses of the information in the data dictionary, What are the u...

What are the uses of the information in the Data dictionary? The following information is directly taken from the Data dictionary: Information on fields displayed with

Database security, Ask questiwhat is row indicator in database on #Minimum...

Ask questiwhat is row indicator in database on #Minimum 100 words accepted#

Erd, er diagram on cosmetics.

er diagram on cosmetics.

Database life cycle, Enumerate or state the steps in creating a relevant da...

Enumerate or state the steps in creating a relevant database of a shop.

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