My question: whats the best way to tie the concepts together so the skills can modify an attribute of a weapon and spell. Also how do I represent that a a user has unlocked a skill. Do I create a table that has the user id, skill id, and a field that shows it's been unlocked?
Use relationships and pivot tables. It's easier if you see tables as classes, and columns as attributes in object oriented programming. You can make a table which defines a class of objects and its basic attributes, and these attributes can be a reference to another class of objects (another table). For example, you can define a weapon table, and it has:
weapon: id, name, weapon_type, weight, attack_range, damage, price, other_attributes
And an element table:
element: id, name, other, attributes, goes, here
To assign an element to a weapon, you can make a pivot table which stores the relation between a weapon and its elements. We use a pivot table because a weapon can have more than one elements (ex: fire, wind). Just name this table weapon_elements.
weapon_elements: id, weapon_id, element_id
Here, weapon_id is an integer which refers to a weapon's id (weapon.id), and element_id refers to an id of an element from the element table. You can insert some rows which define the relations of a weapon to several elements, like:
id | weapon_id | element_id 1 | 1 | 1 2 | 1 | 3 3 | 2 | 4
id, name, type, weight, attack_range, damage, price, element_one, element_two, element_three, element...
If it's just a one-to-one relationship, where an attribute refers to only an object of another class, you don't need a pivot table. For example, a weapon only has one type. A weapon can't be a sword and a bow at the same time, can it? That's why type in in the weapon table refers to a weapon_type table which defines the types of weapons available in the game.
weapon_type: id, name, other, attributes, that, defines, a_type, of_weapons
Be creative with the rest.
P.S. I hate formatting.