Inactive Tutor answered 04/24/14
Elton T.
asked 10/22/13Under what circumstances would you use a sequential file over a database?
what circumstances would you use a sequential file over a database?
Describe these circumstances. When would a database be more beneficial
than a sequential file? Is it possible for the two types of permanent
storage to be used interchangeably? Explain your answers.
4 Answers By Expert Tutors
Inactive Tutor answered 12/09/13
A database would be more beneficial if there were numerous queries expected, and when functions were required on specific portions of data, and/or when the data contained more complex data such as objects or mutimedia. In such cases to read a file from beginning to end would pose performance issues. A database file would not have those issues because it could query the data at any point within the data and could make changes anywhere within that data without having to iterate through the entire file from start to finish for each call. Basic data manipulation such as sorting, filtering, adding or deleting could be handled by the database relieving the need to have to write all of the supporting code for those functions.
Inactive Tutor answered 01/06/20
Sequential file are always used to store data, even a database will store its data to a sequential file in addition to storing the data in memory.
Therefore a database is used in addition to the sequential file when you need to add sophisticated read/write by multiple users or sophisticated querying(filters, joins, transformations).
Inactive Tutor answered 11/05/19
I like the answers above but there is one more case where a sequential file is superior to a database and that is when you are interfacing a data file with another company or organization. It could be in XML, csv, or other text format. The first answer alludes to this but I thought it would be good to add this specific case.
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.