duplicate-images icon indicating copy to clipboard operation
duplicate-images copied to clipboard

Remove MongoDB dependency

Open philipbl opened this issue 8 years ago • 10 comments

Is MongoDB really necessary? I should look into removing it as a requirement.

philipbl avatar Jun 15 '17 18:06 philipbl

MongoDB may not be, I have something similar to this project (very hackish and system specific) with 342,063 hashes that I moved into a MySQL database for speed.

kg6kvq avatar Aug 03 '17 17:08 kg6kvq

Why not use SQLite?

xLinkOut avatar Aug 05 '17 13:08 xLinkOut

In my use case, the MySQL database system resided on another box with SSDs while the system with the images is on standard drives.

kg6kvq avatar Aug 07 '17 05:08 kg6kvq

I like the idea of SQLite. That way there is no dependencies on an external database. I think this will make the script much easier to use. I don't know much about databases, but I would expect the performance to be not great compared to something like MySQL.

philipbl avatar Aug 17 '17 15:08 philipbl

I always use SQLite in my projects, in various languages. It's extremely portable, require just a library to work (in Python, need a pip install sqlite3, and it's ready!) easy to backup/restore and, most important, fast, not more than MySQL but neither less. I think that you can give a try to it!

xLinkOut avatar Aug 18 '17 12:08 xLinkOut

+1 for using sqlite.

caulagi avatar Nov 13 '17 09:11 caulagi

I agree, SQLite seems to be the best approach. Hopefully I will get to this in the next couple of weeks, but if someone wants to get it done before that, feel free.

philipbl avatar Nov 22 '17 20:11 philipbl

Any progress on moving to SQLite?

fireundubh avatar Dec 14 '17 07:12 fireundubh

I'd love to contribute by changing from MongoDB to the builtin sqlite3 - want me to take a crack at it?

do-hickey avatar Feb 06 '18 05:02 do-hickey

@do-hickey I would love some help. I'm close to having support, but I won't have much time to work on it until April.

I've decided to restructure the code quite a bit so that it can support many different databases. I've pushed my current work in progress as v1.0 branch. It currently supports MongoDB, SQLite, and TinyDB. I have very little experience with SQLite so it would be great to get some feedback on if I structured the schema efficiently. Also, be warned, I haven't finished re-implementing displaying duplicates (in particular, display_duplicates function) in the web browser so this version isn't fully functional yet.

philipbl avatar Feb 21 '18 03:02 philipbl