This is one very strange question.
If you claim you have written a browser based game thats "almost done", then none of these questions should be difficult for you.
I dont get it.
1) Look up "many-to-one" or "many-to-many" relationships.
2) Um, people spend months developing such code. Obviously if you find it for free, then thats easier.
3) Its called coding. Look up some design methodologies. You are just describing an algorithm that needs to be converted to code. Nothing difficult.
4) Um, more coding.
Hey I have a question. How do I make a game where you run around a 3D world and there are monsters in the world that you shoot, and, um, you drive a car that turns into a space ship and you visit planets.
Would that be hard? Well derrr