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 does data dictionary is a special file contains, What does data dictio...

What does data dictionary is a special file contains ? The data dictionary is a special file contain The name of all fields in all files.The width of all fields in all files an

ER diegrams, How to draw an ER diagram to a finance companz

How to draw an ER diagram to a finance companz

Define query language, Define query language?   A query is a statement ...

Define query language?   A query is a statement requesting the retrieval of information. The portion of DML that includes information retrieval is known as a query language.

Write a query to find name from the relational algebra, Consider the relati...

Consider the relations City (city_name, state) Hotel (name, address) City_hotel (hotel_name, city_name, owner) Answer the following queries in relational algebra (i) Find

Create a query to produce single output-er model, This assignment concerns ...

This assignment concerns the Research database. The database ER model is shown above, where attributes are omitted for clarity. The relational model for the database is: Departm

Explain strict two-phase locking, Explain Strict Two-Phase locking A tr...

Explain Strict Two-Phase locking A transaction T does not release any type of its exclusive (X) locks until that transaction commits or aborts. In this method no other transact

Ways to suggest the dba, a)  Suppose we updated the catalog tables in real ...

a)  Suppose we updated the catalog tables in real time, that is, after every update, insert, or delete SQL statement were executed-rather than only running RUNSTATS once every few

Stored and derived attributes, Attributes that are directly kept in the dat...

Attributes that are directly kept in the data base. For example, 'Birth date' attribute of a person.   Derived  Attributes that are not stored directly but can be derived

Benefits and drawbacks of sequential file organisation, Benefits of Sequent...

Benefits of Sequential File Organisation It is quick and efficient when dealing with huge volumes of data that require being processed periodically (batch system). Dra

Adding redundant associations for efficient access, Adding Redundant Associ...

Adding Redundant Associations for Efficient Access Redundant associations do not add any type of information, therefore during design we should actually examine structure of o

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