Dynamic random access memory, or DRAM, is the most common type of computer memory. It is particularly useful for computers as it can hold a lot of data in a small physical space. However, it does not usually retain data when its power supply is switched off, meaning that it isn’t suitable for permanent storage.
Random access memory simply refers to memory where any piece of data can be accessed almost instantly. This is in contrast to storage media such as cassette tapes where the data can only be accessed in a fixed sequence. The "dynamic" element of DRAM is that its power supply must be constantly refreshed for it to work. This distinguishes it from static random access memory or SRAM.
Both SRAM and DRAM work by holding information in binary format, meaning it is broken down into 1s and 0s. With static random access memory, this is done through an electrical current which can be switched into two different directions. With dynamic random access memory, this is done by series of cells which are either full of electrons or empty. However, the cells all automatically drain almost instantly and so need to be refilled constantly.
Most computers use the two types of memory together. Generally dynamic random access memory is used in larger capacities because it is much more space-efficient and thus cheaper. Static random access memory, which is quicker to access but less space-efficient, is usually used for cacheing. This involves storing the data the computer is most likely to need during operation, reducing the number of times the computer has to access the slower DRAM.
Because dynamic random access memory needs the power supply to keep refilling the cells, it can’t usually store data once the power supply stops, such as when the computer is turned off. This is different to forms of memory such as Flash, used for memory cards, and solid state drives. This is one of the reasons DRAM is much cheaper than a Flash memory card of the same capacity.
The way dynamic random access memory works guarantees that, when operating properly, it will continue holding data as long as the power supply allows it to refill the cells. However, it doesn’t work in reverse: there is no guarantee that cutting the power will wipe the memory. Although it is extremely difficult to do in practice, there are several theories about how it would be possible to access the memory of a computer that has been switched off, for example by freezing the memory chip and switching it to another machine. This has brought into question the reliability of some security measures which encrypt a hard drive and store the encryption key in DRAM.