Hello to everybody and Happy Valentine's Day!!

Under 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?

Recommended Answers

All 2 Replies

Sounds like homework questions. How about you come up with at least one reasonable answer to each and we'll tell you if they make sense and possibly offer more.

Under what circumstances would you use a sequential file over a database? Describe these circumstances.

1) When you have a small amount of data that doesn't change often, and is not changed by users. 2) When the site does not see much traffic. 3) When the data is not relational.

When would a database be more beneficial than a sequential file?

Sequential files can be better utilized than database files. The thing with sequential files though, is that you can only have sequential access to your data, one line at a time, starting with the first line down to the last one. This means that if you have to get to the last line of a 50,000 line sequential file and read the information, you have to read all the 49,999 lines before it, wasting a lot of time. On the other hand, a database file can respond to a query and read data from anywhere in the file. In such situations, a database file is more beneficial than a sequential file.

Is it possible for the two types of permanent storage to be used interchangeably? Explain your answers.

Yes. It is very common for modern databases to use a combination of XML and database data (XML for data that doesn't change often) and it is common for database-driven sites to generate XML for various Web services / RSS feeds

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.