| 4 | | [[Image(ERModel_v01.jpg)]] |
| | 4 | |
| | 5 | == Entities |
| | 6 | |
| | 7 | {{{User}}} |
| | 8 | |
| | 9 | This is the core entity that represents every person registered on [https://develop.finki.ukim.mk/projects/petsitter/#PetSitter PetSitter]. It acts as a supertype for {{{Admin}}}/{{{PetOwner}}}/{{{PetSitter}}} so we can store the common attributes only in {{{User}}}. |
| | 10 | |
| | 11 | '''Candidate keys:''' |
| | 12 | * {{{user_id}}} - '''Primary key'''; numeric id, most efficient for indexing |
| | 13 | * {{{username}}} - unique but not as efficient as {{{user_id}}} |
| | 14 | * {{{email}}} - unique but not as efficient as {{{user_id}}} |
| | 15 | |
| | 16 | '''Attributes:''' |
| | 17 | |
| | 18 | * {{{user_id}}} - Numeric (Required, Unique, Auto-generated integer). |
| | 19 | |
| | 20 | * {{{username}}} - Text (Required, Unique, 4-20 characters). |
| | 21 | |
| | 22 | * {{{first_name}}} - Text (Required). |
| | 23 | |
| | 24 | * {{{last_name}}} - Text (Required). |
| | 25 | |
| | 26 | * {{{password}}} - Text (Required, Hashed format, Min. 8 characters). |
| | 27 | |
| | 28 | * {{{email}}} - Text (Required, Unique, Standard email format). |
| | 29 | |
| | 30 | ---- |