pavanpuligandla Posted October 11, 2008 Share Posted October 11, 2008 Hii,, i'm developing an online portal, which my MYSQL database contains 100 tables.. my doubt is if any table contains 30-40 columns will it become a problem? like my html front end form has 40 fields for data insertion. and i'm not maintaing any duplicate data if my DB contains 100-150 tables will it create any problems?? as i'm inserting data from EXCEL via PHP to MYSQL, please suggest me whether a healthy MYSQL table is dependent or independent on NO:OF COLUMNS(FIELDS) or not? Many Thanks, Pavan.P. Quote Link to comment https://forums.phpfreaks.com/topic/127943-mysql-table-columns-help/ Share on other sites More sharing options...
Barand Posted October 11, 2008 Share Posted October 11, 2008 150 table, 40 columns is well within limits. Make sure those 40 columns don't comprise series of names like this, for example, monthly sales totals sales01 | sales02 | sales03 | ... | sales12 | total_2007 | This is usually the problem I find when building from existing spreadsheets as accountants have no concept of data normalization. Quote Link to comment https://forums.phpfreaks.com/topic/127943-mysql-table-columns-help/#findComment-662602 Share on other sites More sharing options...
pavanpuligandla Posted October 11, 2008 Author Share Posted October 11, 2008 hii.. my application is an online web portal tht stores marks,grades,attendance semester courses etc.. so, if an exam was conducted the administrator has to insert around 5000 student records of various branches like UG,PG PHD, in which there'll b different subjects so my marks table contains data columns like this: Name|studentID|Branch|year|examtype|batchID|A1|A2|A3|A4|A5|...|a25| A1,A2...A25 are subject codes.. i 'm not storing repeated values in any table. examtype is like term exams, assignments, and 8 various exams.. so i'vent found better solution than the above explained design.. is my DB proto good or bad?? ??? pls do suggest me.. Quote Link to comment https://forums.phpfreaks.com/topic/127943-mysql-table-columns-help/#findComment-662623 Share on other sites More sharing options...
Barand Posted October 11, 2008 Share Posted October 11, 2008 I am unfamiliar with all your data relationships so don't take this as a final "must be like this", it's just to illustrate the point [pre] Name |studentID|Branch| |studentID|year|examtype|batchID|Exam|Result| +----+---------+------+ +---------+----+--------+-------+----+------+ |John| 124 | 102 | | 124 |2008| UG | 456 | A1 | 86 | |Jane| 428 | 102 | | 124 |2008| UG | 502 | A2 | 91 | | 124 |2008| UG | 555 | A3 | 68 | | 428 |2008| UG | 502 | A1 | 88 | | 428 |2008| UG | 555 | A3 | 78 | [/pre] Quote Link to comment https://forums.phpfreaks.com/topic/127943-mysql-table-columns-help/#findComment-662699 Share on other sites More sharing options...
pavanpuligandla Posted October 11, 2008 Author Share Posted October 11, 2008 yeah i'll follow d same, thnx for ur reply boss.. but there are around 20 different subjects each semester, and 8 various exams r conducted, and i got an idea with ur explanation.. Name , StudentID, Branch, Batch, ExamType, ExamYear, A1 A2 A3 A4 A5... as i'm using excel as front end form, this format will b more easier to the admin.. but i can say one thing, i'm takin care about redundancy well. Many thanx barand, Quote Link to comment https://forums.phpfreaks.com/topic/127943-mysql-table-columns-help/#findComment-662841 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.