Personal View/Database for users

Multi tool use
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!
c# asp.net database view asp.net-mvc-5
add a comment |
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!
c# asp.net database view asp.net-mvc-5
add a comment |
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!
c# asp.net database view asp.net-mvc-5
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
c# asp.net database view asp.net-mvc-5
asked Nov 10 at 17:07


Kevin Kurz
32
32
add a comment |
add a comment |
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
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
add a comment |
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
iDDUn o58 Z5p HDUbhUI ch4CLIzvBPPdbuq6L46lZ,Rlx xP,0ytn3t vRBtbo2kiXyT