Understand serial files: Difference between revisions
Mr. MacKenty (talk | contribs) No edit summary |
Mr. MacKenty (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
# Data can be appended to a serial file. | # Data can be appended to a serial file. | ||
# A file can be open for reading or writing, but not reading and writing at the same time. | # A file can be open for reading or writing, but not reading and writing at the same time. | ||
# Serial files are quite limiting, but are useful for simple data sets and configuration files. Other types of files include: sequential files where order of the data is maintained, index sequential files for | # Serial files are quite limiting, but are useful for simple data sets and configuration files. Other types of files include: sequential files where order of the data is maintained, index sequential files for large data sets and random files which allow you to access any item without searching through the file from the start. | ||
[[media:Programming companion Python.pdf | This content comes from our classroom resource for learning python]] | |||
== References == | == References == |
Revision as of 09:33, 29 September 2020
![](/images/e/e4/Python.png)
Python programming language[1]
- Serial files store data with no order to the data maintained.
- To search data from a serial file you begin at the start of the file and read all the data until the item is found.
- Data cannot be deleted from a serial file without creating a new file and copying all the data except the item you want to delete.
- Data cannot be changed in a serial file without creating a new file, copying all the data across to a new file, inserting the change at the appropriate point.
- Data can be appended to a serial file.
- A file can be open for reading or writing, but not reading and writing at the same time.
- Serial files are quite limiting, but are useful for simple data sets and configuration files. Other types of files include: sequential files where order of the data is maintained, index sequential files for large data sets and random files which allow you to access any item without searching through the file from the start.
This content comes from our classroom resource for learning python