If I restore my iPhone will my iTunes library be erased?

I want to restore my iPhone to factory settings and I have forgotten my restrictions password so I'll do it from iTunes. When I have restored it will my iTunes library be erased, also I have movies and tv shows on iTunes will I have to download them again or can I just copy them before I restore then just paste them back into iTunes?

Your on device library would be erased. Nothing on your computer would be affected.

  • Will downloading a new iTunes ruin my old iTunes library? I tried connecting my new iPhone 5 to my iTunes but it said that it wouldn't connect because my version of iTunes was really old (from 2010) and I never updated. It said I need to download a new version of iTunes (10.7 onwards) for it to be compatible with my iPhone. But my question is, IF I download a new version of iTunes, will all my old songs on my old iTunes disappear? Because if I had to re-download my whole library, I would seriously cry. That would take the rest of my life.
  • Why do the songs on my iPhone get erased every time I try to sync it? Every time I want to add a new ringtone, episode of a show, or movie, I get warned that all of my existing songs on my iPhone will be deleted. I get tired of having to refill all my songs everytime I want to add something new from my iTunes. Why does it do that and is there a way I can disable it or something?
  • When you restore an iphone from itunes backup does it restore messages? I need to restore my iPhone 4S in iTunes, will I lose my messages or will it leave the messages from my most recent back up?
  • How to restore and accidentally erased Iphone? Was trying to download music on an iphone 5c that had never previously been plugged into the computer. It needed new software so after downloading it I tried to sync the phone. It somehow replaced all the data on the phone with the data of a different device. How do we get the phone back to how it was before without restoring it to factory settings?