Hi everyone, I’m new to mongodb and I’m trying to upload a big CSV file stored fictitious call records.
The some fields of this CSV file are:
ID FULL_NAME CALLING_NBR CALLED_NBR START_DATE CITY ADDRESS STATE CELL_SITE
I want to create 2 collection in the database: City and Person
The relationships are:
- Embedded for documents about City
- Linked for documents for Person
Precisely, I want a document like this inside the City collection:
{
city
state
cell_site
calls : [
{ id
calling_nbr
called_nbr
start_date
address
},
{...},
]
}
Where attribute city is the index of the document.
And a document for Person collection like:
{
full_name
phone_number
}
Where the phone_number is the index of the document.
How can I do that ?
Thank you!