Simple membership database and UI table design [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












I'm a bit unsure of the best way to tackle one requirement that I have on my project. I have one pretty straightforward task: I need to create database schema for members and their subscription status for months in selected year.



I need to keep this simple as possible, because this is very simple admin app, where admin will manually mark paid status for each member when they pay, so there is no need for anything special or advanced here. On UI it should look like this:



enter image description here



Every year, members can pay membership for every month in that year.



Note: x means member paid membership for that month.



From database standpoint I'm thinking and trying to decide about something like this:



Note: membership and another_membership are tables that I'm considering using; I will chose one of them, based on suggestions.



enter image description here



The idea behind this is pretty simple: every time a member pays, membership/another_membership table will be updated with date and member id, and in that way I will have all payments for every member.



Because of UI from first picture I have a few questions that I'm not really sure what is best approach.



In order to generate bootstrap table from first image, I'm thinking something like this: for example, if I want to get all memberships for year 2018 from certain selection I will do something like:



Select * from member m
left join membership ms
on m.id = ms.member_id
where date >= 01-01-2018
and date <= 01-31-2018
and m.selection_id = 1


But I'm still unsure what is best way to map members each month status. I'm thinking maybe to group all dates from membership table and then somehow to generate this table.



Anyone have any suggestions on this? Should I use membership table or another_membership table? Should I do mapping (members and months statuses) on UI or API side? Any other suggestion, someone gave me advice that maybe it would be "good" idea to create table with member_id, year, and all 12 months as attributes and just store true/false for each month there? something like this:



enter image description here







share|improve this question













closed as off-topic by Sam Onela, Stephen Rauch, hjpotter92, Toby Speight, Malachi♦ May 30 at 18:30


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Sam Onela, Stephen Rauch, hjpotter92, Toby Speight, Malachi
If this question can be reworded to fit the rules in the help center, please edit the question.


















    up vote
    1
    down vote

    favorite












    I'm a bit unsure of the best way to tackle one requirement that I have on my project. I have one pretty straightforward task: I need to create database schema for members and their subscription status for months in selected year.



    I need to keep this simple as possible, because this is very simple admin app, where admin will manually mark paid status for each member when they pay, so there is no need for anything special or advanced here. On UI it should look like this:



    enter image description here



    Every year, members can pay membership for every month in that year.



    Note: x means member paid membership for that month.



    From database standpoint I'm thinking and trying to decide about something like this:



    Note: membership and another_membership are tables that I'm considering using; I will chose one of them, based on suggestions.



    enter image description here



    The idea behind this is pretty simple: every time a member pays, membership/another_membership table will be updated with date and member id, and in that way I will have all payments for every member.



    Because of UI from first picture I have a few questions that I'm not really sure what is best approach.



    In order to generate bootstrap table from first image, I'm thinking something like this: for example, if I want to get all memberships for year 2018 from certain selection I will do something like:



    Select * from member m
    left join membership ms
    on m.id = ms.member_id
    where date >= 01-01-2018
    and date <= 01-31-2018
    and m.selection_id = 1


    But I'm still unsure what is best way to map members each month status. I'm thinking maybe to group all dates from membership table and then somehow to generate this table.



    Anyone have any suggestions on this? Should I use membership table or another_membership table? Should I do mapping (members and months statuses) on UI or API side? Any other suggestion, someone gave me advice that maybe it would be "good" idea to create table with member_id, year, and all 12 months as attributes and just store true/false for each month there? something like this:



    enter image description here







    share|improve this question













    closed as off-topic by Sam Onela, Stephen Rauch, hjpotter92, Toby Speight, Malachi♦ May 30 at 18:30


    This question appears to be off-topic. The users who voted to close gave this specific reason:


    • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Sam Onela, Stephen Rauch, hjpotter92, Toby Speight, Malachi
    If this question can be reworded to fit the rules in the help center, please edit the question.














      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I'm a bit unsure of the best way to tackle one requirement that I have on my project. I have one pretty straightforward task: I need to create database schema for members and their subscription status for months in selected year.



      I need to keep this simple as possible, because this is very simple admin app, where admin will manually mark paid status for each member when they pay, so there is no need for anything special or advanced here. On UI it should look like this:



      enter image description here



      Every year, members can pay membership for every month in that year.



      Note: x means member paid membership for that month.



      From database standpoint I'm thinking and trying to decide about something like this:



      Note: membership and another_membership are tables that I'm considering using; I will chose one of them, based on suggestions.



      enter image description here



      The idea behind this is pretty simple: every time a member pays, membership/another_membership table will be updated with date and member id, and in that way I will have all payments for every member.



      Because of UI from first picture I have a few questions that I'm not really sure what is best approach.



      In order to generate bootstrap table from first image, I'm thinking something like this: for example, if I want to get all memberships for year 2018 from certain selection I will do something like:



      Select * from member m
      left join membership ms
      on m.id = ms.member_id
      where date >= 01-01-2018
      and date <= 01-31-2018
      and m.selection_id = 1


      But I'm still unsure what is best way to map members each month status. I'm thinking maybe to group all dates from membership table and then somehow to generate this table.



      Anyone have any suggestions on this? Should I use membership table or another_membership table? Should I do mapping (members and months statuses) on UI or API side? Any other suggestion, someone gave me advice that maybe it would be "good" idea to create table with member_id, year, and all 12 months as attributes and just store true/false for each month there? something like this:



      enter image description here







      share|improve this question













      I'm a bit unsure of the best way to tackle one requirement that I have on my project. I have one pretty straightforward task: I need to create database schema for members and their subscription status for months in selected year.



      I need to keep this simple as possible, because this is very simple admin app, where admin will manually mark paid status for each member when they pay, so there is no need for anything special or advanced here. On UI it should look like this:



      enter image description here



      Every year, members can pay membership for every month in that year.



      Note: x means member paid membership for that month.



      From database standpoint I'm thinking and trying to decide about something like this:



      Note: membership and another_membership are tables that I'm considering using; I will chose one of them, based on suggestions.



      enter image description here



      The idea behind this is pretty simple: every time a member pays, membership/another_membership table will be updated with date and member id, and in that way I will have all payments for every member.



      Because of UI from first picture I have a few questions that I'm not really sure what is best approach.



      In order to generate bootstrap table from first image, I'm thinking something like this: for example, if I want to get all memberships for year 2018 from certain selection I will do something like:



      Select * from member m
      left join membership ms
      on m.id = ms.member_id
      where date >= 01-01-2018
      and date <= 01-31-2018
      and m.selection_id = 1


      But I'm still unsure what is best way to map members each month status. I'm thinking maybe to group all dates from membership table and then somehow to generate this table.



      Anyone have any suggestions on this? Should I use membership table or another_membership table? Should I do mapping (members and months statuses) on UI or API side? Any other suggestion, someone gave me advice that maybe it would be "good" idea to create table with member_id, year, and all 12 months as attributes and just store true/false for each month there? something like this:



      enter image description here









      share|improve this question












      share|improve this question




      share|improve this question








      edited Jun 7 at 10:00









      Billal BEGUERADJ

      1




      1









      asked May 16 at 1:50









      Super Mario's Yoshi

      1968




      1968




      closed as off-topic by Sam Onela, Stephen Rauch, hjpotter92, Toby Speight, Malachi♦ May 30 at 18:30


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Sam Onela, Stephen Rauch, hjpotter92, Toby Speight, Malachi
      If this question can be reworded to fit the rules in the help center, please edit the question.




      closed as off-topic by Sam Onela, Stephen Rauch, hjpotter92, Toby Speight, Malachi♦ May 30 at 18:30


      This question appears to be off-topic. The users who voted to close gave this specific reason:


      • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Sam Onela, Stephen Rauch, hjpotter92, Toby Speight, Malachi
      If this question can be reworded to fit the rules in the help center, please edit the question.

























          active

          oldest

          votes






















          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes

          Popular posts from this blog

          Chat program with C++ and SFML

          Function to Return a JSON Like Objects Using VBA Collections and Arrays

          Will my employers contract hold up in court?