1 / 27

UML Profile for Databases

UML Profile for Databases. 11 November 2010. Database. A database is a collection of data. Databases can be stored in one or more files, or can be managed by a software system called Database Management System (DBMS). What makes a database. Add Data Delete Data Change Data

judith
Download Presentation

UML Profile for Databases

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. UML Profile for Databases 11 November 2010

  2. Database • A database is a collection of data. • Databases can be stored in one or more files, or can be managed by a software system called Database Management System (DBMS)

  3. What makes a database • Add Data • Delete Data • Change Data • Lookup or search for data • Organize Data

  4. Key Terminology • Table • Column • Record • Field • Primary Key • Foreign Key • Index

  5. Database Example (1) Grades

  6. Database Example (2) Grade Student

  7. Types of databases • Flat databases • Indexed databases • DBMS based databases

  8. DBMS Services • Schemas • Consistency checks • Guarantee of no data corruption after crash • Concurrent access for multiple readers and writers. • Backup and recovery • Authentication and access control • Support for Structured Query Language (SQL)

  9. DBMS Flavors • From relational • To object oriented

  10. DBMS Systems • Oracle • Sybase • Microsoft SQL Server • MySQL

  11. Jet Database Engine • Database Engine of MS-Access • Contained in an *.MDB or *.ACCDB File • Accessed trough ADO or DAO • Allows multiuser access • Enforces referential integrity checks

  12. UML Profiles • Way to customize UML diagrams for your own needs. • Stereotypes • Tagged value • Constraints • Graphical representation

  13. UML Profile Example

  14. UML Profile for Database Design • Rational Software Corporation • For designing databases • Uses tagged parameters and stereotypes • Only a subset will be explained

  15. Database Diagram Elements • Table • Column • Primary key • Foreign key • Identifying relationship • Non-identifying relationship

  16. Database Diagram Elements (2) Table (stereotype <<table>>) Not used Not used Primary key (stereotype <<pk>>) Foreign key (stereotype <<fk>>) Primary/Foreign key (stereotype <<pk/fk>>) Non-identifying relationship Identifying relationship

  17. Example 1

  18. Mapping Logical Design To Database Design • Synchronization • Classes > Tables • Attributes > Columns • Associations > Relations • Normalization • There are more ways to do it

  19. Mapping Classes To Tables • Map persisted classes to tables • Many to many associations must be broken down to one to many associations using an association table.

  20. Mapping Subtype Classes to Tables • One table per class • One table per concrete class • One table per hierarchy

  21. Mapping Attributes to Columns • Map persistent attributes • Don’t map calculated attributes • Can use Generic Types first, later use database specific types. Generic Types: Boolean, Currency, Date, Double, Integer, Long, Single, String

  22. Example 2

  23. Example 3 – Logical Diagram

  24. Example 3 – Database Diagram

  25. Microsoft Access • Create and fill tables • Execute database queries • Build on the Jet Engine • Visual Basic for Applications • Forms and Reports • IDE

  26. Database Desktop Example (1)

  27. Database Desktop Example (2) 0..1

More Related