Get help now

Data Integrity in the Database

Updated August 25, 2022
dovnload

Download Paper

File format: .pdf, .doc, available for editing

Data Integrity in the Database essay

Get help to write your own 100% unique essay

Get custom paper

78 writers are online and ready to chat

This essay has been submitted to us by a student. This is not an example of the work written by our writers.

GURU NANAK COLLEGE ,BUDHLADA SESSION: 2018-19 Assignment of : JAVA PROGRAMMING Topic : Integrity Submitted To: Submitted By: Prof. Rekha Kalra Manpreet Kaur MCA(LE)-2 INTEGRITY Integrity means that uniformity and uniformitarianism. DATA INTEGRITY : Data integrity word is a combination of two words: DATA + INTEGRITY = DATA INTEGRITY.

1.DATA: Facts and statistics which are collected together for the reference and also for the analysis. Data are the things considers as facts which make the basis of calculation. 2.INTEGRITY: Integrity means wholeness,unification,unity,coherence,solidarity,cohesion. Integrity is a state of being whole and undivided.

‘so data integrity refers that the data has to be complete and correct. In other words we can say that data integrity refers to the completeness , correctness and uniformity of the data. When our data is complete and correct ,then it become consistent data. In other words, when data has two factors , completeness and correctness then that data is said to be consistent data. Consistent data is that data which is when processed always return the required results and no inconsistencies are generated and not any type of error is prodused/occured. When our data is not complete and not correct then during processing many inconsistencies occur and many types of errors are generated ,which always causes the unrequired and incorrect results.

NOW WE WILL DISCUSS DATA INTEGRITY IN THE DATABASE: To maintain the integrity of the database it is required that we should always enter the correct and the complete information in the database’s tables’ field’s cells. Let us consider as an example a DATABASE’S TABLE: STUDENT RECORD ROLL NO. NAME CLASS PH. NO. AGE 1967 Manpreet MCA-2 9080706050 19 1972 Satnam MCA-2 9181716151 19 1973 Hardeep MCA-2 9282726252 20 1974 Manwinder MCA-2 9383736353 20 1975 Shifali MCA-2 9484746454 19 1977 Bharti MCA-2 9989796959 23 In the above table the information that is provided is complete and correct and consistent, so this information ,entered in the table maintain the integrity of the database.

CASE-1: ROLL NO. NAME CLASS PH. NO AGE 1967 Manpreet MCA-2 9080706050 -19 Though -19 is a valid number ,but it is not a valid age. So’ to maintain the integrity of the database these incorrect,invalid values are restricted to be entered in the database. CASE-2: ROLL NO.

NAME CLASS PH. NO. AGE Hardeep MCA-2 9988776655 20 To maintain the integrity of the database , it is needed that the data that is entered into the database must be complete. CASE-3: ROLL NO. NAME CLASS PH.

NO. AGE 1967 MANPREET MCA 2,MBA-2 9987765432 19 This entry is incorrect because a student has not to be in two master degrees at the same time.so to maintain the integrity these entries are restricted. CASE-4: ROLL NO. NAME CLASS PH.NO. AGE 1967 MANPREET MCA-2 9988776655 19 1967 SATNAM MCA-2 9978563412 19 This entry is also incorrect because not two students have the same rollno. CASE-5: Let us take two tables of database : One is STUDENT RECORD and the second one is STUDENT FEE RECORD: STUDENT RECORD ROLL NO.

NAME CLASS CITY 1967 manpreet MCA-2 Budhlada 1968 bharti MCA-2 Boha 1969 shifali MCA-2 Mansa STUDENT FEE RECORD ROLL NO. NAME CLASS CITY TOTAL FEE 1967 Manpreet MCA-2 Bathinda 50000 1968 Rajni MCA-2 Boha 50000 1969 Shifali BCA-2 mansa 50000 There are inconsistencies in the entries . so to maintain the integrity these entries must be restricted. So from the above cases we clearly understood that to maintain the integrity of the database ,the data entered into the database must be complete ,consistent and correct. Therefore data integrity means that data is reliable and trustable. When in database our data is consistent,correct,complete then ,when we process that data we get the required results so we can say that data in the database is trustable, which is essential to maintain the integrity of the database.

Integrity is a another form of data protection. In this case we restrict that only correct nad complete records are entered into the database. In this way , data protection is achieved in logical means. Integrity also concerned with the quality of the data.

To maintain the integrity of the database some rules are used called consistency constraints. These rules act as a filter that purify the data that, we want to enter into the database. These rules checks whether the data entered into the database is valid or not,complete or not. These rules are implemented by the DBMS. Two types of integrity constraints are available: First one is ENTITY INTEGRITY And the second one is REFERENTIAL INTEGRITY.

1.ENTITY INTEGRITY: We also called entity integrity ,is a record integrity because it checks a tables’s individual record for its completeness and correctness. Entity integrity rules are applied to the primary key of the table. When we set the primary key of the table , then automatically entity integrity rules are applied. One condition is that primary key attribute does not have null or duplicate value. For example consider a STUDENT RECORD TABLE: STUDENT RECORD TABLE ROLL NO.(P.K.) NAME CLASS 1967(must not be MANPREET MCA-2 1967 duplicate) Parmeet MCA-2 1968 Sandeep MCA-2 Not null Nitika MCA-2 2 REFERENTIAL INTEGRITY: Referential integrity rules are applied on the foreign key.

Referential integrity can be achieved by specifying the relationship between two tables and this is achieved by using the foreign key. When we enforce the referential integrity constraints : In this case: 1.Records are entered into the parent table first. 2.Records are deleted from the child table first. It is the requirement of the referential integrity constraints that the foreign key has the same name and same data type as the primary key has in the parent table. For example consider two tables One is PARENT TABLE and the second one is CHILD TABLE.

PARENT TABLE(STUDENT NAME RECORD) ID(Primary key) NAME 1000 Manwinder 1001 Prabjot 1002 Kanchan 1003 Simran CHILD TABLE( STUDENT PHONE NUMBER RECORD) ID (Foreign Key) PHONE NUMBER 1000 9988776655 1001 9876543212 1002 9867542321 1003 8967452354 1004(not inserted) 9087654321 Referential integrity ensures that data entered into the child table and also into the parent table is always consistent.

Data Integrity in the Database essay

Remember. This is just a sample

You can get your custom paper from our expert writers

Get custom paper

Data Integrity in the Database. (2019, Jul 28). Retrieved from https://sunnypapers.com/guru-nanak-college/