Download presentation
Presentation is loading. Please wait.
Published byMark Morrison Modified over 9 years ago
1
Progettazione Logica Giorgio Ghelli
2
Logical modeling2 The relational data model All data in flat tables of rows with a primary key (access operators: later) Associations as foreign keys Employees EmpIdNameSalaryDepId 232John1000Y1 143Mary1200X2 254Joan900Y1 Departments DepIdBudget Y1100000 X2750000
3
Logical modeling3 The relational data model: graphic notation Employees EmpId DepId Name Salary Departments DepId Budget EmployeesDepartments EmployeesDepartments 1
4
Logical modeling4 Phases of database design Conceptual design Logical design Physical design
5
Logical modeling5 Translating a conceptual plan to the relational model Add an artificial primary key to any collection which needs one Translate associations and inclusions into foreign keys Flatten complex attributes Translate multivalued attributes into tables
6
Logical modeling6 Translating a conceptual plan 1-N associations become foreign keys employees departments employees departments
7
Logical modeling7 M-N associations Encoded as a table with two foreign keys Employees EmpIdName... 232John... 143Mary... 254Joan... Projects BudgetPrId 23000P1 32000P2 ProEmp PIdEId P1232 P1143 P2232 P2254
8
Logical modeling8 M-N associations M-N associations become tables They get association attributes employees projects employees projects ProEmp Percentage
9
Logical modeling9 Subcollections Conceptual: –Persons(PId, Name) Employees ext Persons(Dept, Salary) Consultants ext Persons(Project, Fee) Logical: ?
10
Logical modeling10 Subcollections Conceptual: –Persons(PId, Name) Employees ext Persons(Dept, Salary) Consultants ext Persons(Project, Fee) Logical: –Persons(PId, Name) Employees(Dept, Salary, PId*) Consultants(Project, Fee, PId*) –Persons(PId, Name, Kind, Dept, Salary, Project, Fee)
11
Logical modeling11 Subcollections persons pId name employees dept salary persons pId name employees dept salary persons code name dept salary code kind
12
Logical modeling12 All together, now persons father-of families tax-payersflats inhabits percentage
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.