Personal View/Database for users









up vote
-1
down vote

favorite












I´m working on a movie database with asp.net mvc5 and as a user you should be able to select movies, for a personal list of movies you have already watched. My problem is I´m new and I have no clue whats the best way to start realizing such a thing.
The main thing which I´m struggling is the thought that I have to have a own database for each user, correct? If yes how can I start here?



Thanks a lot for tips in advance!










share|improve this question

























    up vote
    -1
    down vote

    favorite












    I´m working on a movie database with asp.net mvc5 and as a user you should be able to select movies, for a personal list of movies you have already watched. My problem is I´m new and I have no clue whats the best way to start realizing such a thing.
    The main thing which I´m struggling is the thought that I have to have a own database for each user, correct? If yes how can I start here?



    Thanks a lot for tips in advance!










    share|improve this question























      up vote
      -1
      down vote

      favorite









      up vote
      -1
      down vote

      favorite











      I´m working on a movie database with asp.net mvc5 and as a user you should be able to select movies, for a personal list of movies you have already watched. My problem is I´m new and I have no clue whats the best way to start realizing such a thing.
      The main thing which I´m struggling is the thought that I have to have a own database for each user, correct? If yes how can I start here?



      Thanks a lot for tips in advance!










      share|improve this question













      I´m working on a movie database with asp.net mvc5 and as a user you should be able to select movies, for a personal list of movies you have already watched. My problem is I´m new and I have no clue whats the best way to start realizing such a thing.
      The main thing which I´m struggling is the thought that I have to have a own database for each user, correct? If yes how can I start here?



      Thanks a lot for tips in advance!







      c# asp.net database view asp.net-mvc-5






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 10 at 17:07









      Kevin Kurz

      32




      32






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          Think of database as an Excel file. You only need one Excel file (database). Rename "sheet1" to "movies" (create table in database) and write all movies on this sheet. Create another sheet and name it "users" and write all users on this sheet. Create a third sheet, name it "watched" and write in the first column user row number from the second sheet and movie row number from the first sheet.



          There you have it - a single database with three tables:




          movies (id, name)



          1 Matrix



          2 Avatar



          3 Serenity




          -




          users (id, name)



          1 Max



          2 Kevin




          -




          watched(id, userid, moovieid)



          1 1 2 //it means I watched Avatar



          2 1 3 //it means I watched Serenity



          3 2 1 //it means you watched Matrix







          share|improve this answer




















          • Vielen Dank für die Beschreibung. Das heißt ich kann das einfach als Many-to-Many anlegen. Ich habe irgendwie zu kompliziert gedacht.
            – Kevin Kurz
            Nov 13 at 20:01










          • Yes, it's actually not that hard. Once you grasp the idea you never falter again. Only one remark if I may. Relations will be not Many-to-Many but 1-to-Many since "movies" table has only unique values and "watched" table can have many instances of the same movie. Same applies to "users" table. P.S. I don't speak German but google translates it surprisingly well.
            – Max Jacobi
            Nov 14 at 16:32










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241348%2fpersonal-view-database-for-users%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          Think of database as an Excel file. You only need one Excel file (database). Rename "sheet1" to "movies" (create table in database) and write all movies on this sheet. Create another sheet and name it "users" and write all users on this sheet. Create a third sheet, name it "watched" and write in the first column user row number from the second sheet and movie row number from the first sheet.



          There you have it - a single database with three tables:




          movies (id, name)



          1 Matrix



          2 Avatar



          3 Serenity




          -




          users (id, name)



          1 Max



          2 Kevin




          -




          watched(id, userid, moovieid)



          1 1 2 //it means I watched Avatar



          2 1 3 //it means I watched Serenity



          3 2 1 //it means you watched Matrix







          share|improve this answer




















          • Vielen Dank für die Beschreibung. Das heißt ich kann das einfach als Many-to-Many anlegen. Ich habe irgendwie zu kompliziert gedacht.
            – Kevin Kurz
            Nov 13 at 20:01










          • Yes, it's actually not that hard. Once you grasp the idea you never falter again. Only one remark if I may. Relations will be not Many-to-Many but 1-to-Many since "movies" table has only unique values and "watched" table can have many instances of the same movie. Same applies to "users" table. P.S. I don't speak German but google translates it surprisingly well.
            – Max Jacobi
            Nov 14 at 16:32














          up vote
          0
          down vote



          accepted










          Think of database as an Excel file. You only need one Excel file (database). Rename "sheet1" to "movies" (create table in database) and write all movies on this sheet. Create another sheet and name it "users" and write all users on this sheet. Create a third sheet, name it "watched" and write in the first column user row number from the second sheet and movie row number from the first sheet.



          There you have it - a single database with three tables:




          movies (id, name)



          1 Matrix



          2 Avatar



          3 Serenity




          -




          users (id, name)



          1 Max



          2 Kevin




          -




          watched(id, userid, moovieid)



          1 1 2 //it means I watched Avatar



          2 1 3 //it means I watched Serenity



          3 2 1 //it means you watched Matrix







          share|improve this answer




















          • Vielen Dank für die Beschreibung. Das heißt ich kann das einfach als Many-to-Many anlegen. Ich habe irgendwie zu kompliziert gedacht.
            – Kevin Kurz
            Nov 13 at 20:01










          • Yes, it's actually not that hard. Once you grasp the idea you never falter again. Only one remark if I may. Relations will be not Many-to-Many but 1-to-Many since "movies" table has only unique values and "watched" table can have many instances of the same movie. Same applies to "users" table. P.S. I don't speak German but google translates it surprisingly well.
            – Max Jacobi
            Nov 14 at 16:32












          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          Think of database as an Excel file. You only need one Excel file (database). Rename "sheet1" to "movies" (create table in database) and write all movies on this sheet. Create another sheet and name it "users" and write all users on this sheet. Create a third sheet, name it "watched" and write in the first column user row number from the second sheet and movie row number from the first sheet.



          There you have it - a single database with three tables:




          movies (id, name)



          1 Matrix



          2 Avatar



          3 Serenity




          -




          users (id, name)



          1 Max



          2 Kevin




          -




          watched(id, userid, moovieid)



          1 1 2 //it means I watched Avatar



          2 1 3 //it means I watched Serenity



          3 2 1 //it means you watched Matrix







          share|improve this answer












          Think of database as an Excel file. You only need one Excel file (database). Rename "sheet1" to "movies" (create table in database) and write all movies on this sheet. Create another sheet and name it "users" and write all users on this sheet. Create a third sheet, name it "watched" and write in the first column user row number from the second sheet and movie row number from the first sheet.



          There you have it - a single database with three tables:




          movies (id, name)



          1 Matrix



          2 Avatar



          3 Serenity




          -




          users (id, name)



          1 Max



          2 Kevin




          -




          watched(id, userid, moovieid)



          1 1 2 //it means I watched Avatar



          2 1 3 //it means I watched Serenity



          3 2 1 //it means you watched Matrix








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 10 at 17:42









          Max Jacobi

          16




          16











          • Vielen Dank für die Beschreibung. Das heißt ich kann das einfach als Many-to-Many anlegen. Ich habe irgendwie zu kompliziert gedacht.
            – Kevin Kurz
            Nov 13 at 20:01










          • Yes, it's actually not that hard. Once you grasp the idea you never falter again. Only one remark if I may. Relations will be not Many-to-Many but 1-to-Many since "movies" table has only unique values and "watched" table can have many instances of the same movie. Same applies to "users" table. P.S. I don't speak German but google translates it surprisingly well.
            – Max Jacobi
            Nov 14 at 16:32
















          • Vielen Dank für die Beschreibung. Das heißt ich kann das einfach als Many-to-Many anlegen. Ich habe irgendwie zu kompliziert gedacht.
            – Kevin Kurz
            Nov 13 at 20:01










          • Yes, it's actually not that hard. Once you grasp the idea you never falter again. Only one remark if I may. Relations will be not Many-to-Many but 1-to-Many since "movies" table has only unique values and "watched" table can have many instances of the same movie. Same applies to "users" table. P.S. I don't speak German but google translates it surprisingly well.
            – Max Jacobi
            Nov 14 at 16:32















          Vielen Dank für die Beschreibung. Das heißt ich kann das einfach als Many-to-Many anlegen. Ich habe irgendwie zu kompliziert gedacht.
          – Kevin Kurz
          Nov 13 at 20:01




          Vielen Dank für die Beschreibung. Das heißt ich kann das einfach als Many-to-Many anlegen. Ich habe irgendwie zu kompliziert gedacht.
          – Kevin Kurz
          Nov 13 at 20:01












          Yes, it's actually not that hard. Once you grasp the idea you never falter again. Only one remark if I may. Relations will be not Many-to-Many but 1-to-Many since "movies" table has only unique values and "watched" table can have many instances of the same movie. Same applies to "users" table. P.S. I don't speak German but google translates it surprisingly well.
          – Max Jacobi
          Nov 14 at 16:32




          Yes, it's actually not that hard. Once you grasp the idea you never falter again. Only one remark if I may. Relations will be not Many-to-Many but 1-to-Many since "movies" table has only unique values and "watched" table can have many instances of the same movie. Same applies to "users" table. P.S. I don't speak German but google translates it surprisingly well.
          – Max Jacobi
          Nov 14 at 16:32

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241348%2fpersonal-view-database-for-users%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Top Tejano songwriter Luis Silva dead of heart attack at 64

          ReactJS Fetched API data displays live - need Data displayed static

          政党