Page 1 of 1

How to build a data table?

Posted: Sun Nov 27, 2011 11:01 pm
by GiaTuan
I'm doing a little game with flash and php.I have not thought out the data table will look like.
I have a table of players: playername, birthday, password.
A player will have five buildings,the number of wood products,food,population,a mailbox containing the message from the team or other players.
The building will have attributes such as x, y, level, capacity, number of worker
How to build a data table?

Re: How to build a data table?

Posted: Sun Nov 27, 2011 11:18 pm
by califdon
There is a fairly rigorous process of designing a relational database. It begins with identifying what "entities" will be represented, then how these "entities" are related to each other, and what attributes each entity needs to have. I recommend that you read some of the following:
http://www.kirupa.com/developer/php/rel ... design.htm
http://www.dreamincode.net/forums/topic ... alization/
http://woork.blogspot.com/2008/09/10-us ... abase.html
http://www.atlasindia.com/sql.htm

The very first thing you will need to determine is what database engine you will use. Here in this forum there is emphasis on using MySQL, but there are several other options, all of these are free and open source: PostgreSQL, SQLite, and others.

Re: How to build a data table?

Posted: Tue Nov 29, 2011 6:01 am
by GiaTuan
I work with SQL server.Currently, I use mysql and php.Usually only two primary key or a foreign key
But here the players have too many things.A person who has many building.Each building has attributes.
What should I do?keys...

Re: How to build a data table?

Posted: Tue Nov 29, 2011 12:19 pm
by califdon
You should study the references I provided. They describe the process you need to follow.