Posts: 41
Threads: 0
Joined: Jan 2019
no dont create different tables for factions
simple example of possible table structure
table : factions
factionID
factionName
factionType
table : faction_ranks
factionID
rankLevel
rankName
rankPayCheck
table : faction_members
factionID
userRank
userID
userPayCheck
table : faction_positsions // for example car repair points, equipment points etc
factionID
posText
posType
posX
posY
posZ
posVW
posInt
and with such structure nothing isnt limited in factions
you can add as many positsions members ranks as possible into your faction.
Posts: 1,228
Threads: 1
Joined: May 2018
Reputation:
0
You do not create a new table for each user, do you? You should follow the same rules when designing a database.
You cannot have information about a faction and all its members in only one table without duplicates. What you need is two tables. The parent table which contains faction ID (generated by auto increment), its name and other information such as color etc. The child table is linked with faction ID (foreign key) and contains faction ID, user ID and rank.
Posts: 41
Threads: 0
Joined: Jan 2019
well when you build dynamic faction system, were people can be in many factions then its good to create other table.
Posts: 108
Threads: 17
Joined: Sep 2018
Reputation:
0
Hey guys, thanks for the help of all, clarify my doubts perfectly.
Posts: 1,076
Threads: 70
Joined: Jul 2016
Reputation:
0
You are better off creating all the factions in the same table and link each one of them to some other table, after all, MySQL's power resides in its descriptive nature of being called a relational database.
Posts: 50
Threads: 1
Joined: Apr 2015
Reputation:
0
Why do you want to create a table for each faction if you can create just one table 'factions' with all fields you need (id, name, hq pos, rank-names, interior, etc)?