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

Which is a valid sql type, Which is a valid SQL type? A valid SQL Shoul...

Which is a valid SQL type? A valid SQL Should be in CHARACTER it is should be NUMERIC and FLOAT.

Concurrent transactions-backup and recovery, Representing complex relations...

Representing complex relationship among data A database may contain varieties of data interrelated to each other in numerous ways. A DBMS must have the capability to represent

Create the database in oracle using ddl, The Assessment page has a link to ...

The Assessment page has a link to download a conceptual model, and a list of data. You are to map this conceptual model, and create the database in Oracle using your own DDL.  T

Partial relation emp-get the details people with min salary, Let consider t...

Let consider the given partial relation EMP. Let us make some sub-queries for them EMPNO ENAME JOB SAL DEPTNO 7566

Write expressions in relational algebra, Given the subsequent relations: ...

Given the subsequent relations:    vehicle (reg_no, make, colour)    Person (eno, name, address)    Owner (eno, reg_no)   Write expressions

Natural join-table handling, Natural Join : It is the similar like Equi joi...

Natural Join : It is the similar like Equi join except one of the duplicate columns is removed in the result table. The natural join is the most usually used form of join operation

Determine bcnf-dcnf and key relation, (A) For the relation; CarSales (R...

(A) For the relation; CarSales (RegNo, BuyerName, Address, SalesPerson, Make, Model, Commission) The following functional dependences hold, RegNo _ID à Make, Model Reg

Define assertions in sql, Define Assertions in SQL a. An assertion is a...

Define Assertions in SQL a. An assertion is a predicate that is expressing a condition we wish the database to always satisfy.  b. Domain constraints, functional dependency

What is structured query langauge, What is Structured Query Langauge (SQL)?...

What is Structured Query Langauge (SQL)? SQL is a powerful set-oriented language which was formed by IBM research for the databases that adhere to the relational model. It havi

What is database trigger, What is database Trigger? A database trigger ...

What is database Trigger? A database trigger is a PL/SQL block that can explained to automatically execute for insert, update, and delete statements against a table. The trigge

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