Django Models

44 views
Skip to first unread message

Ken Edem

unread,
May 26, 2016, 8:47:34 PM5/26/16
to Django users

I am new to Django Python and I need bit of help



Can someone please help me with how I should structure my models, since this is a very important part of the project I am trying to develop, I had been teaching myself and not yet good at this stuff. I want to develop a web project for matching teachers or instructors who will teach students who subscribes to our service at they residence.For now I think I will need these models:


Students = Database to contain all students details.  See below for the database fields

Instructors = Database to contain all instructors or teachers details. See below

Course = Databases for all the courses or services that will be offering

Feedbacks = Database to contains both feedbacks from students about teachers and also teachers about students.


So, I have done something in terms of normalising my database, but I do not think it is efficient enough.? I think I also need a database Class, which is combination of Students and Instructors, but I cannot figures what the fields of this database should be.

I also think I need a combine database Instructors & Course and Course & Students. But I cannot figure out what the fields of these databases also should be and what the foreign key or whatever should be.


You see, our primary service will be matching students with instructors and having these instructors teach student what they want to be thought.


Please can  someone assist me in structuring my models a structure and also should I just have one app or separate apps for students, instructors, feedbacks etc. Thanks in advance.


Below is my database models.


Thanks agains


 


Models and Tables

-   Students

-   Instructors

-   Course

-   Feedbacks

-   Class


Model Properties and Fields

Students

-   student-id

-   student_firstname

-   student_lastname

-   student_address

-   student_city

-   student_region

-   student_startdate  (immediately, in 2 weeks, in a month over 6 months)

-   student_classLocation (student address, instructor address, arrange location)

-   student_phone1

-   student_email

-   student_phone2

-   student_internetContact  (skype, viber etc)

-   student_days_to_take_classes (mon - sun)

-   student_duration_of_course  (1 - 12 months)

-   student_hours_to_spend_on_course  (1 -8 hours)

-   student_class_start_time  ( 06am - 06am)

-   student_course_skill_level (beginner, intermediate, advance)

-   student_personal_wishes_to_help_match_an_intructor ( )

-   student_budget_amount

-   student_preferred_instructor_gender  (male, female)

-   student_date_of_birth


Students Methods and actions

-   match a student to instructors

-   seek payment

-   message update




Instuctors

-   id

-   firstname

-   lastname

-   middlename

-   gender

-   date_of_birth

-   phone1

-   phone2

-   streetaddress

-   city

-   region

-   country

-   qualifications  (multiple entry)

-   certfications  (multiple entry)

-   degrees (multiple entry)

-   present occupation

-   previous occupations (multiple entry)

-   present job position

-   length of teaching skills

-   type of skills to teach

-   class location (student address, tutor address, arranged address)


Instructor Methods and Actions

match instructor to students

seek instructors

pay instructors

-



Courses

-   id

-   course_name

-   course_description

-   course_duration


Methods



Feedbacks

-   id

-   course_name

-   instructor

-   student

-   Feedback_details

-   Grade (Beneficial, Great, Average, Satisfied, Very Satisfied, Excellent)




Class

-   instructor

-   students

-   course

Derek

unread,
May 27, 2016, 10:47:56 AM5/27/16
to Django users
There a number of designs for similar situations online; a quick Google showed me:

* http://www.databasedev.co.uk/student_courses_data_model.html
* http://databaseanswers.org/data_models/

And I am sure there are more...

If this is your first project. I would not be too fussed about making it perfect.  Try out what seems to work and then iterate as you go.  You'll learn a lot and probably end up having to rewrite based on all your learning.

Ken Edem

unread,
May 27, 2016, 12:14:48 PM5/27/16
to Django users
Wow, Derek what a great link. Thanks very much.

Ken
Reply all
Reply to author
Forward
0 new messages