File notes/lectures_notes.md changed (mode: 100644) (index f6f8360..d10750d) |
... |
... |
The u͟n͟d͟e͟r͟l͟i͟n͟e͟ text is obtained from <https://yaytext.com/under |
145 |
145 |
|
|
146 |
146 |
To clone and compile this document, refer to the `README.md` file, at <https://rocketgit.com/user/caubert/CSCI_3410/source/tree/branch/master/blob/README.md> or <http://spots.augusta.edu/caubert/db/ln/README.html>. |
To clone and compile this document, refer to the `README.md` file, at <https://rocketgit.com/user/caubert/CSCI_3410/source/tree/branch/master/blob/README.md> or <http://spots.augusta.edu/caubert/db/ln/README.html>. |
147 |
147 |
|
|
|
148 |
|
Those lecture notes were created under an [Affordable Learning Georgia](https://www.affordablelearninggeorgia.org/) [Mini-Grant for Ancillary Materials Creation and Revision](https://www.affordablelearninggeorgia.org/about/r13_grantees) ([Proposal M71](https://www.affordablelearninggeorgia.org/about/r13_grantees)). |
|
149 |
|
|
|
150 |
|
{width=70%}\ |
|
151 |
|
|
148 |
152 |
## Various Resources {-} |
## Various Resources {-} |
149 |
153 |
|
|
150 |
154 |
On top of the [references](references) and of the "resources" listed at the beginning of each chapter, I consulted while writing those notes: |
On top of the [references](references) and of the "resources" listed at the beginning of each chapter, I consulted while writing those notes: |
|
... |
... |
The focus will be on design, but we will have to do a little bit of everything. |
222 |
226 |
|
|
223 |
227 |
## Design |
## Design |
224 |
228 |
|
|
225 |
|
{#fig:cycle} |
|
|
229 |
|
{#fig:cycle width=90%} |
226 |
230 |
|
|
227 |
231 |
Refer to the ["The cycle of design" figure](#fig:cycle). |
Refer to the ["The cycle of design" figure](#fig:cycle). |
228 |
232 |
|
|
|
... |
... |
The following links could be useful: |
1958 |
1962 |
#. Save the "mysql-installer-web-community-XXX.msi" file, and open it. If there is an updated version of the installer available, agree to download it. Accept the license term. |
#. Save the "mysql-installer-web-community-XXX.msi" file, and open it. If there is an updated version of the installer available, agree to download it. Accept the license term. |
1959 |
1963 |
#. We will now install the various components needed for this class, leaving all the choices by defaults. This means that you need to do the following: |
#. We will now install the various components needed for this class, leaving all the choices by defaults. This means that you need to do the following: |
1960 |
1964 |
#. Leave the first option on "Developer Default" and click on "Next", or click on "Custom", and select the following: |
#. Leave the first option on "Developer Default" and click on "Next", or click on "Custom", and select the following: |
1961 |
|
 |
|
|
1965 |
|
{width=90%} |
1962 |
1966 |
#. Click on "Next" even if you don't meet all the requirements |
#. Click on "Next" even if you don't meet all the requirements |
1963 |
1967 |
#. Click on "Execute". The system will download and install several softwares (this may take some time). |
#. Click on "Execute". The system will download and install several softwares (this may take some time). |
1964 |
1968 |
#. Click on "Next" twice, leave "Type and Networking" on "Standalone MySQL Server / Classic MySQL Replication" and click "Next", and leave the next options as they are (unless you know what you do and want to change the port, for instance) and click on "Next". |
#. Click on "Next" twice, leave "Type and Networking" on "Standalone MySQL Server / Classic MySQL Replication" and click "Next", and leave the next options as they are (unless you know what you do and want to change the port, for instance) and click on "Next". |
|
... |
... |
We are dealing with moving aspects here: atributes on $1:1$, $1:N$, $N:1$ relati |
3821 |
3825 |
|
|
3822 |
3826 |
To determine cardinality ratio: fix all but one, wonder how many can be in that relationship. |
To determine cardinality ratio: fix all but one, wonder how many can be in that relationship. |
3823 |
3827 |
|
|
3824 |
|
 |
|
|
3828 |
|
{width=90%} |
3825 |
3829 |
|
|
3826 |
|
 |
|
|
3830 |
|
{width=90%} |
3827 |
3831 |
|
|
3828 |
3832 |
*Need to find a good $3$-ary example* |
*Need to find a good $3$-ary example* |
3829 |
3833 |
|
|
|
... |
... |
Two sorts of entity types: |
3842 |
3846 |
Weak (child) entity types are identified by **identifying / owner** type that is related to it, in conjunction with one attribute (**the partial key**). |
Weak (child) entity types are identified by **identifying / owner** type that is related to it, in conjunction with one attribute (**the partial key**). |
3843 |
3847 |
Relation is called identifiying relationship, and weak entities have a total participation constraint. |
Relation is called identifiying relationship, and weak entities have a total participation constraint. |
3844 |
3848 |
|
|
3845 |
|
 |
|
|
3849 |
|
{width=90%} |
3846 |
3850 |
|
|
3847 |
3851 |
Choice between two representation: if pet is involved in other relationships! |
Choice between two representation: if pet is involved in other relationships! |
3848 |
3852 |
|
|
|
... |
... |
Choice between two representation: if pet is involved in other relationships! |
3854 |
3858 |
|
|
3855 |
3859 |
#### Notation With Explicit Maximal |
#### Notation With Explicit Maximal |
3856 |
3860 |
|
|
3857 |
|
 |
|
|
3861 |
|
{width=90%} |
3858 |
3862 |
|
|
3859 |
|
 |
|
|
3863 |
|
{width=90%} |
3860 |
3864 |
|
|
3861 |
3865 |
#### Crow's foot notation {#sec:Crow_foot} |
#### Crow's foot notation {#sec:Crow_foot} |
3862 |
3866 |
|
|
3863 |
|
 |
|
|
3867 |
|
{width=90%} |
3864 |
3868 |
|
|
3865 |
3869 |
<https://www.lucidchart.com/pages/ER-diagram-symbols-and-meaning> |
<https://www.lucidchart.com/pages/ER-diagram-symbols-and-meaning> |
3866 |
3870 |
|
|
3867 |
|
 |
|
|
3871 |
|
{width=90%} |
3868 |
3872 |
|
|
3869 |
3873 |
<https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model#Crow%27s_foot_notation> |
<https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model#Crow%27s_foot_notation> |
3870 |
3874 |
|
|
|
... |
... |
Won't be able to represent it, because of https://stackoverflow.com/a/21260267/2 |
3896 |
3900 |
|
|
3897 |
3901 |
From relational models to E.R. models (sometimes needed) |
From relational models to E.R. models (sometimes needed) |
3898 |
3902 |
|
|
3899 |
|
 |
|
3900 |
|
|
|
3901 |
|
 |
|
|
3903 |
|
{width=90%} |
3902 |
3904 |
|
|
|
3905 |
|
{width=90%} |
3903 |
3906 |
|
|
3904 |
3907 |
--- |
--- |
3905 |
3908 |
|
|
|
... |
... |
Using four tools: Relations, Attributes, Primary Keys, Foreign Keys. |
3936 |
3939 |
|
|
3937 |
3940 |
**Bug: + Propagate option? Cascade, most of the time: weak entity type, lookup tables, etc.** |
**Bug: + Propagate option? Cascade, most of the time: weak entity type, lookup tables, etc.** |
3938 |
3941 |
|
|
3939 |
|
 |
|
|
3942 |
|
{width=90%} |
3940 |
3943 |
|
|
3941 |
3944 |
|
|
3942 |
3945 |
### Outro |
### Outro |
|
... |
... |
Wide, powerful, but also intimidating. |
4253 |
4256 |
|
|
4254 |
4257 |
You know UML from object-oriented programming language: |
You know UML from object-oriented programming language: |
4255 |
4258 |
|
|
4256 |
|
 |
|
|
4259 |
|
{width=90%} |
4257 |
4260 |
|
|
4258 |
4261 |
That's a class diagram, there are other types of diagrams, they are not unrelated! |
That's a class diagram, there are other types of diagrams, they are not unrelated! |
4259 |
4262 |
For instance, using communication diagrams, deployment diagrams, and state chart diagrams, you can collect the requirements needed to draw a class diagram! |
For instance, using communication diagrams, deployment diagrams, and state chart diagrams, you can collect the requirements needed to draw a class diagram! |
|
... |
... |
Exercise +.# |
4412 |
4415 |
<!-- Bug with table --> |
<!-- Bug with table --> |
4413 |
4416 |
Entity 1 | Cardinality Ratio | Entity 2 | |
Entity 1 | Cardinality Ratio | Entity 2 | |
4414 |
4417 |
| --- | :---: | --- | |
| --- | :---: | --- | |
4415 |
|
STUDENT | \ | MAJOR |
|
4416 |
|
CAR | \ | TAG |
|
4417 |
|
INSTRUCTOR | \ | LECTURE |
|
4418 |
|
INSTRUCTOR | \ | OFFICE |
|
4419 |
|
COMPUTER | \ | OPERATING\_SYSTEM |
|
|
4418 |
|
STUDENT | : | MAJOR |
|
4419 |
|
CAR | : | TAG |
|
4420 |
|
INSTRUCTOR | : | LECTURE |
|
4421 |
|
INSTRUCTOR | : | OFFICE |
|
4422 |
|
COMPUTER | : | OPERATING\_SYSTEM |
4420 |
4423 |
|
|
4421 |
4424 |
Exercise +.# |
Exercise +.# |
4422 |
4425 |
|
|