Closed PandelisZ closed 6 years ago
Proposal for database structure
Added in tables for events and schedule
@PandelisZ I would recommend reorganising this view completely. Not critiquing the design itself but it should be laid out in a more hierarchical structure with better placements of tables to make it far less confusing for new people to understand the database structure.
There appear to be several issues with it. I've outlined what I believe to be in need of looking at below:
We may want to make a point also of declaring data types with a model such as this for clarity. For example, what data type is content in the hackathon pages table; assuming strigified JSON as text but need to be clear :)
Just wanted to make sure that we have the database design solid before we go about changing things on such a massive scale.
@PandelisZ I forgot to mention, good work overall, I just wanna bring these concerns so that we can flesh out any potential issues now rather than in development <3
The thinking behind the usr_attendee & hackathon_Attendee table is that a hacker can choose to go to more than one hackathon. So why register them twice.
The hackathon_ateendee table exists to solve the many to many relation that would occur in the situation that a hacker wants to attend multiple hackathons with a single account.
The hackathon_attendee table is what we're interested from a hackathon, and the usr_attendee table is the users actual account.
On the events front. I thought it would be good jsut to attach a created_by field, ie: ownerid to anything created so that people can keep track of who made what. And yes we could add that to pages sure. However, pages are a bit more generalised but yeah sure we can do no harm done.
not sure what you mean by point one with the singular link though.
the foreign key issue, yeah missed that i'll add them in
@PandelisZ
Okay, thank you for clearing those points up, knowing of the purpose of the two user tables clears a lot of it up for me. I think as a general principle, anything that a hackathon owner can create should be given an owner ID so we can keep track of exactly what has been modified in event.
I would like you to also add an additional logs table. This is where I would like to collate logs ordered by time of what goes on across all hackathons. It will draw data such as:
Hackathon and Hackathon_announcements have two links between them, as in two physical lines on the drawing. It could be represented by one?
I would still recommend just organising it and trying to mitigate as many lines crossing over as possible for when new devs come onto the project.
Sweet, good job mate
One of those links is going to hackathon_schedule
👍 to the logs 👍 to the created_by on anything that is made by an owner
Basic layout for logs please discuss and adapt:
hackathon_logs | |
---|---|
fk | ownerid |
fk | hacakthonid |
timestamp | |
logevent | |
logdesc |
Displayed as recent events tab in the admin panel in a table format. Something like ownerid created a logevent at timestamp
Some added features here: http://docs.sequelizejs.com/en/latest/
LOL we put a lot of work in to this
Move away from an object store to a standardised just normal sane DB.