CISP247 Ch 3 Exercise 2
Entity integrity and referential integrity are important because they are the basis for expressing and implementing relationship in the entity relationship model.
Entity integrity ensures that each row is uniquely identified by the primary key. Therefore, entity integrity means that a proper search for an existing row will always be successful.
Referential integrity means, that if the foreign key contains a value, that value refers to an existing valid row in another table. Note that a null value is possible. Therefore, referential integrity ensures that it will be impossible to assign non-existing foreign key value to a table. It also insures that you can’t delete a row in a table that is acting as a foreign key in another table.
EMPLOYEE
EMP_CODE
EMP_LNAME
EMP_FNAME
STORE_CODE
4001
Whocares
Julie
1
0500
Enoughalready
Heather
15
1110
Smith
Bobbysue
25
0002
Davis
Dave
REGION_CODE
REGION_DESCRIPTION
REGION_MGR
1
West Michigan
0002
2
Northern Michigan
5001
3
East Michigan
5003
1
Central Michigan
0002
Fill in the table for the tables above
Table
PK (list Column names)
FK (list Column Names)
EI (Y/N)
RI (Y/N)
EMPLOYEE
EMP_CODE,
EMP_LNAME, EMP_FNAME, STORE_CODE y n
STORE
STORE_CODE,
STORE_NAME, STORE_LOCATION, STORE_REGION n y
REGION
REGION_CODE
REGION_DESCRIPTION
n y TABLE 1
EMP_CODE
EMP_LNAME
EMP_FNAME
STORE_CODE
4001
Whocares
Julie
1
0500
Enoughalready
Heather
15
1110
Smith
Bobbysue
25
0002
Davis
Dave
TABLE 2
EMP_CODE
EMP_LNAME
EMP_FNAME
STORE_CODE
4002
Stevens
Brian
1
0500
Enoughalready
Heather
15
0003
Smith
John
15
0002
Davis
Dave
TABLE 3
Benefit_Code
Benefit_Desc
Benefit_Cost
Dental
Dental Coverage
$40
Health
Health Coverage
$70
1) UNION on EMP_CODE , Table 1 and 2
2) INTERSECT on EMP_CODE, Table 1 and 2
3) Table 1 DIFFERENCE Table 2
4) PRODUCT Table 1 and Table 3
5) PROJECT Table 2 EMP_CODE AND STORE_CODE
6) DIVIDE Table 4 by table below results should be from the Region Column
STORE_CODE
1
15
7) NATURAL JOIN for Table 1 and Table 4
8) LEFT OUTER JOIN for Table 1 and Table 4
9) RIGHT OUTER JOIN for Table 1 and Table 4
Enter results below
1) combines duplicates
EMP_CODE
EMP_LNAME
EMP_FNAME
STORE_CODE
4001
Whocares
Julie
1
0500
Enoughalready
Heather
15
1110
Smith
Bobbysue
25
0002
Davis
Dave
4002
Stevens
Brian
1
0003
Smith
John
15
2) things that are the same
EMP_CODE
EMP_LNAME
EMP_FNAME
STORE_CODE
0500
Enoughalready
Heather
15
0002
Davis
Dave
3) – left outer join???????
EMP_CODE
EMP_LNAME
EMP_FNAME
STORE_CODE
4001
Whocares
Julie
1
1110
Smith
Bobbysue
25
4)
EMP_CODE
EMP_LNAME
EMP_FNAME
Related Documents: Importance Of Integrity And Referential Integrity
Chapter 3 – Food Production and the Environment summary This chapter discusses the prospects of feeding an ever growing human population given the constraints on food production such as converting land into farmland, harming the environment, limited water supplies and many other factors that poses a negative externality on the environment. In order to address these issues without compromising food production and the environment, government intervention and policies need to be put in place to avoid…
Key Concept Review (Answers to in-text “Concept Checks”) Chapter 3 1. Wegener believed that the heavy continents were slung toward the equator on the spinning Earth by a centrifugal effect. He was wrong in that belief, but correct in sensing that continents were moving. 2. Where were the tracks through old seabed that the migrating continents might leave? What forces were strong enough to propel continents over long distances? 3. Something is said to be dense if it weighs a lot per unit…
In chapter 3, The Journey North, how does Hill’s description of the train journey from London to Crythin Gifford prepare the reader for what is to come in the novel? In chapter 3, Arthur travels north to Crythin Gifford where a man comes to his compartment and introduces himself as Samuel Daily who shows some interest in the Drablow file but Arthur pretty much ignores him. Hill instantly makes the reader suspicious by the cheerful tone to the journey up north especially after the fog in chapter 2…
Ronald Lee Verrette Jr. Business Law Case Activity I Chapter 3-5 Pg. 72 Litigates Involved: Plaintiff(s): Rita Peatie VS. Defendant(s): Wal-Mart, Inc. Case Briefing: Rita Peatie got injured at a Wal-Mart, and Rita Peatie is suing Wal-Mart for “recovery” of the injuries she sustained from Wal-Mart’s “negligence” (Clarkson, K., Miller, R., & Cross, F., 2015). “Recovery” is where when either the “plaintiff(s) and/or…
Name: Sunmibola Makinde Conflict Resolution According to Thompson, “Effective listening and speaking enables us to accurately assess the central issues within our conflict and then to negotiate fairly, with win/win solution in mind”<59>. This means that, despite the fact that conflicts generally occur in our daily lives, we should be able to resolve them so we can function in our relationships and communication with others by listening and speaking well, so as to reach an agreement or conclusion…
Jazmyn Allen-Cummings Social Psychology Outline I. Spotlights and illusions. a. Spotlight effect –It is the belief that others are paying more attention to our appearance and behavior than they actually are. b. Illusion of transparency- illusion that our concealed emotions leak out and can be easily read by others. c. Social surroundings affect our self- awareness. Ex- Being around people that look different than you make you notice how different you are and how different…
Key Points The law of demand states that there is an inverse (or negative) relationship between the price of a good or service and the quantity of it that consumers are willing to purchase. The height of the demand curve at any quantity shows the maximum price that consumers are willing to pay for that unit. The degree of responsiveness of consumer purchases to a change in price is shown by the steepness of the demand curve. The more responsive buyers are to a change in price, the flatter, or more…
Firms use competitive intelligence to collect and synthesize info about their position with respect to their rivals. Enables companies to anticipate changes in the marketplace rather than merely react to them. To analyze competition we use the top 3 or 4 market share or the herfindahl index metrics. Share of mind: the percent of customers who name your brand when asked to name the first brand that comes to mind. Share of voice: % spend on median in the total industry spent Share of Research and…
Austin Danner Dave Devonis Chapter 3 30 March 2014 Chapter 3 Brief review of the main points of the chapter (200 word abstract) This chapter was largely structured around figure 3.1, which shows the interrelationships among job analysis, job descriptions, job specifications, job evaluation, and the HR functions that are built on these processes. Job analysis is the process of defining a job in terms of its component tasks or duties and the knowledge or skills required to perform them. Job analysis…