















For database modeling, the most useful part of UML is the Class Diagram and Object Diagram. We can use these diagrams for object-oriented database design.
Entity type STUDENT(SSN,fname,lname,address,telephone) The key is SSN.
Relation type BORROW(SSN,ISBN,date-of-borrow,no-of-renewal,fine)
The BORROW relation type is one-to-many. Participation of BOOK is partial Participation of STUDENT is partial
---------------
| Borrow |
------------------|-------------|-------------------------
1 | N | SSN, ISBN | 1 1 |
-------------- | data-borrow | ---------------
| Student | | no-renewal | | Book |
|------------| | telephone | |-------------|
| SSN | | fine | | ISBN |
| fanme | |-------------| | author |
| lname | | borrow() | | title |
| address | | renewal() | | publisher |
| telephone | | cal-fine9) | | date-pub |
|------------| --------------- | keywords |
| add() | |-------------|
| delete() | | add() |
-------------- | delete() |
---------------
-------------------
--------------|Doe,book1: Borrow|-------------------------------
| ------------------- |
| ------------------- -------------
| -------------|Doe,book2: Borrow|----------- |book1: Book|
| | ------------------- | -------------
-------------- |
|Doe: Student| -------------
-------------- |book2: Book|
-------------