I'm thinking one question, and always happened in our daily development life. For example, i have a table1 with 20 columns, and table2 with 30 columns, table 3 with 40 columns.but for table 1,2,3 , they has common 10 columns.
A few examples might put this in context.
A pet store has data about dogs, cats, goldfish, etc. All pets have a name, a price, a date obtained, etc. But each kind of pet has attributes that the other kind doesn't have.
A database about vehicles has data about autos, trucks (lorries), and motorcycles. They all have a Vehicle Identification Number, A registration number, and a year of manufacture. But they each have their own attributes as well.
A database about customers has data about companies that are customers, and individual persons that are customers. They both have phone numbers, but they have different attributes as well.
So what's the resonable design for the DB structure.
A : create 3 tables with 20,30,40 columns? B : create 3 table with 10,20,30 columns and another table with the 10 common columns?If i search one record, i need to join the common info from the common table
So how can I analysis this performance question? Don't know about the sql working principle, will do some investigation works for that. Anyone can share your ideas about the design and the different performance