This document discusses exercises related to entity relationship modeling. It includes ER diagrams for examples like a university registration system, car insurance claims, and sports team statistics. It also provides answers to various questions about identifying optimal ER diagrams, handling weak entities, and merging databases from two different banks. The key topics covered are ER modeling, identifying relationships, handling attributes and weak entities, and resolving conflicts when merging related databases.
Functional dependencies in Database Management SystemKevin Jadiya
Slides attached here describes mainly Functional dependencies in database management system, how to find closure set of functional dependencies and in last how decomposition is done in any database tables
In software engineering, an entity–relationship model (ER model) is a data model for describing the data or information aspects of a business domain or its process requirements
Chapter 3 Classes and Objects 3
2.1 The Nature of Objects 4
2.2 Relationships among Object 7
2.3 The Nature of Classes 10
2.4 Relationships among Classes 11
2.5 Interplay of Classes and Objects 14
2.6 Identifying Classes and Objects 15
2.7 Importance of Proper Classification 18
2.8 Key abstractions and Mechanism 19
A lot of people use SQL in their everyday job, however there are some useful features, which are not so well known, but can save you a lot of time, code and processor power. The presentation is based on Oracle's SQL implementation but the features are relevant for all major relation DBMS.
Functional dependencies in Database Management SystemKevin Jadiya
Slides attached here describes mainly Functional dependencies in database management system, how to find closure set of functional dependencies and in last how decomposition is done in any database tables
In software engineering, an entity–relationship model (ER model) is a data model for describing the data or information aspects of a business domain or its process requirements
Chapter 3 Classes and Objects 3
2.1 The Nature of Objects 4
2.2 Relationships among Object 7
2.3 The Nature of Classes 10
2.4 Relationships among Classes 11
2.5 Interplay of Classes and Objects 14
2.6 Identifying Classes and Objects 15
2.7 Importance of Proper Classification 18
2.8 Key abstractions and Mechanism 19
A lot of people use SQL in their everyday job, however there are some useful features, which are not so well known, but can save you a lot of time, code and processor power. The presentation is based on Oracle's SQL implementation but the features are relevant for all major relation DBMS.
Chapter 55.1 Describe the circumstances in which you would c.docxDinahShipman862
Chapter 5
5.1 Describe
the circumstances in which you would choose to use embedded
SQL
rather than
SQL
alone or only a general-purpose programming language.
Answer:
5.2
Write a Java function using
JDBC
metadata features that takes a
ResultSet
as an input parameter, and prints out the result in tabular form, with appropriate names as column headings.
Answer:
5.3
Write a Java function using
JDBC
metadata features that prints a list of all relations in the database, displaying for each relation the names and types of its attributes.
Answer:
5.4
Show how to enforce the constraint
“
an instructor cannot teach in two different classrooms in a semester in the same time slot.
”
using a trigger (remember that the constraint can be violated by changes to the
teaches
relation as well as to the
section
relation).
Answer:
5.5
Write triggers to enforce the referential integrity constraint from
section
to
time
slot
, on updates to
section
, and
time
in Figure 5.8 do not cover the
update
operation.
slot
. Note that the ones we wrote
5.6
To maintain the
tot cred
attribute of the
student
relation, carry out the fol-
lowing:
a. Modify the trigger on updates of
takes
, to handle all updates that can
affect the value of
tot
b. Write a trigger to handle inserts to the
takes
relation.
cred
.
c. Under what assumptions is it reasonable not to create triggers on the
course
relation?
Answer:
5.7
Consider the bank database of Figure 5.25. Let us define a view
branch cust
as follows:
create view
branch cust
as
select
branch name, customer name
from
depositor, account
where
depositor.account number
=
account.account number
Answer:
5.8
Consider the bank database of Figure 5.25. Write an
SQL
trigger to carry out the following action: On
delete
of an account, for each owner of the account, check if the owner has any remaining accounts, and if she does not, delete her from the
depositor
relation.
Answer:
5.9
Show how to express
group by cube
(
a
,
b
,
c
,
d
) using
rollup
; your answer should have only one
group by
clause.
Answer:
5.10
Given a relation
S
(
student
,
subject
,
marks
), write a query to find the top
n
students by total marks, by using ranking.
Answer:
5.11
Consider the
sales
relation from Section 5.6.Write an
SQL
query to compute the cube operation on the relation, giving the relation in Figure 5.21. Do not use the
cube
construct.
Answer:
5.12
Consider the following relations for a company database:
•
emp
(
ename
,
dname
,
salary
)
•
mgr
(
ename
,
mname
) and the Java code in Figure 5.26, which uses the JDBC API. Assume that the userid, password, machine name, etc. are all okay. Describe in concise
English what the Java program does. (That is, produce an English sentence like “It finds the manager of the toy department,” not a line-by-line description of what each Java statement does.)
Answer:
5.13
Suppose you were asked to define a class
MetaDisp.
Bca3020– data base management system(dbms)smumbahelp
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
1. What two conditions must be met before an entity can be classif.docxjackiewalcutt
1. What two conditions must be met before an entity can be classified as a weak entity? Give an example of a weak entity.
The Two conditions that must be met to be classified as a weak entity are under :
1. The entity must be associated with another entity ,called identifying or owner or parent entity. That it is existence dependent on parent entity.
2. The entity must inherit at least part of its primary key from its parent entity.Only than it would be a valid and strong primary key.
CRS_NAME
CRS_CODE
CONNECT
CLASSNAME
CLASS_SECTION
Class
Course
For example, the (strong) relationship depicted in the above Figure shows a weak CLASS entity:
1. CLASS is clearly existence-dependent on COURSE. (You can’t have a database class unless a database course exists.)
2. The CLASS entity’s PK is defined through the combination of CLASS_SECTION and CRS_CODE. The CRS_CODE attribute is also the PK of COURSE.
The conditions which define a weak entity are similar to the strong relationship between an entity and its parent. In short, you can say, the existence of a weak entity produces a strong relationship. And if the entity is strong, its relationship to the other entity is weak.
Whether or not an entity to be weak it is usually dependent on the database designer’s decisions. For instance, if the database designer had decided to use a single-attribute as shown in the text’s Figure below., the CLASS entity would be strong. (The CLASS entity’s PK is CLASS_CODE, which is not derived from the COURSE entity.) In this case, the relationship between COURSE and CLASS is weak. However, regardless of how the designer classifies the relationship – weak or strong – CLASS is always existence-dependent on COURSE.
CONNECT
CLASS_CODE
Class
CRS_NAM E
Course
CRS_CODE
cr
2. What is a strong (or identifying) relationship, and how is it depicted in a Crow’s Foot ERD?
A strong relationship exists / occurs when an entity is existence-dependent on another entity and inherits at least part of its primary key from that entity. The Visio Professional software shows the strong relationship as a solid line. In other words, a strong relationship exists when a weak entity is related to its parent entity. As discussed in the above question Class , the weak entity is related to strong entity Course with the help of a relationship called CONNECT which is a showing /identifying a strong relationship. As shown in the above figure a strong relationship is represented by two decision boxes… One inside another embedded together represent this.
3. Given the business rule “an employee may have many degrees,” discuss its effect on attributes, entities, and relationships. (Hint: Remember what a multivalued attribute is and how it might be implemented.)
Suppose that an employee has the following degrees: BBA, Ph.D , and MBA. These degrees could be stored in a single string as a multivalued attribute named EMP_DEGREE in an EMPLOYEE table such as the one shown next:
EMP_NUM
EMP_LNAME ...
Automatic Face Naming by Learning Discriminative Affinity Matrices From Weakl...1crore projects
IEEE PROJECTS 2015
1 crore projects is a leading Guide for ieee Projects and real time projects Works Provider.
It has been provided Lot of Guidance for Thousands of Students & made them more beneficial in all Technology Training.
Dot Net
DOTNET Project Domain list 2015
1. IEEE based on datamining and knowledge engineering
2. IEEE based on mobile computing
3. IEEE based on networking
4. IEEE based on Image processing
5. IEEE based on Multimedia
6. IEEE based on Network security
7. IEEE based on parallel and distributed systems
Java Project Domain list 2015
1. IEEE based on datamining and knowledge engineering
2. IEEE based on mobile computing
3. IEEE based on networking
4. IEEE based on Image processing
5. IEEE based on Multimedia
6. IEEE based on Network security
7. IEEE based on parallel and distributed systems
ECE IEEE Projects 2015
1. Matlab project
2. Ns2 project
3. Embedded project
4. Robotics project
Eligibility
Final Year students of
1. BSc (C.S)
2. BCA/B.E(C.S)
3. B.Tech IT
4. BE (C.S)
5. MSc (C.S)
6. MSc (IT)
7. MCA
8. MS (IT)
9. ME(ALL)
10. BE(ECE)(EEE)(E&I)
TECHNOLOGY USED AND FOR TRAINING IN
1. DOT NET
2. C sharp
3. ASP
4. VB
5. SQL SERVER
6. JAVA
7. J2EE
8. STRINGS
9. ORACLE
10. VB dotNET
11. EMBEDDED
12. MAT LAB
13. LAB VIEW
14. Multi Sim
CONTACT US
1 CRORE PROJECTS
Door No: 214/215,2nd Floor,
No. 172, Raahat Plaza, (Shopping Mall) ,Arcot Road, Vadapalani, Chennai,
Tamin Nadu, INDIA - 600 026
Email id: 1croreprojects@gmail.com
website:1croreprojects.com
Phone : +91 97518 00789 / +91 72999 51536
Mit202 data base management system(dbms)smumbahelp
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
Exercise 2.1 Explain the accompanying terms quickly trait, space, e.pdfapoorvikamobileworld
Exercise 2.1 Explain the accompanying terms quickly: trait, space, element, relationship,
element set, relationship set, one-to-numerous relationship, numerous to-numerous relationship,
interest limitation, cover requirement, covering imperative, feeble element set, total,
what\'s more, part marker.
Answer 2.1 No answer gave yet.
Exercise 2.2 A college database contains data about teachers (recognized
by government managed savings number, or SSN) and courses (recognized by courseid).
Teachers
show courses; each of the accompanying circumstances concerns the Teaches relationship set.
For every circumstance, draw an ER outline that portrays it (expecting that no further
limitations hold).
1. Educators can instruct the same course in a few semesters, and every offering must
be recorded.
2. Educators can instruct the same course in a few semesters, and just the most
late such offering should be recorded. (Accept this condition applies taking all things together
consequent inquiries.)
3. Each educator must show some course.
4. Each teacher instructs precisely one course (no all the more, no less).
5. Each teacher instructs precisely one course (no all the more, no less), and each course
must be educated by some educator.
6. Presently assume that specific courses can be instructed by a group of teachers together,
in any case, it is conceivable that nobody teacher in a group can educate the course. Model this
circumstance, presenting extra element sets and relationship sets if important.
Answer 2.2 Answer overlooked.
5
6 Chapter 2
Exercise 2.3 Consider the accompanying data around a college database:
Educators have a SSN, a name, an age, a rank, and an examination claim to fame.
Ventures have a task number, a supporter name (e.g., NSF), a beginning date, an
finishing date, and a financial plan.
Graduate understudies have a SSN, a name, an age, and a degree program (e.g., M.S.
on the other hand Ph.D.).
Every task is overseen by one educator (known as the venture\'s important specialist).
Every venture is dealt with by one or more educators (known as the undertaking\'s
co-agents).
Teachers can oversee and/or chip away at different activities.
Every task is chipped away at by one or more graduate understudies (known as the
task\'s exploration collaborators).
At the point when graduate understudies chip away at a venture, an educator must manage their
work
on the task. Graduate understudies can deal with different tasks, in which case
they will have a (possibly diverse) chief for every one.
Offices have a division number, an office name, and a principle office.
Offices have an educator (known as the executive) who runs the division.
Teachers work in one or more divisions, and for every office that they
work in, a period rate is connected with their occupation.
Graduate understudies have one noteworthy division in which they are chipping away at their
degree.
Every graduate understudy has another, more senior graduate understudy (known as a
understudy co.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Instructions for Submissions thorugh G- Classroom.pptx
Solution of Erds
1. C H A P T E R 2
Entity Relationship Model
Exercises
2.2 Answer: See Figure 2.1
2.4 Answer: See Figure 2.2.
In the answer given here, the main entity sets are student, course, course-offering,
and instructor. The entity set course-offering is a weak entity set dependent on
course. The assumptions made are :
a. a class meets only at one particular place and time. This E-R diagram cannot
model a class meeting at different places at different times.
b. There is no guarantee that the database does not have two classes meeting
at the same place and time.
2.5 Answer:
model
name license year
person owns car
participated accident
address
damage-amount
report-number
date
location
driver-id
driver
Figure 2.1 E-R diagram for a Car-insurance company.
5
2. 6 Chapter 2 Entity Relationship Model
program
time room
course−
offerings
iid name
dept title
course
courseno
title
credits
syllabus
prerequisite
maincourse
requires
secno
is
offered
student
name
grade
teaches
year semester
enrols
sid
instructor
Figure 2.2 E-R diagram for a university.
secno
time room
course−
offerings
courseno
exam
name place
time
student
program marks
eid
name
year semester
takes
sid
Figure 2.3 E-R diagram for marks database.
a. See Figure 2.3
b. See Figure 2.4
2.7 Answer: See Figure 2.5
3. Exercises 7
secno
time room
course−
offerings
courseno
program
marks examof
exam
name place
time
student
name
year semester
takes
sid
Figure 2.4 Another E-R diagram for marks database.
date matchid stadium
name age
played
match player
season_score
opponent
own _score opp_score score
Figure 2.5 E-R diagram for favourite team statistics.
2.13 Answer: By using one entity set many times we are missing relationships in
the model. For example, in the E-R diagram in Figure 2.6: the students taking
classes are the same students who are athletes, but this model will not show
that.
However, E-R diagrams are often split into parts so that each part will fit in
a single page. In such a case, an entity set may appear on different pages, but
to avoid repetition (and inconsistencies), its attributes should be specified at
only one place. The absence of attributes at other places indicates that they are
placeholders, and the full definition is present elsewhere.
2.14 Answer:
a. See Figure 2.7
b. The additional entity sets are useful if we wish to store their attributes as
part of the database. For the course entity set, we have chosen to include
4. 8 Chapter 2 Entity Relationship Model
ss# name dept
student
ss# name
takes class
student
plays sport
courseno
teamname
Figure 2.6 E-R diagram with entity duplication.
name
section for
time
department
c-number
section of
s-number enrollment
course
room in exam
r-number capacity building
exam-id
Figure 2.7 E-R diagram for exam scheduling.
three attributes. If only the primary key (c-number) were included, and if
courses have only one section, then it would be appropriate to replace the
course (and section) entity sets by an attribute (c-number) of exam. The reason
it is undesirable to have multiple attributes of course as attributes of exam is
that it would then be difficult to maintain data on the courses, particularly
if a course has no exam or several exams. Similar remarks apply to the room
entity set.
2.15 Answer:
a. The criteria to use are intuitive design, accurate expression of the real-world
concept and efficiency. A model which clearly outlines the objects and rela-tionships
in an intuitive manner is better than one which does not, because
it is easier to use and easier to change. Deciding between an attribute and
an entity set to represent an object, and deciding between an entity set and
relationship set, influence the accuracy with which the real-world concept
is expressed. If the right design choice is not made, inconsistency and/or
5. Exercises 9
program
time room
course−
offerings
iid name
dept title
course
courseno
title
credits
syllabus
prerequisite
maincourse
requires
secno
is
offered
student
name
grade
teaches
year semester
enrols
sid
instructor
Figure 2.8 E-R diagram for University(a) .
loss of information will result. A model which can be implemented in an
efficient manner is to be preferred for obvious reasons.
b. Consider three different alternatives for the problem in Exercise 2.4.
• See Figure 2.8
• See Figure 2.9
• See Figure 2.10
Each alternative has merits, depending on the intended use of the database.
Scheme 2.8 has been seen earlier. Scheme 2.10 does not require a separate
entity for prerequisites. However, it will be difficult to store all the prerequi-sites(
being a multi-valued attribute). Scheme 2.9 treats prerequisites as well
as classrooms as separate entities, making it useful for gathering data about
prerequisites and room usage. Scheme 2.8 is in between the others, in that
it treats prerequisites as separate entities but not classrooms. Since a regis-trar’s
office probably has to answer general questions about the number of
classes a student is taking or what are all the prerequisites of a course, or
where a specific class meets, scheme 2.9 is probably the best choice.
2.16 Answer:
a. If a pair of entity sets are connected by a path in an E-R diagram, the en-tity
sets are related, though perhaps indirectly. A disconnected graph im-plies
that there are pairs of entity sets that are unrelated to each other. If we
split the graph into connected components, we have, in effect, a separate
database corresponding to each connected component.
b. As indicated in the answer to the previous part, a path in the graph between
a pair of entity sets indicates a (possibly indirect) relationship between the
two entity sets. If there is a cycle in the graph then every pair of entity sets
6. 10 Chapter 2 Entity Relationship Model
ss# name
program
room_no building
course−
offerings
name
dept title
course
room
courseno
title
credits
syllabus
prerequisite
maincourse
requires
secno
is
offered
meetsin
iss#
instructor
student
grade
teaches
year semester
time
enrols
Figure 2.9 E-R diagram for University(b).
ss# name
program
time room
course−
offerings
name
dept title
course
courseno
title
credits
syllabus
secno
is
offered
prerequisite
iss#
instructor
student
grade
teaches
year semester
enrols
Figure 2.10 E-R diagram for University(c).
7. Exercises 11
A
RA
R
B E C
R C
B
Figure 2.11 E-R diagram to Exercise 2.17b.
A
RA
R
B E C
R C
B
Figure 2.12 E-R diagram to Exercise 2.17d.
on the cycle are related to each other in at least two distinct ways. If the E-R
diagram is acyclic then there is a unique path between every pair of entity
sets and, thus, a unique relationship between every pair of entity sets.
2.18 Answer:
a. Let E = {e1, e2}, A = {a1, a2}, B = {b1}, C = {c1}, RA = {(e1, a1), (e2, a2)},
RB = {(e1, b1)}, and RC = {(e1, c1)}. We see that because of the tuple
(e2, a2), no instance of R exists which corresponds to E, RA, RB and RC.
b. See Figure 2.11. The idea is to introduce total participation constraints be-tween
E and the relationships RA, RB, RC so that every tuple in E has a
relationship with A, B and C.
c. Suppose A totally participates in the relationhip R, then introduce a total
participation constraint between A and RA.
d. Consider E as a weak entity set and RA, RB and RC as its identifying rela-tionship
sets. See Figure 2.12.
2.19 Answer: The primary key of a weak entity set can be inferred from its relation-ship
with the strong entity set. If we add primary key attributes to the weak
entity set, they will be present in both the entity set and the relationship set and
they have to be the same. Hence there will be redundancy.
2.24 Answer: A inherits all the attributes of X plus it may define its own attributes.
Similarly C inherits all the attributes of Y plus its own attributes. B inherits the
8. 12 Chapter 2 Entity Relationship Model
attributes of both X and Y. If there is some attribute name which belongs to both
X and Y, it may be referred to in B by the qualified name X.name or Y.name.
2.26 Answer: In this example, we assume that both banks have the shared identifiers
for customers, such as the social security number.We see the general solution in
the next exercise.
Each of the problems mentioned does have potential for difficulties.
a. branch-name is the primary-key of the branch entity set. Therefore while merg-ing
the two banks’ entity sets, if both banks have a branch with the same
name, one of them will be lost.
b. customers participate in the relationship sets cust-banker, borrower and de-positor.
While merging the two banks’ customer entity sets, duplicate tuples
of the same customer will be deleted. Therefore those relations in the three
mentioned relationship sets which involved these deleted tuples will have
to be updated. Note that if the tabular representation of a relationship set is
obtained by taking a union of the primary keys of the participating entity
sets, no modification to these relationship sets is required.
c. The problem caused by loans or accounts with the same number in both the
banks is similar to the problem caused by branches in both the banks with
the same branch-name.
To solve the problems caused by the merger, no schema changes are required.
Merge the customer entity sets removing duplicate tuples with the same social-security
field. Before merging the branch entity sets, prepend the old bank name
to the branch-name attribute in each tuple. The employee entity sets can be merged
directly, and so can the payment entity sets. No duplicate removal should be
performed. Before merging the loan and account entity sets, whenever there is a
number common in both the banks, the old number is replaced by a new unique
number, in one of the banks.
Next the relationship sets can be merged. Any relation in any relationship
set which involves a tuple which has been modified earlier due to the merger,
is itself modified to retain the same meaning. For example let 1611 be a loan
number common in both the banks prior to the merger, and let it be replaced by
a new unique number 2611 in one of the banks, say bank 2. Now all the relations
in borrower, loan-branch and loan-payment of bank 2 which refer to loan number
1611 will have to be modified to refer to 2611. Then the merger with bank 1’s
corresponding relationship sets can take place.
2.27 Answer: This is a case in which the schemas of the two banks differ, so the
merger becomes more difficult. The identifying attribute for persons in the US is
social-security, and in Canada it is social-insurance. Therefore the merged schema
cannot use either of these. Instead we introduce a new attribute person-id, and
use this uniformly for everybody in the merged schema. No other change to the
schema is required. The values for the person-id attribute may be obtained by
several ways. One way would be to prepend a country code to the old social-security
or social-insurance values (“U” and “C” respectively, for instance), to
get the corresponding person-id values. Another way would be to assign fresh
9. Exercises 13
numbers starting from 1 upwards, one number to each social-security and social-insurance
value in the old databases.
Once this has been done, the actual merger can proceed as according to the
answer to the previous question. If a particular relationship set, say borrower, in-volves
only US customers, this can be expressed in the merged database by spe-cializing
the entity-set customer into us-customer and canada-customer, and mak-ing
only us-customer participate in the merged borrower. Similarly employee can
be specialized if needed.