Relationship in database lecture with English language and Persian Translation. This lecture is for absolutely beginners. This is the fifth lecture in database one.
2. Topics:
• Relationship
• Degree of a relation
• Associative entity
• Cardinality of relationships
•ارتباط
•ارتباط درجه
•پذیر شرکت موجودیت
•ارتباط کاردینالیتی
1:50 AM
Gharjistan University Computer Science
Faculty Farah Branch
2
3. Relationship:
• Showing association among
two or more than two entity
types is called Relationship.
•اضا یا و دو بین رابطه دادن نشانفه
بنام را موجودیت نوع دو از تر
میکند یاد ارتباط.
Nangarhar University Computer Sceince
Faculty
3
5. Degree of a relation:
• The number of entity types
that participate in a
relationship is called its
degree.
•یک در که موجودیت نوع تعداد
درجه بنام میکند شرکت ارتباط
میشود یاد ارتباط.
Nangarhar University Computer Sceince
Faculty
5
6. Degree of a relation…
• Three most common degree
are:
1. Unary Relationship(Degree
one).
2. Binary Relationship(Degree
two).
3. Ternary
Relationship(degree three).
•ذیل قرار معمول بسیار درجه سه
است:
.1یگانه ارتباط(یک درجه)
.2دوگانه ارتباط(دو درجه)
.3گانه سه ارتباط(سه درجه)
Nangarhar University Computer Sceince
Faculty
6
7. Unary relationship(degree one):
• A relation between the
instances of single entity
type is called Unary(Degree
one) Relationship .
• An entity type linked with
itself, also called recursive
relationship.
•ن یک های نمونه بین ارتباط یکوع
یاد یگانه ارتباط بنام موجودیت
میشود.
•موجودیت نوع یکخودش با ایکه
ارتباط بنام همچنان باشد وصل
میشود یاد بازگشتی.
Nangarhar University Computer Sceince
Faculty
7
person
Is_married_to
EMPLOYEE
Manages
8. Binary relationship(degree two):
• A relation between the
instances of two entity
types is called
binary(degree two)
relationship.
•های نمونه بین ارتباط یکنوع دو
ارتباط بنام موجودیتیاد دوگانه
میشود.
Nangarhar University Computer Sceince
Faculty
8
Teacher SubjectTeaches
9. Ternary relationship(degree three):
• A Relationship between the
instances of three entity
types is called
Ternary(Degree three)
relationship.
• Example: Many venders
ships many items to
many warehouses.
•های نمونه بین ارتباط یکسهنوع
ارتباط بنام موجودیتی گانه سهاد
میشود.
•مثال:اشیای زیاد گان فروشنده
انتقال زیاد های گدام به را زیادی
میدهد.
Nangarhar University Computer Sceince
Faculty
9
10. Ternary relationship(degree three)…
• The Institute might need to
record which teachers
taught which subjects in
which courses.
•داشت ضرورت ممکن انستیتیوته
استا کدام که کند ثبت تا باشدکدام د
درس صنف کدام در را مضمون
میدهد.
1:50 AM
Gharjistan University Computer Science
Faculty Farah Branch
10
11. Degree of relationships:
Nangarhar University Computer Sceince
Faculty 11
Entities of
two different
types related
to each other.
Entities of three
different types
related to each
other.
One entity
related to
another of
the same
entity type.
12. Associative entity:
• The presence of one or
more attributes on a
relationship suggests to the
designer that the
relationship should perhaps
be represented as an entity
type.
• That entity type is called
associative Entity.
•یک از بیشتر یا و یک موجودیت
ب ارتباط یک باالی خاصه صفته
ارت که میکند پیشنهاد دیزاینربه باط
داده نمایش موجودیت نوع شکل
شود.
•بنام موجودیت نوع این که
میشود یاد پذیر شرکت موجودیت.
Nangarhar University Computer Sceince
Faculty
12
Nangarhar University Computer Sceince Faculty
14. Cardinality of relationships:
• One to One:
• Each entity in the
relationship will have
exactly one related entity.
• For example:
•یک به یک:
•یک ًادقیق ارتباط در موجودیت هر
داشت خواهد وابسته موجودیت.
•مثال بطور:
Nangarhar University Computer Sceince
Faculty
14
Person Passporthas
15. Cardinality of relationships…
• One to Many:
• An entity on one side of the
relationship can have many
related entities, but an
entity on the other side will
have a maximum of one
related entity.
• For example:
•چند به یک:
•ارتباط طرف یک در موجودیت یک
وابس موجودیت چندین که میتواندته
طرف موجودیت اما باشد داشته را
وابس موجودیت یک حداکثر دیگرته
داشت خواهد.
•مثال بطور:
Nangarhar University Computer Sceince
Faculty
15
Instructor Coursesteaches
16. Cardinality of relationships…
• Many to Many:
• Entities on both sides of the
relationship can have many
related entities on the other
side.
•چند به چند:
•طرف دو هر در ها موجودیت
موجودی چندین که میتواند ارتباطت
باش داشته دیگر طرف در وابستهد.
1:50 AM
Gharjistan University Computer Science
Faculty Farah Branch
16
Student CoursesRegister for
17. Mandatory/Optional Relationships:
• Participation by an entity in
a relationship may
be optional or mandatory.
• For example:
•یک در موجودیت یک شرکت
اجباری یا و اختیاری ممکن رابطه
باشد.
•مثال بطور:
Nangarhar University Computer Sceince
Faculty
17
Employee CarDrives