\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{computer10} \pdfinfo{ /Title (mongodb.pdf) /Creator (Cheatography) /Author (computer10) /Subject (MongoDB Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{CC87C3} \definecolor{LightBackground}{HTML}{F8F0F7} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{MongoDB Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{computer10} via \textcolor{DarkBackground}{\uline{cheatography.com/198056/cs/41859/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}computer10 \\ \uline{cheatography.com/computer10} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 28th December, 2023.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Add/Edit/Delete Schema}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{SQL Command}} & {\bf{MongoDB Command}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} CREATE DATABASE dbName & use {[}dbName{]} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} CREATE TABLE tableName (column1 datatype, column2 datatype, ...) & \seqsplit{db.createCollection("tableName")} \tn % Row Count 7 (+ 4) % Row 3 \SetRowColor{white} CREATE TABLE tableName (column1 datatype, column2 datatype, ...) & db.testTable.insert(\{ column1Value, column2Value, ... \}) \tn % Row Count 11 (+ 4) % Row 4 \SetRowColor{LightBackground} CREATE INDEX idx\_test ON tableName (column) & db.testTable.ensureIndex(\{ column: 1 \}) \tn % Row Count 14 (+ 3) % Row 5 \SetRowColor{white} DROP TABLE tableName & db.testTable.drop() \tn % Row Count 15 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{CRUD}} \tn % Row 0 \SetRowColor{LightBackground} \{\{width=30\}\}{\bf{Insert Methods}} & {\bf{Description}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{`db.collection.insertOne(document)`} & Inserts a single document into the collection. \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} `db.collection.insertMany({[}\{\}, \{\}, \{\}{]})` & Inserts multiple documents into a collection (requires square brackets). \tn % Row Count 9 (+ 4) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{{\bf{Read Methods}}} \tn % Row Count 10 (+ 1) % Row 4 \SetRowColor{LightBackground} \seqsplit{`db.collection.find(filter}, options)` & Finds all documents matching the specified filter. \tn % Row Count 13 (+ 3) % Row 5 \SetRowColor{white} \seqsplit{`db.collection.findOne(filter}, options)` & Finds the first document matching the specified filter. \tn % Row Count 16 (+ 3) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Update Methods}}} \tn % Row Count 17 (+ 1) % Row 7 \SetRowColor{white} \seqsplit{`db.collection.updateOne(filter}, options)` & Updates at most a single document that matches a specified filter. \tn % Row Count 21 (+ 4) % Row 8 \SetRowColor{LightBackground} \seqsplit{`db.collection.updateMany(filter}, options)` & Updates all documents that match a specified filter. \tn % Row Count 24 (+ 3) % Row 9 \SetRowColor{white} \seqsplit{`db.collection.replaceOne(filter}, options)` & Replaces at most a single document that matches a specified filter. \tn % Row Count 28 (+ 4) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Delete Methods}}} \tn % Row Count 29 (+ 1) % Row 11 \SetRowColor{white} \seqsplit{`db.collection.deleteOne(filter}, options)` & Deletes at most a single document that matches a specified filter. \tn % Row Count 33 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{CRUD (cont)}} \tn % Row 12 \SetRowColor{LightBackground} \seqsplit{`db.collection.deleteMany(filter}, options)` & Deletes all documents that match a specified filter. \tn % Row Count 3 (+ 3) % Row 13 \SetRowColor{white} \seqsplit{`db.collection.remove(filter}, options)` & Deletes a single document or all documents that match a specified filter \tn % Row Count 7 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{CRUD}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Data types}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{JPA Annotations: SQL vs MongoDB}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{SQL (JPA)}} & {\bf{MongoDB (Spring Data MongoDB)}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} `@Entity` & `@Document` \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} `@Table(name = "nome\_tabella")` & \seqsplit{`@Document(collection} = \seqsplit{"nome\_collezione")`} \tn % Row Count 6 (+ 3) % Row 3 \SetRowColor{white} `@Id` & `@Id` \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} `@Column(name = "nome\_colonna")` & \seqsplit{`@Field("nome\_campo")`} \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{`@GeneratedValue(strategy} = \seqsplit{GenerationType.IDENTITY)`} & `@Field(targetType = \seqsplit{FieldType.OBJECT\_ID)`} \tn % Row Count 12 (+ 3) % Row 6 \SetRowColor{LightBackground} `@ManyToOne` (relazioni tra tabelle) & `@DBRef` \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} `@OneToMany` (relazioni tra tabelle) & `@DBRef` \tn % Row Count 16 (+ 2) % Row 8 \SetRowColor{LightBackground} @JoinColumn(name = \seqsplit{"nome\_colonna\_esterna")``} & - (le relazioni sono gestite automaticamente da MongoDB) \tn % Row Count 19 (+ 3) % Row 9 \SetRowColor{white} `CrudRepository` & `MongoRepository` \tn % Row Count 20 (+ 1) % Row 10 \SetRowColor{LightBackground} `JpaRepository` & `MongoRepository` \tn % Row Count 21 (+ 1) % Row 11 \SetRowColor{white} `EntityManager` & `MongoTemplate` \tn % Row Count 22 (+ 1) % Row 12 \SetRowColor{LightBackground} `@Query("SELECT ...")` & `@Query("\{ 'campo': 'valore' \}")` \tn % Row Count 24 (+ 2) % Row 13 \SetRowColor{white} `@NamedQueries` & - (query specifiche possono essere scritte come stringhe) \tn % Row Count 27 (+ 3) % Row 14 \SetRowColor{LightBackground} Transazioni (es. `@Transactional`) & Transazioni (gestite automaticamente da MongoDB) \tn % Row Count 30 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.84149 cm} x{3.13551 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{RDB Concepts to NO SQL}} \tn % Row 0 \SetRowColor{LightBackground} \{\{width=50\}\} {\bf{RDBMS}} & {\bf{MongoDB}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Database & Database \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} Table, View & Collection \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} Row & Document (BSON) \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} Column & Field \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} Index & Index \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} Table joins & \$lookup, embedded documents \tn % Row Count 9 (+ 2) % Row 7 \SetRowColor{white} Primary key & Primary key (In MongoDB, the primary key is automatically set to the \_id field.) \tn % Row Count 13 (+ 4) % Row 8 \SetRowColor{LightBackground} Foreign Key & Reference \tn % Row Count 14 (+ 1) % Row 9 \SetRowColor{white} Partition & Shard \tn % Row Count 15 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.54287 cm} x{3.43413 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Basic Commands MongoDB}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Name}} & {\bf{Description}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} `db` & Show the name of the current database \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} `mongod` & Start the database \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} `mongo` & Connect to the database/Start the mongo shell \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} `show dbs` & Show databases \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} `use db` & Switch to a specific database \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} `show \seqsplit{collections`} & Display current database collections \tn % Row Count 11 (+ 2) % Row 7 \SetRowColor{white} `help` & Get help \tn % Row Count 12 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.84609 cm} x{4.13091 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Comparison Query Operators}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Name}} & {\bf{Description}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} `\$eq` & Matches values that are equal to a specified value. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} `\$gt` & Matches values that are greater than a specified value. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{`\$gte`} & Matches values that are greater than or equal to a specified value. \tn % Row Count 9 (+ 3) % Row 4 \SetRowColor{LightBackground} `\$in` & Matches any of the values specified in an array. \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} `\$lt` & Matches values that are less than a specified value. \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{`\$lte`} & Matches values that are less than or equal to a specified value. \tn % Row Count 15 (+ 2) % Row 7 \SetRowColor{white} `\$ne` & Matches all values that are not equal to a specified value. \tn % Row Count 17 (+ 2) % Row 8 \SetRowColor{LightBackground} \seqsplit{`\$nin`} & Matches none of the values specified in an array. \tn % Row Count 19 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.84609 cm} x{4.13091 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Logical Query Operators}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Name}} & {\bf{Description}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{`\$and`} & Joins query clauses with a logical AND and returns all documents that match the conditions of both clauses. \tn % Row Count 6 (+ 4) % Row 2 \SetRowColor{LightBackground} \seqsplit{`\$not`} & Inverts the effect of a query expression and returns documents that do not match the query expression. \tn % Row Count 10 (+ 4) % Row 3 \SetRowColor{white} \seqsplit{`\$nor `} & Joins query clauses with a logical NOR and returns all documents that fail to match both clauses. \tn % Row Count 13 (+ 3) % Row 4 \SetRowColor{LightBackground} `\$or` & Joins query clauses with a logical OR and returns all documents that match the conditions of either clause. \tn % Row Count 17 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.89586 cm} x{4.08114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Element Query Operators}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Name}} & {\bf{Description}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{`\$exists`} & Matches documents that have the specified field. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{`\$type`} & Selects documents if a field is of the specified type. For example, \{field: \{\$type: "string"\}\} will return documents where the field is of type string. This operator is useful for filtering documents based on the data type of a particular field. \tn % Row Count 12 (+ 8) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.8354 cm} p{0.71009 cm} x{1.33664 cm} x{1.29487 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{BSON Types}} \tn % Row 0 \SetRowColor{LightBackground} \{\{width=10\}\} {\bf{Type}} & \{\{width=2\}\} {\bf{Number}} & \{\{width=25\}\} {\bf{Alias}} & \{\{width=30\}\} {\bf{Notes}} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} Double & 1 & "double" & Represents a \seqsplit{double-precision} \seqsplit{floating-point} number (64 bits). \tn % Row Count 10 (+ 6) % Row 2 \SetRowColor{LightBackground} String & 2 & "string" & Represents a UTF-8 string. \tn % Row Count 13 (+ 3) % Row 3 \SetRowColor{white} Object & 3 & "object" & Represents a nested BSON document. \tn % Row Count 16 (+ 3) % Row 4 \SetRowColor{LightBackground} Array & 4 & "array" & Represents an ordered list of values. \tn % Row Count 20 (+ 4) % Row 5 \SetRowColor{white} Binary data & 5 & "binData" & Represents binary data. \tn % Row Count 22 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{Undefined} & 6 & "undefined" \seqsplit{(Deprecated)} & Deprecated and no longer used. \tn % Row Count 25 (+ 3) % Row 7 \SetRowColor{white} \seqsplit{ObjectId} & 7 & "objectId" & Represents a 12-byte identifier typically employed as a unique identifier for documents. \tn % Row Count 33 (+ 8) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{0.8354 cm} p{0.71009 cm} x{1.33664 cm} x{1.29487 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{BSON Types (cont)}} \tn % Row 8 \SetRowColor{LightBackground} Boolean & 8 & "bool" & Represents a boolean value (true or false). \tn % Row Count 4 (+ 4) % Row 9 \SetRowColor{white} Date & 9 & "date" & Represents a 64-bit integer timestamp, indicating a specific moment in time. \tn % Row Count 11 (+ 7) % Row 10 \SetRowColor{LightBackground} Null & 10 & "null" & Represents a null value. \tn % Row Count 13 (+ 2) % Row 11 \SetRowColor{white} Regular \seqsplit{Expression} & 11 & "regex" & Represents a regular expression. \tn % Row Count 16 (+ 3) % Row 12 \SetRowColor{LightBackground} \seqsplit{DBPointer} & 12 & "dbPointer" \seqsplit{(Deprecated)} & Deprecated and no longer used. \tn % Row Count 19 (+ 3) % Row 13 \SetRowColor{white} \seqsplit{JavaScript} & 13 & \seqsplit{"javascript"} & Represents JavaScript code. \tn % Row Count 22 (+ 3) % Row 14 \SetRowColor{LightBackground} Symbol & 14 & "symbol" \seqsplit{(Deprecated)} & Deprecated and no longer used. \tn % Row Count 25 (+ 3) % Row 15 \SetRowColor{white} \seqsplit{JavaScript} code with scope & 15 & \seqsplit{"javascriptWithScope"} (Deprecated in MongoDB 4.4) & Deprecated and no longer used in MongoDB 4.4 onwards. \tn % Row Count 30 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{0.8354 cm} p{0.71009 cm} x{1.33664 cm} x{1.29487 cm} } \SetRowColor{DarkBackground} \mymulticolumn{4}{x{5.377cm}}{\bf\textcolor{white}{BSON Types (cont)}} \tn % Row 16 \SetRowColor{LightBackground} 32-bit integer & 16 & "int" & Represents a 32-bit integer. \tn % Row Count 3 (+ 3) % Row 17 \SetRowColor{white} \seqsplit{Timestamp} & 17 & "timestamp" & Represents a timestamp, typically used for insertion operations. \tn % Row Count 9 (+ 6) % Row 18 \SetRowColor{LightBackground} 64-bit integer & 18 & "long" & Represents a 64-bit integer. \tn % Row Count 12 (+ 3) % Row 19 \SetRowColor{white} Decimal 128 & 19 & "decimal" & Represents a 128-bit decimal value. \tn % Row Count 15 (+ 3) % Row 20 \SetRowColor{LightBackground} Min key & -1 & "minKey" & Represents the smallest BSON element value. \tn % Row Count 19 (+ 4) % Row 21 \SetRowColor{white} Max key & 127 & "maxKey" & Represents the largest BSON element value. \tn % Row Count 23 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}----} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}