Collection
A collection is a data structure or abstraction that groups multiple elements for storage, access, traversal, or processing.
Kotlin in Action, 2E
A collection is a container or aggregate that holds multiple elements and supports operations such as membership testing.
- How it is used
- Uses collections as the main domain for concise Kotlin functions and lambda-based data operations.
- How deep it goes
- Explains creation, operations, mutability contracts, Java correspondence, and lazy sequences without detailing implementation internals.
- Examples
- Demonstrates lists, sets, maps, indexed access, map iteration, and copying from a read-only source into a mutable target.
- What you can do after
- Apply it via Kotlin standard-library functions to create, transform, aggregate, inspect, and safely pass collections.
MongoDB 8.0 in Action, Third Edition
A collection is MongoDB's logical container for related documents.
- How it is used
- Organizes BSON documents within a database and provides the unit for collection options and sharding.
- How deep it goes
- Explains creation, inspection, naming, namespaces, and specialized options with shell commands; does not detail collection storage internals.
- Examples
- Uses sample_mflix collection listings, a namespace lookup, and a db.createCollection() time-series command.
- What you can do after
- Operate/configure collections in mongosh by listing them, inspecting their options, and choosing automatic or explicit creation.
Read how MongoDB 8.0 in Action, Third Edition explains collection →
100 Java Mistakes and How to Avoid Them
A collection is an object representing a group of elements managed through Java's collection abstractions.
- How it is used
- Frames collections as Java abstractions whose lookup, null, mutation, and iteration behavior can produce subtle bugs.
- How deep it goes
- Explains concrete failure modes and prevention rules, while deferring complete mutability classification and complex static analysis.
- Examples
- Uses a List passed to generic varargs, null searches after Set.of() migration, and a sanitizer returning emptyList().
- What you can do after
- Diagnose/debug collection bugs involving silent misses, null queries, equality, and unexpected unsupported mutations.
Read how 100 Java Mistakes and How to Avoid Them explains collection →
AI-Powered Search
A collection is a logical search-engine unit that contains a schema and configuration and holds indexed documents for searching and retrieval.
- How it is used
- Provides the schema-and-configuration unit for indexing documents and searching, ranking, and retrieving results.
- How deep it goes
- Defines the unit and works through creation, indexing, and searches, with a specialized Solr configuration example.
- Examples
- Uses a three-document BM25 test, linked outdoor questions and answers, and an entities lookup for query parsing.
- What you can do after
- Operate/configure it by creating a collection, loading documents, and searching selected fields or extracting query entities.
ScyllaDB in Action
A collection type is a ScyllaDB data type that stores multiple related values, such as set elements or map key-value pairs, in a single column value.
- How it is used
- Selects column types for aggregating small related values in a query-first ScyllaDB schema.
- How deep it goes
- Defines LIST, SET, and MAP, then demonstrates declarations and update operations; defers large or unbounded data to separate tables.
- Examples
- Uses a collections table, unique text sets, editable text maps, and an article image gallery modeled as SET<FROZEN<image>>.
- What you can do after
- Apply it via CQL by choosing, declaring, and updating LIST, SET, or MAP columns for bounded related data.
Clojure: The Essential Reference
A Java collection is an object from Java's collection abstractions that stores or organizes multiple values.
- How it is used
- Enables Clojure collection-processing functions to work with supported Java collections and other container types.
- How deep it goes
- Explains `count` and `set` contracts and selected performance differences, without detailing Java collection interfaces.
- Examples
- Uses vector counting, duplicate removal with `set`, and command-line argument checking; provides no concrete Java collection example.
- What you can do after
- Apply it via Clojure’s `count` and `set` to inspect or transform supported collections, including common Java iterable inputs.
Read how Clojure: The Essential Reference explains collection →
The Well-Grounded Rubyist, Fourth Edition
A collection is an object that groups multiple elements and supports operations for examining or traversing those elements.
- How it is used
- Organizes objects for searching, sorting, filtering, traversal, and transformation across Ruby’s core data structures.
- How deep it goes
- Explains major classes, each-based iteration, Enumerable’s contract, filtering results, and Enumerator laziness without exhaustive API coverage.
- Examples
- Uses array traversal, a custom each implementation, conference payment filtering, numeric selection, and lazy slice-map chains.
- What you can do after
- Apply it via each, Enumerable methods, and Enumerator chains to traverse, select, transform, and process grouped objects.
Read how The Well-Grounded Rubyist, Fourth Edition explains collection →
Building Web APIs with ASP.NET Core
A document-database collection is a grouping of related documents that can contain records with flexible schemas.
- How it is used
- Organizes related board-game records and their associated information in a document-oriented database.
- How deep it goes
- Defines collections through storage-model comparison and embedded relationships, without detailing database commands or implementation code.
- Examples
- Uses users, roles, board games, and comments to contrast embedded documents with separately referenced records.
- What you can do after
- Evaluate whether related records fit an embedded collection design or require key-based references across documents.
Read how Building Web APIs with ASP.NET Core explains collection →
AI Agents and Applications
A collection is a Chroma container for documents, embeddings, metadata, and identifiers.
- How it is used
- Uses collections to ingest chunked content and retrieve semantically related documents for RAG-style questions.
- How deep it goes
- Explains creation, ingestion, embeddings, metadata, identifiers, querying, chunk granularity, and persistence, but not storage internals.
- Examples
- Demonstrates Paestum tourism chunks, Cornwall HTML chunks, granular and coarse collections, and multiple UK destination collections.
- What you can do after
- Build it from scratch with Chroma or LangChain, populate it with chunked documents, and run similarity queries against the stored content.
Microsoft Azure in Action
A MongoDB collection is a container that groups related documents for storage and querying.
- How it is used
- Organizes related documents inside a Cosmos DB database and supports scalable storage and querying.
- How deep it goes
- Explains creation, shard keys, partitions, throughput, and key-selection trade-offs without detailing MongoDB query syntax.
- Examples
- Uses an Azure CLI collection command and an Alpaca-Ma-Bags product catalog partitioned by category.
- What you can do after
- Operate collections via Azure CLI by selecting a partition key and configuring request-unit throughput.
Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform
A MongoDB collection is a group of related documents within a database.
- How it is used
- Uses collections to store application records and supply test data for a video-streaming microservice.
- How deep it goes
- Explains creation, document insertion, driver access, and fixture loading without detailing collection internals.
- Examples
- Demonstrates a videos collection containing video metadata and fixtures written as JSON or JavaScript.
- What you can do after
- Operate collections by creating them, inserting records with Studio 3T, and accessing them through the MongoDB Node.js driver.
The Quick Python Book, Fourth Edition
A collection is a MongoDB container that groups documents within a database.
- How it is used
- Groups MongoDB documents for Python applications that need scalable, distributed storage and flexible schemas.
- How deep it goes
- Explains selection, lazy creation, CRUD operations, generated identifiers, and dropping collections, but not indexing or schema design.
- Examples
- Uses a PyMongo `docs` collection containing Jane’s profile, then demonstrates querying, updating, replacing, deleting, and dropping it.
- What you can do after
- Apply it via PyMongo to create, query, modify, replace, delete, and drop MongoDB collections and their documents.
Read how The Quick Python Book, Fourth Edition explains collection →
F# in Action: A Revised Edition of Get Programming with F#
A collection is a data structure or abstraction that groups multiple elements for traversal and processing.
- How it is used
- Processes application data through traversal, transformation, aggregation, and composable pipelines.
- How deep it goes
- Explains collection categories, pipeline patterns, aggregation inputs, and safe searches without detailing collection implementation internals.
- Examples
- Uses customer orders, customer debt, shopping baskets, optional values, searches, database results, web services, and event streams.
- What you can do after
- Apply F# collection modules, pipelines, folds, sequences, and safe option-returning operations to process data.
Read how F# in Action: A Revised Edition of Get Programming with F# explains collection →
Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS
A collection is a container that groups multiple values as a single data object.
- How it is used
- Groups related PowerShell values or objects so commands can inspect, test, or process them together.
- How deep it goes
- Defines collections, demonstrates storage and implicit property enumeration, then briefly applies membership tests and iteration.
- Examples
- Uses computer-name strings, process objects, text files, membership tests, and a number array from one through ten.
- What you can do after
- Apply it via PowerShell by creating collections, reading shared properties, testing membership, and iterating through items.
Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools
A collection is a group of objects treated as a single set of values for operations such as membership testing.
- How it is used
- Supports membership tests and iteration over arrays or other groups of objects in PowerShell scripts.
- How deep it goes
- Explains arrays, membership operators, enumeration, and naming practice through runnable examples, without covering collection internals.
- Examples
- Uses server lists, names read from a file, numeric ranges, and service objects.
- What you can do after
- Apply it via PowerShell to test membership and process each object in turn.
Data Pipelines with Apache Airflow, Second Edition
A collection is a named group of related objects with defined properties and vectorization settings in Weaviate.
- How it is used
- Configures the vector-database target that a recipe-ingestion pipeline checks before storing embedded content.
- How deep it goes
- Explains naming, properties, data types, vectorizers, existence checks, and schema replacement, but not Weaviate internals.
- Examples
- Uses a recipes collection with UUID identifiers, recipe text, content chunks, and a DockerOperator creation task.
- What you can do after
- Operate/configure a Weaviate collection for recipe ingestion with typed properties, vectorization settings, and repeatable creation checks.
Read how Data Pipelines with Apache Airflow, Second Edition explains collection →
Related concepts
- Mapincludes · A map is an associative data structure that stores key-value pairs and supports retrieving values by key.
- arrayincludes · An array is an indexed, ordered collection of elements arranged in one or more dimensions, with elements accessed by position.
- listincludes · A list is an ordered collection of elements arranged in a sequence.
- setincludes · A set is a collection of unique elements in which membership is determined by whether an element is present, not by duplicate occurrences.
- databasepart of · A database is an organized collection of persistent data managed by software for storage, retrieval, querying, and modification.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.















