JSON is textual format, so it is stored in standard NVARCHAR columns. NoSQL collection is equivalent to two column key value table:
CREATE TABLE ProductCollection (
Id int identity primary key,
Data nvarchar(max)
)
Use nvarchar(max)
as you are not sure what would be the size of your JSON documents. nvarchar(4000)
and varchar(8000)
have better performance but with size limit to 8KB.