Maybe it´s true, but nobody knows it exactly. I know that the director James Cameron used Jack and Rose in the movie, because so the person who watch this film can tagging himself with Jack and Rose.
No, it's not based on a true story. The sinking of Titanic, that really happened. Some characters were real, and were on board the Titanic. Like Molly, Andrews, Captain Smith, Ismay, and more I'm sure. However, the characters Jack and Rose are fictional.