File notes/example.md changed (mode: 100644) (index dc1e77d..9289c51) |
... |
... |
This is an example that shows how to include a UML activity diagram: |
80 |
80 |
|
|
81 |
81 |
# Code Examples |
# Code Examples |
82 |
82 |
|
|
83 |
|
By defaut, the code is colored as `SQL` code, due to the `--lua-filter filters/default-code-class.lua -M default-code-class=sqlmysql` option given to pandoc. |
|
|
83 |
|
By defaut, the code is colored as `SQL` code, due to the |
|
84 |
|
```--lua-filter filters/default-code-class.lua -M default-code-class=sqlmysql``` |
|
85 |
|
option given to pandoc. |
84 |
86 |
You can refer to <https://github.com/jgm/pandoc/issues/2104> for a discussion on that topic. |
You can refer to <https://github.com/jgm/pandoc/issues/2104> for a discussion on that topic. |
85 |
87 |
|
|
86 |
88 |
## Entire Code File |
## Entire Code File |
File notes/lectures_notes.md changed (mode: 100644) (index 1272f47..a141919) |
... |
... |
Exercise +.# |
6679 |
6679 |
|
|
6680 |
6680 |
: Under what condition(s) can an attribute of a binary relationship type be migrated to become an attribute of one of the participating entity types? |
: Under what condition(s) can an attribute of a binary relationship type be migrated to become an attribute of one of the participating entity types? |
6681 |
6681 |
|
|
6682 |
|
Exercise +.# |
|
|
6682 |
|
xEercise +.# |
6683 |
6683 |
|
|
6684 |
6684 |
~ Consider the following diagram: |
~ Consider the following diagram: |
6685 |
6685 |
|
|
|
... |
... |
Exercise +.# |
6688 |
6688 |
#. Express the constraints represented in the diagram in plain English. |
#. Express the constraints represented in the diagram in plain English. |
6689 |
6689 |
#. Imagine there is a "FromIP" attribute on the "OPENED_BY" relationship that stores the IP used by the user to open the ticket. Could you migrate the attribute to one of the entity? Explain how you would do it, or why it is impossible. |
#. Imagine there is a "FromIP" attribute on the "OPENED_BY" relationship that stores the IP used by the user to open the ticket. Could you migrate the attribute to one of the entity? Explain how you would do it, or why it is impossible. |
6690 |
6690 |
|
|
|
6691 |
|
Eercise +.# |
|
6692 |
|
|
|
6693 |
|
~ Consider the following diagram: |
|
6694 |
|
|
|
6695 |
|
 |
|
6696 |
|
|
|
6697 |
|
#. Express the constraints about the maximums represented in the diagram in plain English. |
|
6698 |
|
#. Briefly explain why there are no total participation constraints on this diagram. |
|
6699 |
|
|
|
6700 |
|
|
6691 |
6701 |
Exercise +.# |
Exercise +.# |
6692 |
6702 |
|
|
6693 |
6703 |
: Suppose a "PRODUCES" relationship with an attribute "Amount" exists between a "PRODUCER" entity type and a "MOVIE" entity type, with ratio $1:M$. |
: Suppose a "PRODUCES" relationship with an attribute "Amount" exists between a "PRODUCER" entity type and a "MOVIE" entity type, with ratio $1:M$. |
|
... |
... |
Solution +.# |
7046 |
7056 |
#. A ticket must be opened by a exactly one user, and an user can open any number of tickets (including 0). |
#. A ticket must be opened by a exactly one user, and an user can open any number of tickets (including 0). |
7047 |
7057 |
#. We could migrate the "FromIP" attribute to the "TICKET" entity: the intuition is that while the IP adress of a user can evolve through time, the IP used at the time of creation of the ticket is unique to the ticket, and hence can become an attribute of the ticket. |
#. We could migrate the "FromIP" attribute to the "TICKET" entity: the intuition is that while the IP adress of a user can evolve through time, the IP used at the time of creation of the ticket is unique to the ticket, and hence can become an attribute of the ticket. |
7048 |
7058 |
|
|
|
7059 |
|
Solution +.# |
|
7060 |
|
~ |
7049 |
7061 |
|
|
|
7062 |
|
#. A citizen can be the president of at most one country during a given term. |
|
7063 |
|
A country can have only one citizen as their president during a given term. |
|
7064 |
|
A citizen can be the president of the same country over multiple terms. |
|
7065 |
|
#. Some citizen will never be president, some country may not have presidents (think royalty), some terms may not relate to any presidency (e.g. "3rd century BC"). |
|
7066 |
|
|
|
7067 |
|
|
7050 |
7068 |
Solution +.# |
Solution +.# |
7051 |
7069 |
~ |
~ |
7052 |
7070 |
|
|