mysql - Datasets with different information - single table or 1 per set? -
i'm in group other classmates designing software allow user upload historical data area, , filter data based on other column information. column information can different per set of data. example, have large csv containing information people living in philadelphia late 1700's, including columns like:
occupation, widow, african, address, comments
addresses common attribute across sets.
i thought should create new table each dataset, since can't know future columns or how many there be. can upload file tomorrow information chicken farmers, , columns like
had chickens brown eggs, wheat, address, apples
i know i've taught myself, i've since been told other classmates new tables per set dirty in philosophical sense. competing design single table multiple generic "attribute" columns, kept separated-by-set meta information/another table describing attributes.
i'm having difficulty seeing downsides making new table each set, i'm not confident enough in street-education of mysql drive strong case it-- particularly if there's better way doing it. i've been told it's anti-database (not in terms though -- teammates awesome , want understand.)
it seems using separate table let pick specific datatype (varchar
, datetime
, etc) , keep queries restricted relevant data before running actual statement. plus, alternative solution need new generic columns if dataset many columns, if previous/future sets never need again. understand (in part) reasoning , think work -- i'm having trouble seeing benefit seemingly more work.
is there "correct" way of doing this?
edit: filtering used plot points on map using google's maps api. code geocoding addresses done part.
are going query fields different dataset dataset or display information? if display, put information in 1 field. if need query bad idea. use eav table in case, might wonder if relational database best choice information (other addres stuff). investigate no sql database this. or table each kind of information , join them. in case though, i'm not sure effective becasue have many of them , not know 1 sto join 1 query.
Comments
Post a Comment