What are the three types of anomalies in database and
Explain?
Answer Posted / a.h nayeem
INSERT Anomaly
1)An insertion anomaly occurs when data cannot be inserted into a database due to other missing data
2)This is most common for fields where a foreign key must not be NULL, but lacks the appropriate data
3)An example of this anomaly can be explained with a simple user database
..A user must have a group ID as a foreign key
..No groups have yet been created
..Thus, a user can not be inserted in to the database as the group ID must not be NULL
4)This can result in data redundancy due to the omission of data.
DELETE Anomaly
1)A deletion anomaly occurs when data is unintentionally lost due to the deletion of other data
2)For example, if a database row contained "Username" and "User Group"
.."John" and "Fred" are in the user group "Contributors"
..If John and Fred are removed from the database, our Contributors group will also disappear
..This is because we haven't normalised our data, meaning the only reference to the Contributors user group lies within the same database row (or record)
..Hence, removing the only two references of our user group results in the loss of data accuracy and integrity
3)This also goes to show why it's important for us to normalise our data and how combining unlike information can be problematic
UPDATE Anomaly
1)An update anomaly occurs when data is only partially updated in a database.
2)A database that hasn't undergone normalisation may reference the same data element in more than one location.
3)As these locations haven't been consolidated and referenced, we have to make sure each location is manually updated
4)This can cause problems as we then need to spend time searching for and updating each reference to the data element.
5)An example of this is a database containing two records; Users and Mailing List.
..John has an email address of john@mail.com in the Users record.
..John has the same email address in the Mailing List record.
..John decides to change his email preferences, which in turn updates the User record for John.
..However, the system did not automatically update the Mailing List record, leaving John with two different associated emails and thus creating inconsistencies within our database.
Is This Answer Correct ? | 25 Yes | 1 No |
Post New Answer View All Answers
can any one tell me how i can start database testing mean what should be initial point and how i can write a query for listing page of any item thanks in advance
i applied prompt on country when i run report it shows list of all countries but want it to show only four countries name
Differentiate between delete and truncate table?
First input columns brand, mt, re values are ov, 1,re vg, 2,re wu ,3,re. Second input columns are brand, mt, cx their records are ov,4,vg ,5,cx Wu, 6,cx and third input columns brand, mt, rt values are ov,7,rt vg, 8,rt wu, 9,rt but my output is brand, re, cx,rt values are ov, 1,4,7 vg, 2,5,8 wu, 3,6,9
Differentiate between extension & intension?
Which database does facebook use?
What are the disadvantages of views in a database?
Please post the scenerois for writing the complex sql queries , for my practice.Can be any query if you cannot solve.
Define stored procedure?
Explain artificial key?
What is a sequence? Explain it with one example?
What is ole db provider for sql server?
What is table scan and index scan?
Explain partial key?
what is transaction state, buffer management, shadow paging