I'm currently planning the database structure of a used car's advertisements site. Each advert contains information about a vehicle, and a vehicle can be advertised multiple times over its lifespan (granted, quite unlikely). I'm unsure which approach to take - a single table, or two separate relational tables, each has their pros and cons.Schema 1Adverts Table:-------------------id            intmake          varchar(255),model         varchar(255),year          int,transmission  varchar(255),fuel_type     varchar(255),body_type     varchar(255),engine_size   int,colour        varchar(255),doors         int,location      varchar(255),price         int,owners        int,mileage       int,description   longtextSchema 2Adverts Table-------------------id            intlocation      varchar(255),price         int,owners        int,mileage       int,description   longtextvehicle_id    intVehicles Table-------------------id            intmake          varchar(255),model         varchar(255),year          int,transmission  varchar(255),fuel_type     varchar(255),body_type     varchar(255),engine_size   int,colour        varchar(255),doors         intPersonally, I'm thinking taking the second approach will benefit in the future, but it's proving tricky to work with. I'm using Laravel, a PHP framework. Because most of the search options are applied to the vehicle (parent), rather than the advert (child), a lot more code is required, which is starting to seem counter-intuitive. Schema 1 is far simpler to work.Am I missing any extensive benefits of going with schema 2? In a nutshell, the first approach requires much less code, but isn't relational. The second approach is relational, but it's requiring far more code (and time), reducing the brevity of my adverts controller in particular, which is actually querying the vehicle's attributes more than the advert's. It's also making sorting quite tricky, as user's can sort by make, model, location, price, etc - attributes which jump between model.
Planning relational database - one or two tables?
php;relational database