I want to store student marks into tran table and i have defined just normal design but while inserting we have to store multiple rows for single student .Is it possible to have better design for this problem as no. of student and subject are not fix.
Asked
Active
Viewed 67 times
0
-
Is this MySQL or Oracle as they are different RDBMS? Or you could remove both tags and just leave the SQL tag? Also, I've removed the java & jdbc tags as they appear to have no bearing on the question. – MT0 May 12 '16 at 13:34
-
There is nothing wrong with values appearing multiple times in tables. What is redundant is when multiple rows state overlapping things about the situation. That redundancy is what normalization reduces. http://stackoverflow.com/a/26952821/3404097 – philipxy May 15 '16 at 02:51
1 Answers
1
What you have now is a completely normal design for your situation. No need to change anything. Also, there is no redundancy of values as foreign keys should not be considered as values.
Some caveats though:
- Don't store date as VARCHAR. There is a separate type for that.
- Students should have a firstname and lastname stored separately.

jva
- 2,797
- 1
- 26
- 41
-
actually to store one student details as per design we need to add no. Of rows based on subject.so for one student their might be multiple rows.So is their any better solution to store the student marks details as per subject in efficient way? – user5830868 May 12 '16 at 16:39
-
If you never need first name and last name separately, you may as well leave them together. – Rick James May 24 '16 at 01:16