今天我開始創建一個基於Django的學校管理程序的小項目。我目前正在設計模型及其相應的關係。對於Django和一般的關係數據庫來說相當新,我想要一些輸入。在Django Schools的模型設計中尋找輸入
在向您展示當前的模型佈局之前,您需要了解該程序的用途。請記住,這是我的目標,該軟件可供各個學校和整個學校系統使用。
特點: - 創建多個學校
- 每所學校
跟蹤學生羣體 - 跟蹤學生的成績,家長聯繫方式等
- 級書籍
- 成績單
- 跟蹤紀律處分的紀錄。
- 費用安排和付款跟蹤
- 生成報告(學生活動,學生成績單,班級的進步,受人口,付款進度報告,由學生課和人口學科報告)
- 自動PDF報告發送給家長學生報告。
鑑於這些功能的要求,這裏是我目前擁有的模式佈局: 模型
* Person
o ID: char or int
o FirstName: char
o MiddleName: char
o FamilyName: char
o Sex: multiple choice
o Ethnicity: multiple choice
o BirthDate: date
o Email: char
o HomePhone: char
o WordPhone: char
o CellPhone: char
o Address: one-to-one with Location
* Student (inherent Person)
o Classes: one-to-many with Class
o Parents: one-to-many with Parent
o Account: one-to-one with PaymentSchedule
o Tasks: one-to-many with Tasks
o Diciplin: one-to-many with Discipline
* Parent (inherent Person)
o Children: one-to-many with Student
* Teacher (inherent Person)
o Classes: one-to-many with Class
* Location
o Address: char
o Address2: char
o Address3: char
o City: char
o StateProvince: char
o PostalCode: char
o Country: multiple choice
* Course
o Name: char
o Description: text field
o Grade: int
* Class
o School: one-to-one with School
o Course: one-to-one with Course
o Teacher: one-to-one with Teacher
o Students: one-to-many with Student
* School
o ID: char or int
o Name: char
o Location: one-to-one with location
* Tasks
o ID: auto increment
o Type: multiple choice (assignment, test, etc.)
o DateAssigned: date
o DateCompleted: date
o Score: real
o Weight: real
o Class: one-to-one with class
o Student: one-to-one with Student
* Discipline
o ID: auto-increment
o Discription: text-field
o Reaction: text-field
o Students: one-to-many with Student
* PaymentSchedule
o ID: auto-increment
o YearlyCost: real
o PaymentSchedule: multiple choice
o ScholarshipType: multiple choice, None if N/A
o ScholarshipAmount: real, 0 if N/A
o Transactions: one-to-many with Payments
* Payments
o auto-increment
o Amount: real
o Date: date
如果您對如何可以改進的想法,我喜歡他們的一年!
更新
我寫的初始models.py代碼,這可能需要很多的愛。如果你想看看,甚至加入該項目,請查看鏈接。
http://bazaar.launchpad.net/~djangoschools/djangoschools/trunk/files
將這樣的問題製作成社區wiki可能是個好主意,所以我們可以直接編輯它。 – Powerlord 2008-12-05 20:56:22
檢查。編輯你心中的內容! – crashsystems 2008-12-05 21:29:34