douniuta4783 2013-08-12 21:06
浏览 51

在线招生系统

I am working on Online Admissions System in mysql and php.

I need to save applicant's personal as well as academic details. So far I have created one table to save personal details with Applicant Id (auto increment) as a Primary Key. But for academic details I am bit confused. The fields required for academic details are:

Degree Level (like Master, Bachelor, high school);
Roll No;
Subjects; 
Grade;
Institution;
Percentage;
Degree image (image field to save scanned copies of transcripts).

I do not know how to relate these two tables. Would uploading image files (scanned copies of transcripts) affect the database performance?

  • 写回答

2条回答 默认 最新

  • dsc56927 2013-08-12 21:15
    关注

    You would have 2 tables

    Applicants

    Id | Name | Address | etc, etc
    

    AcademicDetails

    Id | ApplicantId | Degree | RollNo | DegreeImageUrl | etc, etc
    

    To list all applicants

    SELECT * FROM Applicants
    

    To search for a specific Applicant by Name.

    SELECT * FROM Applicants WHERE name = 'Tom Jones'
    

    To select an Applicant Id=1 and all their Academic details use a join

    SELECT * FROM Applicants JOIN AcademicDetails ON AcademicDetails.ApplicantId=Applicants.Id
     WHERE Applicants.Id = 1
    
    评论

报告相同问题?