Source Data : One to Many
Country ID | Country Name | State Code |
100 | USA | CA |
100 | USA | AZ |
100 | USA | GA |
200 | IND | TN |
200 | IND | AP |
200 | IND | DEL |
In this table 1- Many relation between Country to State . How do Data modeling.
Is it correct ? Please confirm.
create table one_to_many_dm6 (
state text,
country text,
city text,
id int,
primary key((state,city),id));
In same manner , How do many to many relationship data modeling . Kindly share the details with example . Thanks in advance.
Regards
Karthikeyan Rasipalayam Durairaj