Skip to content

Commit 09aa018

Browse files
author
Sam Kleinman
committed
DOCS-1572: updating the style guide
1 parent fde32d0 commit 09aa018

File tree

1 file changed

+156
-0
lines changed

1 file changed

+156
-0
lines changed

source/meta/style-guide.txt

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ style in light of recent experiences.
3131
**2013-02-07**: Migrated this document to the manual. Added "map-reduce"
3232
terminology convention. Other edits.
3333

34+
**2013-11-15**: Added new table of preferred terms.
35+
3436
Naming Conventions
3537
------------------
3638

@@ -275,6 +277,160 @@ ReStructured Text and Typesetting
275277
Jargon and Common Terms
276278
-----------------------
277279

280+
.. list-table::
281+
:header-rows: 1
282+
:widths: 15, 15, 60
283+
284+
* - Preferred Term
285+
- Concept
286+
- Dispreferred Alternatives
287+
- Notes
288+
289+
* - :term:`document`
290+
- A single, top-level object/record in a MongoDB collection.
291+
- record, object, row
292+
- Prefer document over object because of concerns about
293+
cross-driver langauge handling of objects. Reserve record for
294+
"allocation" of storage. Avoid "row," as possible.
295+
296+
* - :term:`database`
297+
- A group of collections. Refers to a group of data files. This
298+
is the "logical" sense of the term "database."
299+
-
300+
- Avoid genericizing "database." Avoid using database to refer to
301+
a server process or a data set. This applies both to the
302+
datastoring contexts as well as other (related) operational
303+
contexts (command context, authentication/authorization
304+
context.)
305+
306+
* - instance
307+
- A daemon process. (e.g. :program:`mongos` or :program:`mongod`)
308+
- process (acceptable sometimes), node (never acceptable), server.
309+
- Avoid using instance, unless it modifies something
310+
specifically. Having a descriptor for a process/instance makes
311+
it possible to avoid needing to make mongod or mongos
312+
plural. Server and node are both vague and contextually
313+
difficult to disambiguate with regards to application servers,
314+
and underlying hardware.
315+
316+
* - :term:`field` name
317+
- The identifier of a value in a document.
318+
- key, column
319+
- Avoid introducing unrelated terms for a single field. In the
320+
documentation we've rarely had to discuss the identifier of a
321+
field, so the extra word here isn't burdensome.
322+
323+
* - :term:`field`/\ :term:`value`
324+
- The name/value pair that describes a unit of data in MongoDB.
325+
- key, slot, attribute
326+
- Use to emphasize the difference between the name of a field and
327+
its value For exdample, "_id" is the field and the default
328+
value is an ObjectId.
329+
330+
* - value
331+
- The data content of a field.
332+
- data
333+
-
334+
335+
* - MongoDB
336+
- A group of processes, or deployment that implement the MongoDB
337+
interface.
338+
- mongo, mongodb, cluster
339+
- Stylistic preference, mostly. In some cases it's useful to be
340+
able to refer generically to instances (that may be either
341+
:program:`mongod` or :program:`mongos`.)
342+
343+
* - sub-document
344+
- An embeded or nested document within a document or an array.
345+
- embeded document, nested document
346+
-
347+
348+
* - :term:`map-reduce`
349+
- An operation performed by the mapReduce command.
350+
- mapReduce, map reduce, map/reduce
351+
- Avoid confusion with the command, shell helper, and driver
352+
interfaces. Makes it possible to discuss the operation
353+
generally.
354+
355+
* - cluster
356+
- A sharded cluster.
357+
- grid, shard cluster, set, deployment
358+
- Cluster is a great word for a group of processes; however, it's
359+
important to avoid letting the term become generic. Do not use
360+
for any group of MongoDB processes or deployments.
361+
362+
* - sharded cluster
363+
- A :term:`sharded cluster`.
364+
- shard cluster, cluster, sharded system
365+
-
366+
367+
* - :term:`replica set`
368+
- A deployment of replicating :program:`mongod` programs that
369+
provide redundancy and automatic failover.
370+
- set, replication deployment
371+
-
372+
373+
* - deployment
374+
- A group of MongoDB processes, or a standalone :program:`mongod`
375+
instance.
376+
- cluster, system
377+
- Typically in the form MongoDB deployment. Includes standalones,
378+
replica sets and sharded clusters.
379+
380+
* - data set
381+
- The collection of phyisical databases provided by a MongoDB
382+
deployment.
383+
- database, data
384+
- Important to keep the distinction between the data provided by
385+
a mongod or a sharded cluster as distinct from each "database"
386+
(i.e. a logical database that refers to a group of collections
387+
stored in a single series of data files.)
388+
389+
* - :term:`primary`
390+
- The only member of a replica set that can accept writes.
391+
- master
392+
- Avoid "primary member" construction.
393+
394+
* - secondary
395+
- Read-only members of a replica set that apply operations from
396+
the primary's oplog.
397+
- slave
398+
- Accept "secondary member" as needed.
399+
400+
* - primary shard
401+
- The shard in a cluster that's "primary" for a database.
402+
- primary
403+
- Avoid ambiguity with primary in the context of replica
404+
sets.
405+
406+
* - range based sharding
407+
- Refers to sharding based on regular shard keys where the range
408+
is the value of the field(s) selected as the shard key.
409+
-
410+
-
411+
412+
* - hash based sharding
413+
- Refers to sharding based on hashed shard keys where the range
414+
is the hashed value of the field selected as the shard key.
415+
-
416+
- Even though hashed sharding is based on ranges of hashes, the
417+
sequence of hases aren't meaningful to users, and the
418+
range-based aspect of hashed shard keys is an implementation
419+
detail.
420+
421+
* - sharding
422+
- Describes the practice of horizontal scaling or partitioning as
423+
implemented in sharded clusters.
424+
- partitioning, horizontal scaling
425+
- Only use the terms "partitioning" and "horizontal scaling" to
426+
describe what sharding does, and its operation. Don't refer to
427+
sharding as "the partitioning system."
428+
429+
* - metadata
430+
- data about data
431+
- meta-data, meta data
432+
-
433+
278434
Database Systems and Processes
279435
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
280436

0 commit comments

Comments
 (0)