Java File IO vs Local database

前端 未结 3 1696
孤独总比滥情好
孤独总比滥情好 2021-01-23 06:11

I am working on a project that involves parsing through a LARGE amount of data rapidly. Currently this data is on disk and broken down into a directory hierarchy:



        
3条回答
  •  北海茫月
    2021-01-23 06:40

    The issue could be solved both ways but it depends on few factors

    go for FileIO.

    1. if the volume is < millons of rows
    2. if your dont do a complicated query like Jon Skeet said
    3. if your referance for fetching the row is by using hte Folder Name: "DataSource" as the key

    go for DB

    1. if you see your program reading through millions of records
    2. you can do complicated selection, even multiple rows using a single select.
    3. if you have knowledge of creating a basic table structure for DB

提交回复
热议问题