What are the disadvantages of storing a playlist as plain text in a text file?

This is what I thought:

The main disadvantage of storing the play list as plain text is its simplicity. The basic conceptual structure of the rows of values can be very inefficient and inappropriate for data sets with complex structure. The low-level format of storing everything as characters with one byte per character is very inefficient in terms of amount of computer or phone memory required. It can also lead to massive redundancy (repetition of values). The speed of access and space efficiency for large data set is also not ideal. The second disadvantage is the fundamental structure of plain text file format means that each line of the file contains exactly one record or case in the data set. This only works well when a data set only contains information about one type of object. However, this is not the case as storing the playlist would mean that we also need to store all the information about the songs such as the name and song time. So there would be information about two different types of objects. A plain text file format does not allow for sophisticated data models. A plain text format is unable to provide appropriate representation of complex data structure like a playlist.

Now my question is instead of storing the playlist as plain text in a text file, what would be a more suitable way of storing objects? Please explain. Thank you.

  • $\begingroup$ It also will be implemented in Java $\endgroup$ – Anony Jun 17 '18 at 11:20
  • $\begingroup$ The "fundamental structure of [a] plain text file[...]" to me is a sequence of characters. There is no notion of "record" and even "line" is a derived concept. Most people would call a Java source file a "plain text file" but would not say that each line contains some "record". You seem to have or be assuming some much more specific definition of "plain text file format". It may behoove you to provide the definitions you are using. $\endgroup$ – Derek Elkins left SE Jun 17 '18 at 16:49

I don't see anything wrong with storing a playlist as a plain text file. Simplicity is not a disadvantage. It's likely to be more than efficient enough, given the size of a typical playlist (implement it and see!).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.