Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ER modeling #32

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Doc/.UML_diagram.md.swp
Binary file not shown.
63 changes: 63 additions & 0 deletions Doc/ER_diagram.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This diagram represents the ER relationship diagram among the entities below
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a title and make the rest of the information a paragraph: for better formatting.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay good


# In order to understand the cardinality, please refer to the mermaid documentation

# https://mermaid-js.github.io/mermaid/#/entityRelationshipDiagram

```mermaid
erDiagram
USER ||--|| STUDENT : is
USER ||--|| MENTOR : is
USER ||--|| ADMIN : is
USER ||--|| SIGNIN : has
STUDENT ||--o{ EVENTS : posts
STUDENT ||--|| CALENDAR : has
MENTOR ||--|| CALENDAR : has
MENTOR ||--|{ WEEKDAYS : tutors
ADMIN ||--o{ EVENTS : posts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a string password field here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first section represents Entity relationships and each constitutes its own table. Do you mean to have a Password entity? or if you are referring to string password, let me know the table so I can add it@kirubeltadesse

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand. clicked at the wrong place by mistake :)

CALENDAR ||--|{ WEEKDAYS: has
USER {
int user_id PK
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The datatype of user_id seems to be inconsistent. It is an int datatype here but on STUDENT, MENTOR and SIGNIN it seems to be of string data type

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dinaolmelak this is closed PR?

Copy link
Collaborator

@dinaolmelak dinaolmelak Jun 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, I have added these changes to my pull request #44

string fullName
string Jnumber
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we set this to camel case naming convention? (i.e string jNumber)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also set the data type of jNumber to int?

string email
string role
string userName
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I mean add the password here. Next to the userName

}
STUDENT {
int student_id PK
string user_id FK
}
MENTOR {
int mentor_id PK
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The data type of mentor_id is int here but under EVENTS it is a string.

string user_id FK
string course
BAbate marked this conversation as resolved.
Show resolved Hide resolved
}
ADMIN {
int admin_id PK
string user_id FK
}
SIGNIN {
kirubeltadesse marked this conversation as resolved.
Show resolved Hide resolved
int signIn_id PK
string user_id FK
string userName
string password
}
EVENTS {
int events_id PK
string mentor_id FK
string student_id FK
dateFormat startDate
dateFormat endDate
}
CALENDAR {
kirubeltadesse marked this conversation as resolved.
Show resolved Hide resolved
int calendar_id PK
int weekday_id FK
}
WEEKDAYS {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2022-06-06 at 12 34 25 PM

Should we add an entry for 'week' here?

int weekday_id PK
int mentor_id FK
dateFormat startDate
dateFormat endDate
}
```