sql - Define Data Integrity, specifically Intra Record Integrity when working with databases -


i'm wondering if can explain in simple enough terms intra-record integrity means when working databases? definition have "enforcing constraints on contents of fields linked data validation" hoping elaborate further?..

here 1 explanation depends heavily on word "intra-record".

let's start example, lets have health record patient, has fields such as

id  gender age date_of_birth last_menstrual_date 

now if value of gender male, last_menstrual_date null or blank.

similarly if have populated both fields age , date_of_birth, , lets have date_of_birth = january 1 1976 , age = 30, incorrect since if person born on january 1 1976 age should 40 or, if age in fact 30 date_of_birth should january 1 1986.

note: bad design include both age , date_of_birth columns in same table, above show case of data integrity

so way fields within record i.e. intra-record valid , not violate data integrity.

this 1 explanation of intra-record data integrity means, there might others more formal , academic.

depending on database type using, there can various ways of implementing such constraints on field values.


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -