I have a set of AIS data in a single table. The data is based on a ships position, as in latitude and longitude together with a lot of static information such as an identifier, length, width, name and such But to increase efficiency and decrease redundancy I need to split this table into multiple (5) tables (in form of a star schema).
My question is what is the best strategy to go on about this? My ideas are:
- Remove the FK constraints and insert the distinct information into the dimension tables and then later look at how to populate the fact table to connect the dimension tables.
- Write a giant SQL query
- Write a script / program that might be able to handle this
Example of the data with limited columns:

The schema of the database shows the star schema on the left and the raw data on the right.
