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?
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
You could have a separate table with a structure similar to the following which would hold all of the various types of images you would need:
documents
--------------------
| id, INT AUTOINCREMENT
| applicant_id, INT
| type, VARCHAR(255)
| url, VARCHAR(255)
--------------------
The applicant_id
would refer to the applicant to whom the documentation pertains to. The type
field could be one of degree
or transcript
or whatever else type of documentation you support. And finally the url
field would contain the location to the image. Preferably, you should have a PHP form that uploads images to a directory on your server and then adds a record to the documents
table relating to what the user just uploaded.