Confusion regarding SparkContext and Sparksession

Hello All,
I am new to Spark programming. I have some confusions regarding SparkContext and SparkSession.
When to create a SparkSession and when not?
When to create SparkContext and when not?
Is SparkContext required only to create RDD’s?

Though I know that for Sql, streaming and hive context we use SparkSession from 2.0.

sparkcontext if you just want to use spark…
sparksession…if you want sql above saprk…with spark…
i may be wrong…correct me

Earlier the main entry point (or facade) was an (sc) object of SparkContext. Now, since spark 2, the main entry point is an object (spark) of SparkSession. The sparkContact is available at sparkSession.sparkContext.