Answer the question
In order to leave comments, you need to log in
Architecture of the project and tables. How to do?
Hello!
After watching the lessons of Dmitry Eliseev, and specifically on independent modules, I began to think about how to build everything?
I develop on YII. Initially, I divided EVERYTHING into modules
USER module
Responsible for authorization and storage of basic settings: authorization, password recovery, registration ...
User
table Profile table
DISCIPLINE module
Responsible for storing discipline data
ORGANIZATION module
Organization section (dance schools, groups, music schools ... ) is responsible for storing information about organizations, organization statistics, contacts, reviews.
The people of an organization can have several roles: director, supervisor, coach, choreographer.... dancers, singer, athlete....
EVENT
module The event module is responsible for working with events and the calendar
Events can be organized by organizers and organizations.
An event can have people:
organizer, presenter, counter, volunteer, security guard
Table organizing committee.
REGISTRATION module
Responsible for registering participants for the event, keeping statistics, rating, receiving payments, calculating finances, uploading various reports and lists.
Tables:
Mentors: teacher, choreographer, coach... (from organization module)
Participants: dancer, athlete, singer... (from organization module)
And now I'm thinking how to design the base. After all, the profile is the same for everyone, but the roles can be different and several fields differ. At the same time, I need to search for all people, display their friends, show who is online, who is offline, and display the overall rating.
After a little thought, I realized that there are too many modules. Many refer to one unit of organization. Therefore, it is more reasonable to combine part of the modules into an organization module.
Here's what happens when combined by organization:
MODULE USER
user
- email
- password
- password_hash
- vizit_at
people
- id
- user_id
- last_name
- first_name
- middle_name
- birthday
- gender
friend
- from_id
- to_id
- status
message
- from_id
- to_id
- text
MODULE OF DISCIPLINE
discipline (disciplines)
- id
- name
MODULE OF ORGANIZATION
organization
- id
- name
- type (organization type: Dance school, music school, sports school....)
- event_count
- people_count
org_rewiew (reviews)
- id
- people_id (can be Null)
- text
- active
org_people organization people)
- org_id
- people_id
- role (director, dancer, manager, coach, singer athlete...)
org_people_director
- id
- people_id
- position (position)
org_people_dancer
- id
- people_id
- nickname (nickname)
- org_people_dancer_mentor (dancer's mentors)
- dancer_id (id people)
- mentor_id (id people)
- role (coach, leader, teacher)
/// and so on all roles that need additional fields
organization_event (organization events)
- id
- org_id (Organization)
- name
- date_from
- date_to
- type (festival, master class, camp ...)
org_evt_discipline (disciplines for registration)
- event_id
- discipline_id
- active
org_evt_request (requests)
- id
- event_id
- discipline_id
- reg_number
- cost
- cost_payd
- cost_discount_percent
- cost_dicount_amount
- participant_count
- mentor_count
- contact_email
- contact-phone
- status (waiting for payment, paid, completed, canceled, canceled by the participant)
org_evt_req_participant (participants, application and people connection)
participants can be all people without reference to an organization
- request_id
- people_id
- role (dancer, singer, athlete)
org_evt_req_mentor (mentors, application and people connection)
All people can be mentors
- request_id
- people_id
- role (director, leader, coach, teacher)
Did I design the tables correctly? The modules are not complete and have connections with each other. But I do not aspire to independence. We can say that this is just a project structure, not modules.
The main thing is to understand whether the base was designed correctly? What are the pitfalls? What are the nuances? Normal forms? Any criticism would be helpful!
An example of such a project is here: https://godance.tv
But there is no registration functionality there.
Answer the question
In order to leave comments, you need to log in
- password
- password_hash
not funny org_people_director
org_people_dancer
org_people_dancer_mentor
org_people люди организации)
- org_id
- people_id
- role (директор, танцор, руководитель, тренер, певец спортсмен...)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question