1

I am designing subscription based database for website. There will be 2 types of subscribers, schools and students.

Since schools and students will contain different data, I decide to create 2 different tables, named school and student.

I am now about to create the table subscription, and I am considering the following options:

Option 1: I could create table clientgroup as following:

clientgroup
=====================================
clientgroupID
clientgroupName (schools, students)

Then the table client as following:

client
=====================================
clientID
clientgroupID
clientOriginalID // The id from student or school table. 

Then the subscription table:

subscription
===================================== 
subscriptionID
paymentID
clientID
subscriptionStartsAt
subscriptionEndsAt
subscriptionIsActive
subscriptionHasExpired

and on the end the payment table:

payment
=====================================
paymentID
clientID
paymentDateTime
paymentAmount
paymentIpAddress
paymentSessionID

The other option that I am considering is to not create the tables clientgroup and client, just to crate separate tables for the subscriptions and payments for both groups, students and schools.

Which of those 2 options is better? Pros and cons for both? Any other suggestions - options?

user2417624
  • 653
  • 10
  • 32

0 Answers0