Welcome to the Browser-Base Game Zone forums!
I'd disagree; it's actually less convenient having 50 columns in your main table. There's a lot of maintenance involved in building sql to, for example, show all of your buildings, or to find the first empty one. It's less performant and less maintainable.I agree on the point where you don't always have to maintain a perfectly normalized database - but do start with one, and revert where it makes things too complicated, but do so sparingly.The number of buildings for each colony is easy to check - just get a count of the buildings where the colonyid is your colony.(I'd also suggest looking at non-relational databases like MongoDB for extra credit.)
No, but there are up to 50 players in a round, and players can get from 0-100 colonies, theoretically you could have more colonies if I made the universe larger. And players create blueprints for things, like ship hulls, ship components, and buildings. Each blueprint is unique. I know how to count the total number of buildings, but I need to be able to store and retrieve the amount of each building a player has built in a colony, 15 of this 27 of that 34 of another, and that is just one building type, say iron mines. So you would need from 0-infinity columns for just iron mines, and there are 10 types of mines, plus farms, and then there are like 8 other buildings, and then there are ship hulls, like 15, and ship components, like 9.
that sounds like something for ogame.the buildings in my colonies do not have levels. their stats are static. still i think i figured it out.