I have a database with millions of records in it.
the table has two attribute 1] Name 2] Location
there are many records which has different name but same location so is there any compression technique that can be applied on the location attribute?
You can suggest the various loss-less compression techniques with their supported database names.
Normalise your database. Have a
LOCATIONStable and give your first table a foreign key into it.Less than 65,535 distinct locations? That’s two bytes per record in your original table. Pretty good compression if you ask me. Also makes indexing and comparisons faster.
Data is more important than code. Get the data right first. Normalise as much as possible by default. Denormalise only after you’ve discovered a (specific, measured, and fully-attributed) performance problem or some great cause.