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

Find a 3nf decomposition , Find a 3NF decomposition of the following relati...

Find a 3NF decomposition of the following relation scheme: University (Faculty, Dean, Department, Chair, Professor, Rank, Student}. The University relation satisfies the following

What functions does a data dictionary perform, What functions does a data d...

What functions does a data dictionary perform? In a (DBMS)data management system, the principal functions performed by the data dictionary are Management of data defini

Write short notes on tuple relational calculus, Write short notes on tuple ...

Write short notes on tuple relational calculus. The tuple relational calculation is anon procedural query language. It defines the desired information without giving a particul

Objectives-file organisation in dbms, Objectives  After reading this un...

Objectives  After reading this unit you should be able to: Explain storage of databases on hard disks; Discuss the execution of various file Organisation techniques;

What is the used of specifying alias, What is the used of specifying alias?...

What is the used of specifying alias? Specifying alias: is used to rename column or attribute in a table.

Define the notation for classes and atrributes, Define the notation for cla...

Define the notation for classes and atrributes The notation for class, attribute, and operations are shown below:     Figure: Class with attributes and operations A

Create a e-r diagram or uml class diagram, We require an advanced system fo...

We require an advanced system for a Sports Centre, you are concerned only with representing the data discussed below about bookings and members. (The complete system may contain ot

Differentiate between logical database design and physical, Differentiate b...

Differentiate between logical database design and physical database design. Show how this separation leads to data independence? Basis Logical Databas

What is called block-level striping, What is called block-level striping? ...

What is called block-level striping? Block level striping stripes blocks across many disks. It treats the array of disks as a large disk, and provides blocks logical numbers

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