1 / 12

Progettazione Logica

Progettazione Logica. Giorgio Ghelli. The relational data model. All data in flat tables of rows with a primary key (access operators: later) Associations as foreign keys. The relational data model: graphic notation. Employees. Departments. . 1. Employees. Departments.

marv
Télécharger la présentation

Progettazione Logica

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Progettazione Logica Giorgio Ghelli

  2. The relational data model • All data in flat tables of rows with aprimary key(access operators: later) • Associations as foreign keys

  3. The relational data model: graphic notation Employees Departments  1 Employees Departments

  4. Phases of database design • Conceptual design • Logical design • Physical design

  5. 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. Translating a conceptual plan • 1-N associations become foreign keys departments departments employees employees

  7. M-N associations • Encoded as a table with two foreign keys

  8. M-N associations • M-N associations become tables • They get association attributes projects projects ProEmp Percentage Percentage employees employees

  9. Subcollections • Conceptual: • Persons(PId, Name) • Employees ext Persons(Dept, Salary) • Consultants ext Persons(Project, Fee) • Logical: ?

  10. 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. Subcollections pId persons name code pId persons dept employees name salary dept employees salary code persons name kind dept salary

  12. All together, now father-of persons families inhabits tax-payers flats percentage

More Related