Is it okay if I have a table with more than 20 fields in DB table?
ID | NAME | 1 | 2 | 3 | .....
Each of fields like ‘2’ holds only Y or N in them.
Or is it bad idea to have so maybe fields in one table?
Will this slow down my performance of server?
And there may be about 20 or more Ids in the table.
I have no idea if it will slow the database down but it is not a very nice database design, no. What you could do to optimize the design is the following:
Make a table:
ID | NAMEand another table:ID | NUMBER | BOOLEANand link the two ID’s together.You will probably have some more PHP code this way, but it will make the database a lot more managable and neater.