how to create a collection in mongodb and specify the data type for the fields
I am new to nosql i want to create a collection in mongodb .When i saw the tutorials all are teaching about inserting. i am wondering whether we could create a collection with specific data type. example when we create a table in sql we will give the specific data type for that so can we create a collection like that in nosql?
example (SQL)
create table test(
id primary key auto increment,
date_en date
number int);
please help me with this
Thank you,