I'm coming from a do-it-yourself database design background, so bare with me. Let's say I want two database tables, one of car manufacturers, and one of car models. The first table, car_make, would have two fields, a primary key (car_make_id) and a string (car_make_name). The second table, car_model, would have a primary key (car_model_id) a foreign key referencing car_make (car_model_id), a string (car_model_name), and, let's say, a numeric for engine size (car_make_liters).
I just installed the drupal console to generate the boilerplate code. It looks like an Entity might be the best candidate. I can use the admin/structure space to add fields to the Entities and link them together. However, If I uninstall the module, this fields are removed. How do I create this field structure (schema?) within the module? If fields are not the best way to do this, let me know.