ArticleslgStudy

computer science

Append-only

Append-only is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Append-only rather than just read about it. In short: Append-only is a property of computer data storage such that new data can be appended to the storage, but where existing data is immutable. Access control Many file systems' Access Control Lists implement an "append-only" permission: chattr in Linux can be used to set the append-only flag to files and directories.

Key takeaways

  • Append-only belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Append-only to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Append-only from memory before moving on to harder problems.

Reference excerpt

Append-only is a property of computer data storage such that new data can be appended to the storage, but where existing data is immutable.

Access control Many file systems' Access Control Lists implement an "append-only" permission:

chattr in Linux can be used to set the append-only flag to files and directories. This corresponds to the O_APPEND flag in open(). NTFS ACL has a control for "Create Folders / Append Data", but it does not seem to keep data immutable. Many cloud storage providers provide the ability to limit access as append-only. This feature is especially important to mitigate the risk of data loss for backup policies in the event that the computer being backed-up becomes infected with ransomware capable of deleting or encrypting the computer's backups.

Data structures Many data structures and databases implement immutable objects, effectively making their data structures append-only. Implementing an append-only data structure has many benefits, such as ensuring data consistency, improving performance, and permitting rollbacks. The prototypical append-only data structure is the log file. Log-structured data structures found in Log-structured file systems and databases work in a similar way: every change (transaction) that happens to the data is logged by the program, and on retrieval the program must combine the pieces of data found in this log file. Blockchains add cryptography to the logs so that every transaction is verifiable. Append-only data structures may also be mandated by the hardware or software environment:

All objects are immutable in purely functional programming languages, where every function is pure and global states do not exist. Flash storage pages can only be written to ("programmed") once before erasing. Erasing on a flash drive works on the level of "blocks", which cover hundreds to thousands of pages, so each block is treated as an append-only set of pages. Hard drives that use shingled magnetic recording cannot be written to randomly because writing on a track would clobber a neighboring, usually later, track. As a result, each "zone" on the drive is append-only. Append-only data structures grow over time, with more and more space dedicated to "stale" data found only in the history and more time wasted on parsing these data. A number of append-only systems implement rewriting (copying garbage collection), so that a new structure is created only containing the current version and optionally a few older ones.

See also Access control list Cloud storage Comparison of file hosting services Data structure Purely functional data structure Log-structured merge-tree Certificate Transparency Write once read many

References

Worked examples

Example 1 — a first encounter with Append-only

Start with the simplest possible case. Write down what Append-only claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Append-only before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Append-only ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Append-only

In research
Append-only appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Append-only in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Append-only is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer data storage, so understanding it makes those chapters shorter.
In everyday life
Look for Append-only outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Append-only” →

How to study Append-only in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Append-only means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Append-only out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Append-only in simple terms?

Append-only is a property of computer data storage such that new data can be appended to the storage, but where existing data is immutable. Access control Many file systems' Access Control Lists implement an "append-only" permission: chattr in Linux can be used to set the append-only flag to files…

Why does Append-only matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Append-only?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Append-only.

Tags

  • Computer data storage

Keep exploring