Think about your lab project to answer the following questions. 1. What is your
ID: 396967 • Letter: T
Question
Think about your lab project to answer the following questions. 1. What is your understanding of Entity Integrity Vs Referential Integrity. Illustrated with simple examples for ease of understanding of the concepts.
2. From your reading of the text, describe various types of keys (Primary, Foreign, Superkey etc) with simple examples.
3. Think about what you plan to do for your lab project. Based upon your lab project describe 3 entities and illustrate different types of joins using these 3 entities. If you have not yet decided about your lab project then assume you have three entities student, course & enrollment and these tables are related.
Explanation / Answer
1) Entity integrity: alludes to your table. Each table requires an essential making it be novel. There are two sorts of essential keys that can be utilized to empower substance or table honesty. These are isolate, no genuine significance (id); or common, some importance, (username). Contingent upon the database execution the DBA must choose which key to use. Referential trustworthiness: is actualize using remote keys. Remote keys are utilized to join two elements (tables) together. With a specific end goal to combine two table AND reference the information put away (table) in the remote table with assurance a common relationship must exist. This mutual relationship is the outside key. By educating the database administration framework (DBMS) of the isolate/common key (super key), filling in as the outside key and existing in another table (substance) as the essential key (PK), the DBMS comprehends that ON DELETE or ON UPDATE to legitimately change the reference to the remote element.
Substance trustworthiness is the framework instrument of keeping up the honesty of an essential key. A case is the is the framework counteracting duplication of an essential key. Referential respectability us the framework for keeping up outside keys. An illustration is an outside key will should dependably reference an essential key. While the Referential Integrity property looks more straightforward than those for Entity Integrity, the outcomes are more intricate since both essential and outside keys are included. The run for outside keys is:No task (INSERT, UPDATE) can make a non-null foreign key except if a comparing essential key exists. The premise of Referential Integrity is remote keys. A remote key in one table references an essential key in another table. The essential key for a table extraordinarily distinguishes elements (columns) in the table. Essential keys are kept up with Entity Integrity, remote keys with Referential Integrity.
2) The primary: key enables an entrance to each an exceptional/particular tuple inside a table (entity). The essential is your ID. Almost all tables will have an essential key. PKs are NOT NULL and are UNIQUE. Additionally, a PK ought not change. A PK can either be a characteristic key or a surrogate key. Utilizing a surrogate key is regularly less demanding because it very well may be a string that has no importance outside of meeting the require limitations of an essential key. Remote keys: reference an essential key in another table (entity). Additionally, a FK can be UNIQUE and NOT NULL. The FK quality setting is chosen by the DBA while developing associations between tables. Using FK referential uprightness can be built up. Super key: is an information ascribe which enables it to distinguish the whole tuple. Competitor key: is regularly chosen to fill in as your essential key since its independent property can recognize the tuple. A surrogate key makes life simple here. Secondary keys: are utilized for information recovery. A clearer clarification, optional keys are the competitor keys not filled in as the essential.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.