Click here to Skip to main content
15,311,151 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i am doing project on college student attendance system.each teacher can have maximum 4 subjects and there are around 36 subjects.each teacher log in to there account and add attendance of his/her subject every day.how can i design database for this,what tables should i create?
Posted
Comments
   
What tables you are thinking to create?
batman56 6-Mar-15 23:16pm
   
teacher,subject and which subject belongs to which class.
   
See my answer.

Start with requirements gathering and analysis with the users to find out, among other things,
1. Who and What are involved: Teacher, Student, Subject, etc => Entities
2. What are their relationships: e.g. every teacher can teach multiple subject, every teacher can teacher many students, etc => Relationship
3. What data do they capture, any system, documents (forms, letters) they use to do this job currently? => Reveal data attributes and existing work flow.
4. What are other other requirements.
It is impossible to explain the design of a database here, you may refer to Introduction to database design[^]. It is a matter of trials and errors, but you get better with more practice. Always go through your design with the users until they are satisfied.
   
v4
1. Teachers
2. Students
3. Subjects
4. SubjectByTeacher (TeacherId, SubjectId)
   
v2
Create a master table for both like teachers,students,subjects,etc.u can use id for concatenation for each table don't use name.

Eg:

Subject master table:

Id        Subject
--        -------
1         English
2         Maths

Teacher master table:

Id        Teacher_Name
--        ----------
1         Sruthy
2         Sreelakshmi

Students master table:

Id        Students_Name
--        ------
1         Vimal
2         Tadit
   

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