نموذج العلائقية

Click here to load reader

download نموذج العلائقية

of 28

description

نموذج العلائقية. Relational Model. نموذج العلائقية (RM). في نموذج العلائقية جميع البيانات مبنية منطقيا ضمن علاقات (جداول) الصفات STUDENT العلاقة. StudentNo. LName. FName. Initial. DOB. GPA. - PowerPoint PPT Presentation

Transcript of نموذج العلائقية

Slide 1

Relational Model

(RM) () STUDENT

417001041820004182034418813441898604192134StudentNoAl-SalehAl-GhanemAl-FahadSaodRashedAl-FahadLNameAmalNoraLailaAmalRanaRaniaFNameInitial M. A. A. F. I. M.DOB04-06-7802-12-7901-11-7422-04-7330-01-7819-03-79GPA3.914.204.013.012.313.502 .

.

.

.

3 : , .

: () , . 4417001041820004182034StudentNoAl-SalehAl-GhanemAl-FahadLNameAmalNoraLailaFNameInitial M. A. A.DOB04-06-7802-12-7901-11-74GPA3.914.204.01STUDENTStudentNoLNameFNameInitialStudent NumberLast NameFirst NameInitialDefinitionAttributeDOBGPADomain NameDate of BirthGreat Point AverageDigits: size 7Character: size 15Character: size 15Character: size 3Date: range 01-01-20, format dd-mm-yyReal: size 3, decimal 2, range 0-55 () () . . (). . . . .6 (Candidate key (CK) ) : , .

(Primary Key (PK) ) : ().

(Foreign Key (FK) ) : (FK) ().

741700104182000418203441881344189860StudentNoAl-SalehAl-GhanemAl-FahadSaodRashedLNameAmalNoraLailaAmalRanaFNameInitial M. A. A. F. I.DOB04-06-7802-12-7901-11-7422-04-7330-01-78GPA3.914.204.013.012.31STUDENTD001D002D003DeptNoComputer ScienceBusiness AdministrationScienceDepartment NameBuild # 20DeptD001D001D002D003D001LocationBuild # 45Build # 6DEPARTMENTPrimary KeyForeign Key8 (Relation schema ) : . : (_ , _, _ , , )

(Relational schema ) : () . : = { , , }9 (Relation schema )STUDENT (StudentNo, Lname, Fname, Initial, DOB, GPA, Dept)

41700104182000418203441881344189860StudentNoAl-SalehAl-GhanemAl-FahadSaodRashedLNameAmalNoraLailaAmalRanaFNameInitial A. L. A. R.DOB04-06-7802-12-7901-11-7422-04-7330-01-78GPA3.914.204.013.012.31STUDENTDeptD001D001D002D003D001 N.10 (Relation schema )DEPARTMENT (DeptNo, Department Name, Location)

D001D002D003DeptNoComputer ScienceBusiness AdministrationScienceDepartment NameBuild # 20LocationBuild # 45Build # 6DEPARTMENT11 ER Relational Model12 ER Relational Model (Mapping) ()

.

STUDENT (StudentNo, Lname, Fname, Initial, DOB, GPA, Dept)DEPARTMENT (DeptNo, Department Name, Location)

13 (Weak Entity Type) (Relational Model) .

(_ , , , ) ( , _ ,_ )__ _ _ _1414 1:1 (Relational Model) 1:1 . PK FK. .

1 1 (1,0) (1,1) (_ , , , ) (_ , _ , _ , _ , _)

__ _ ____15 1 :N (Relational Model) 1 :N .1 PK 1 N FK. N.

1 N

( _ , _ , _,) (_ , _, _)

_____16 N :N (Relational Model) N :N ( ) . PK FK FK PK .

N N

(_ , , _,_) (_ , _)_ (_ ,_ ,_)

__ _____17 (Relational Model) : ( ) . PK FK FK PK .

(_)(_)_(_) (_ , _ , _ , _ , _)

______18 (Relational Model) .

(_ , ,_ , , _)___ _19 (Relational Model) . PK FK . FK PK .

(_ ,_) ( , )

__ 20 21 : .

: .

22 (Base Relation): , .

(View) : , .

- ( ) .

23STUDENT4170010418200041820344188134StudentNoGPA3.914.204.013.01STUDENT_GPAView4170010418200041820344188134StudentNoAl-SalehAl-GhanemAl-FahadSaodLNameAmalNoraLailaAmalFNameInitial M. A. A. F.DOB04-06-7802-12-7901-11-7422-04-73GPA3.914.204.013.01DeptD001D001D002D003BaseRelation24 .

, .

, .

. 25 () .

: .

: . .

26 () : . (PK) (null). (FK) (FK) (null). : ( 20 )27 . .. .

28