Let's discuss this question: Why are entity integrity and referential integrity rules important in a database? Give example to back up your points.
1 : Why are entity integrity is important in a database ?
Ans : Entity Integrity is used to identify each touple (row )in an Entity uniquely, no two touple can have full same data. The primary key serves as a unique identifier for rows in the table which handles Entity entigrity . Entity Integrity ensures two properties for primary keys:
Lets take and example, Suppose you have an "Student" Entity (Relational table or Simply Table), which containg Student's ID,name,Branch.
Stu_id | Name | Branch |
---|---|---|
11255234 | Aman | CSE |
11255369 | Kapil | EcE |
11255324 | Ajay | ME |
11255237 | Raman | CSE |
11255678 | Aastha |
ECE |
To identify each student, all student should have an unique ID. but ID=11255324 says that it is "Aman" and "Ajay", then cay you say that you can identify each student uniquely ?? No you can't. For this reason We need Entity intigrity, which gonna help us to find each student Uniquely, now f we Put ID=11233324 for Aman, now using ID we can identify each student, So now we can make ID to priary key. i.e Entity entigrity.
2. Why are referential integrity is important in a database ?
ANS:
It states that if a foreign key exists in a relation then either the foreign key value must match a primary key value of some tuple in its home relation or the foreign key value must be null.
The rules are:
EXAMPLE-
Consider 2 relations "stu" and "stu_1" Where "Stu_id " is the primary key in the "stu" relation and foreign key in the "stu_1" relation.
Relation "stu"
Stu_id | Name | Branch |
---|---|---|
11255234 | Aman | CSE |
11255369 | Kapil | EcE |
11255324 | Ajay | ME |
11255237 | Raman | CSE |
11255678 | Aastha | ECE |
Relation "stu_1"
Stu_id | Course | Duration |
---|---|---|
11255234 | B TECH | 4 years |
11255369 | B TECH | 4 years |
11255324 | B TECH | 4 years |
11255237 | B TECH | 4 years |
11255678 | B TECH | 4 years |
Examples
Rule 1. You can't delete any of the rows in the ”stu” relation that are visible since all the ”stu” are in use in the “stu_1” relation.
Rule 2. You can't change any of the ”Stu_id” in the “stu” relation since all the “Stu_id” are in use in the ”stu_1” relation. *Rule 3.* The values that you can enter in the” Stu_id” field in the “stu_1” relation must be in the” Stu_id” field in the “stu” relation.
Let's discuss this question: Why are entity integrity and referential integrity rules important in a database?...
What does it mean to say that a database displays both entity integrity and referential integrity? How are each established?
a) Identify the foreign keys in this schema. Explain how the entity and referential integrity rules apply to these relations. b) Produce some sample tables for these relations that observe the relational in- tegrity rules. Suggest some general constraints that would be appropriate for this schema.
QUESTION 1 What is the most common relationship within a relational database? Select the best answer from the following. One-To-One relationship. o One-To-Many relationship. Many-To-Many relationship. Zero-To-Zero relationship. QUESTION 2 What is an "entity'? Select the best answer from the following. An entity, for our purposes, is the same as a table in the database. An entity represents one of the columns in an individual table. There are no entities in a relational database. Entities are only part of NoSQL...
Database Hello I need help with the following question: Question 9 Features of the DBMS which are important to the process of database design and implementation include all of the following except how the DBMS supports referential integrity how the DBMS supports domain integrity O how costly the DBMS is to maintain the file structure of storage that the DBMS uses the database objects supported
Q) Integrity Constraints question. Consider following tables (bold are Primary Keys) •Hotel (hotelNo, hotelName, city) •Room (roomNo, hotelNo, type, price) •Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo) •Guest (guestNo, guestName, guestAddress) Identify the foreign keys in this schema, Explain how the entity and referential integrity rules apply to these relations.
In class we have discussed four types of Integrity Constraints: Domain Constraint, Key Constraint, Entity Integrity Constraint and Referential Integrity Constraint. Suppose that each of the following data change operations is applied directly to our COMPANY database, whose schema and instance are shown in Figures and 2 respectively. Identify all the integrity constraints (if any) that will be violated if we perform the following operations. If a constraint is violated (a) explain briefly why this happens, and (b) suggest all...
Database: Convert E-R diagrams to relational schema and show • Primary Keys (using underline) • Foreign Keys (using dotted underline) • Referential Integrity Convert the E-R diagrams to relational schema and show: Primary Keys (using underline) Foreign Keys (using dotted underline) . Referential Integrity Your schema should look similar to the example below. CUSTOMER CustName ORDER PROJECT Foect Title EMPLOYEE PROJECT assigecl to Tite BBli EMPLOYEE PROJECT 0 ProectTitle 4 student admitdate D,C gradstudent advisor major mimor class person name...
2. What are the advantages of database systems and database management? Discuss based on Data Independence, data modeling, Managing Structured, Semi-Structured, and Unstructured Data, Managing Data Redundancy, Specifying Integrity Rules, concurrency control, Backup and Recovery Facilities, Data Security, Performance Utilities. Use 3 of your own examples in your own words!!!
Access to the back-end database will be an important part of the network design. Research and discuss the different possibilities for virtual private network (VPN) access to the back-end database. Include in your discussion the different types of VPNs, their key characteristic, and how they would be set up and used for database access.
Research Question: Explore history of database systems and discuss the three most important developments in database development history to date. (1.25 marks each) Note: Use proper references in the APA style. Your research report must be well presented using proper content organization. (1.25 marks)