Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualstarbasecitadel

Posted 25 May 2013 - 12:47 PM

I agree with the others.  For example here is one way to normalize it:

 

 

character

========

id

name

 

attribute

======

id 

name

 

character_attribute

===============

id

attribute_id

attribute_value

 

unique index main_ind (id, attribute_id)

 

 

Your character_attribute table will now have 500 rows per character.    This is much more scalable and still easy to work with.  

 

edit:  Just to populate this a bit to further illustrate:

 

character table

===========

id , name

1 , Conan

2 , Gandalf

 

character_attribute  table

===================

id , name

1 , class

2 , level

3 , strength

4 , spellpower

 

character_attribute

==============

id , attribute_id,  attribute_value

1 , 1 , Warrior

1 , 2 , 15

1 , 2 , 18

1 , 2 , 0

2 , 1 , Wizard

2 , 2, 20

2 , 3 , 5

2 , 4 , 19


#2starbasecitadel

Posted 25 May 2013 - 11:45 AM

I agree with the others.  For example here is one way to denormalize it:

 

 

character

========

id

name

 

attribute

======

id 

name

 

character_attribute

===============

id

attribute_id

attribute_value

 

unique index main_ind (id, attribute_id)

 

 

Your character_attribute table will now have 500 rows per character.    This is much more scalable and still easy to work with.  

 

edit:  Just to populate this a bit to further illustrate:

 

character table

===========

id , name

1 , Conan

2 , Gandalf

 

character_attribute  table

===================

id , name

1 , class

2 , level

3 , strength

4 , spellpower

 

character_attribute

==============

id , attribute_id,  attribute_value

1 , 1 , Warrior

1 , 2 , 15

1 , 2 , 18

1 , 2 , 0

2 , 1 , Wizard

2 , 2, 20

2 , 3 , 5

2 , 4 , 19


#1starbasecitadel

Posted 25 May 2013 - 11:42 AM

I agree with the others.  For example here is one way to denormalize it:

 

 

character

========

id

name

 

attribute

======

id 

name

 

character_attribute

===============

id

attribute_id

attribute_value

 

unique index main_ind (id, attribute_id)

 

 

Your character_attribute table will now have 500 rows per character.    This is much more scalable and still easy to work with.  


PARTNERS