Click here to Skip to main content
14,924,103 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello everyone,

My name is Sarfaraz. I want to create a form in PHP and MYSQLI and I need your help like how to create tables to capture the following details:

I need to save the details of the candidates like.

Name, parentage, address and

Qualifications like

10th Std Max Marks Marks Obtained %age
Graduation Max Marks Marks Obtained %age
Post Graduation Max Marks Marks Obtained %age


Now, I need help in capturing the above details in MYSQL server tables.
Thank you.

What I have tried:

I have create a form in PHP and now I need the correct way to capture the details in the database tables.
Posted
Updated 20-Oct-20 20:27pm

   
Comments
sarfarazbhat 15-Oct-20 10:46am
   
Thank you Mr. Richard MacCutchan for the reference.
I think that is a bit advanced but I started to learn the advance topics though I know the basics. It is just that I have never worked on relational database tables as yet.
Anyways, I need a bit clarifications on the primary and foreign keys.
I have created 8 tables in MYSQL as under

Candidate_Info
present_address
Permanent_address
Experience
Documents
10th
12th
Diploma

with

canid_id as PK in candidate_info table
present_add_id as PK in Present_address table
permanent_add_id as PK in Permanent_address table
experience_id as PK in experience table
doc_id as PK in documents table
matric_id as PK in matric table
plustwo_id as PK in plustwo table
diploma_id as PK in diploma table

with canid_id as foreign key in all the other tables except candidate_info table.

Is it a correct way to proceed or I am doing it wrong then please elaborate a bit.
Thank you
Richard MacCutchan 15-Oct-20 10:51am
   
There is really not space or time to provide a tutorial on database design here. There are many articles that you can find via google that will explain these issues in much better detail than I could do.
Hi Sarfaraz,

You've got to follow some fundamentals to build your database structure, yours seems correct at first sight:

- each table must have an auto-incremented primary key
- each data must be located at a unique place (never duplicate any data at 2 different places)

I recomment you to use MySQL Workbench to build your structure, it allows to create your tables & relations in a visual way with shemas, and synchronize them on your server.

Here's a tutorial to get started with MySQL Workbench. You'll find on the same website several tutoriels about the different kinds of database relationships and other related things.
   
Comments
sarfarazbhat 23-Oct-20 3:09am
   
Thank you for the reply, I will surely install MYSQL workbench and try.
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900