What is the best design for storing courses subscription data? Building an app that will manage lessons, students, courses. Each lesson belongs to a certain course. A student can subscribe to a single lesson or to a whole course.
So it seems straightforward that I need these tables(only essential columns):

Students
--------
Id[PK]

Lessons
-------
Id[PK]
CourseId[FK, NOT NULL]

Courses
-----------
Id[PK]


But how should I store subscriptions? Should I store them in one table that has two columns LessonId and CourseId only one of which will be populated for each subscription, or should I create two similar tables managing lessons and courses individually?

Subscriptions
-------------
Id[PK]
StudentId[FK, NOT NULL]
LessonId[FK, NULL]
CourseId[FK, NULL]


vs

CourseSubscriptions
-------------------
Id[PK]
StudentId[FK, NOT NULL]
CourseId[FK, NOT NULL]

LessonSubscriptions
-------------------
Id[PK]
StudentId[FK, NOT NULL]
LessonId[FK, NOT NULL]


Or may be you can advise another more suitable approach?

Additional info


Table(s) of subscriptions can be thought of as an intent of some person(student) to participate in a specific lesson(since he has an interest in subject) or in whole bunch of lessons that are grouped under the hood of a course.
A student can subscribe to as many lessons and courses as he likes, I think that each subscription should have a record of its own, so in case of a shared table there wont be any data overlapping.
Both are OK designs, so now the problem is deciding between the two.  Here are some things that I think you should consider as you decide which one is best.


How similar are the non-essential columns in the Course Subscription and Lesson Subscription tables?  If they are very similar then records which contain only a course subscription in the Subscriptions table would not have a bunch of null columns to skip which apply only to lesson subscriptions and vice versa.  The more similar the columns are, the more you should lean towards using the Subscriptions design.
Can a student subscribe to both a course and a lesson at the same time? If the student does that, will the data for any shared columns between a course and lesson be different?  If the data is different, then you'll definitely need the CourseSubscriptions and LessonSubscriptions tables.  Otherwise, you should be fine with just a Subscriptions table.


Finally, if you go with one table... Think through how your output would handle a combined course and lesson subscription.  Is that two subscriptions or one?  Conversely, if you go with two tables and one action results in two entries, is that one or two?