--- title: "Construct NoSQL Item" url: https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/nosql/construct-item/ description: "Catalyst NoSQL is a fully-managed, powerful database that provides you with a non-relational, non-SQL means of data storage. This page describes the methods to construct a NoSQL items of various data types." last_updated: 2026-09-08T11:07:33Z service: Cloud Scale type: general related_links: - name: "NoSQL" url: /en/cloud-scale/help/nosql/introduction - name: "Basic Components" url: /en/cloud-scale/help/nosql/components/#basic-components - name: "Supported Data Types in NoSQL" url: /en/cloud-scale/help/nosql/working-with-data/introduction/ --- # Construct NoSQL Item > **Note:** This SDK is currently in deprecation. Migrate to [JavaScript SDK](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/nosql/construct-item/) now. [Catalyst NoSQL](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/introduction/) items represent a collection of attributes that hold the data of a single data point, like records. You can insert or update items into an existing NoSQL table in your project in a [Custom JSON format](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/working-with-data/introduction/#the-catalyst-custom-json-format). However, before you insert or update an item in Catalyst, you will need to construct the item. You can construct a NoSQL item of attributes containing different data types supported by Catalyst as described in the section below. Catalyst supports several data types such as String, Number, Set of Strings, Set of Numbers, List, and Map. Refer to the full list of [supported data types](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/working-with-data/introduction/#supported-data-types) to learn more. You must mandatorily provide the values for the partition key attribute that you configured for a table in every data item. Refer to the [Table Keys help section](https://docs.catalyst.zoho.com/en/cloud-scale/help/nosql/components/#table-keys) to learn about the table keys, TTL attribute, and other details. ### Create a New NoSQL Item You can create a new NoSQL item using the `NoSQLItem()` method after requiring the `no-sql` library which is a part of the `zcatalyst-sdk-node` package, as shown below. ```javascript const { NoSQLItem } = require('zcatalyst-sdk-node/lib/no-sql'); const item = new NoSQLItem() // Create a new NoSQL item ``` ### Construct a NoSQL Item of String In the example below, we construct an item that includes string values and a nested JSON attribute `color` as a Map. ```javascript const { NoSQLItem } = require('zcatalyst-sdk-node/lib/no-sql'); const item = new NoSQLItem() // Create a new NoSQL item // Add a string value .addString('fruit', 'mango') // Add a map .addMap('properties', { color: 'yellow' }); ``` ### Construct a NoSQL Byte You can create a NoSQL byte to store values of the *Binary* data type, by creating a buffer object that is used to represent a sequence of bytes. You can then create a byte in two ways as shown below: using the `ArrayBuffers` object that represents a raw binary data buffer, or from a Base64 string that represents binary data in the ASCII format. ```javascript const { NoSQLByte } = require('zcatalyst-sdk-node/lib/no-sql'); // Create a NoSQL Byte const buff = Buffer.from('Hello world !!!'); // Create a buffer object const byte = new NoSQLByte(buff); // Create a NoSQL byte using the ArrayBuffers object const byteA = new NoSQLByte(buff.toString('base64')); // Create a NoSQL byte from a Base64 string ``` ### Construct a NoSQL Byte Set Catalyst enables you to create a NoSQL byte set to store a collection of binary values of the *Set of Binary* data type, by creating a buffer object that is used to represent a sequence of bytes. You can then create a byte set by using the `ArrayBuffers` object that represents a raw binary data buffer, or from a Base64 string that represents binary data in the ASCII format. You can also create a byte set from passing constructed bytes as a byte array. ```javascript const { NoSQLByte, NoSQLByteSet } = require('zcatalyst-sdk-node/lib/no-sql'); // Create a NoSQL Byte Set const buff = Buffer.from('Hello world !!!'); // Create a buffer object const byte = new NoSQLByte(buff); // Create a NoSQL byte using the ArrayBuffers object const byteA = new NoSQLByte(buff.toString('base64')); // Create a NoSQL byte from a Base64 string const byteSet = new NoSQLByteSet([byte, byteA]); // Create a NoSQL byte set from a NoSQL byte array const byteSetA = new NoSQLByteSet([buff.toString('base64')]); // Create a NoSQL Byte set from a Base64 string array const byteSetB = new NoSQLByteSet([buff]); // Create a NoSQL Byte set using the ArrayBuffers object ``` ### Construct a NoSQL String Set You can create a NoSQL string set of the *Set of String* data type from a string array as shown below. ```javascript const { NoSQLStringSet } = require('zcatalyst-sdk-node/lib/no-sql'); // Create a NoSQL string set const stringSet = new NoSQLStringSet(['hello', 'world']); // Create a NoSQL string set from a string array ``` ### Construct a NoSQL Number Set You can create NoSQL number set of the *Set of Numbers* data type from an array of numbers or BigInt values as shown below. ```javascript const { NoSQLNumberSet } = require('zcatalyst-sdk-node/lib/no-sql'); // Create a NoSQL number set const numberSet = new NoSQLNumberSet([123, 1234n]); // Create a NoSQL Number set from an array of numbers or BigInt values ``` ### Manipulate NoSQL Items Catalyst enables you to perform manipulations on a NoSQL items, such as creating a NoSQL item from a plain JavaScript object, or vice versa. You can create a NoSQL item by constructing a plain JavaScript object that contains the item's data in it, in the standard JSON format. You can then construct the NoSQL item from the JS object using `NoSQLItem.from()` as shown in the sample code below. You can also convert a NoSQL item back into a plain JavaScript object using `itemFromObj.to()`, as depicted in the code. ```javascript const { NoSQLItem } = require('zcatalyst-sdk-node/lib/no-sql'); // Define an object const obj = { fruit: 'apple', // Partition key properties: { color: 'red' } }; const itemFromObj = NoSQLItem.from(obj); // Construct a NoSQL item from the plain JS object const plainJsObject = itemFromObj.to(); // Convert the item to a plain JS object ```