title: SQLite relationships guidance
body: <p>I'm creating my very first web application which is my final project for CS50. I'm new to programming and everything therein, so please bear with me if I use the wrong words and such.</p>
  <p>Regarding the database for the application and its relationships I wanted to ask if I'm heading in the correct direction.</p>
  <p><strong>Description so you get the picture:</strong>
  It's a web application for a game where users register and input the level (and other things) of their heroes. The application will then present various data based on that.</p>
  <p>All heroes have various base values such as attack, hp, class, etc. And every player has the same heroes, just at different levels (and with different setups).</p>
  <p>I've created the database and users table and the ability to login and such. But it's time to tie users together with their heroes and implement the feature to input the level of those heroes.
  And my question is what's the best approach for this?</p>
  <p><strong>Example:</strong> We got 2 users: John and Susan. There is only 1 hero in the game called Batman. Batman has 32 attack and 50 hp.
  John's Batman is level 3, while Susans Batman is level 7.</p>
  <p>I've figured two ways to approach it as follows:</p>
  <p><a href="https://i.stack.imgur.com/U4Wes.png" rel="nofollow noreferrer">Database Schema 1</a></p>
  <p>A users table, with a foreign key to the heroes table.
  The heroes table would hold all heroes and all their values.
  But this seems redundant, since our hero Batman's attack, hp, etc would be repeated on every row.</p>
  <p>So I figured something like this as the another option:
  <a href="https://i.stack.imgur.com/EwoGY.png" rel="nofollow noreferrer">Database Schema 2</a></p>
  <p>Here I would have all the base hero data in one table, with unique ID's. Then a table that connects the users ID and the base_hero ID to a table called heroes, where the levels are stored.
  Now I'm not looking for someone to tell me exactly how to do, but rather point me in the right direction or let me know if I'm at least on the right track.</p>
  <p>I've also considered if maybe the base data of heroes should just simply be stored in maybe a list of dictionaries in python rather than the database.</p>
  <p>I'm using SQLite3 and SQLAlchemy.</p>
  <p>Thanks a lot in advance!</p>