Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

Database lookup

So I'm working on a database lookup service that will be completely free and will use MYSQL to search for all the information, however, I'm having issues inserting the databases unformatted information into MYSQL quickly. Does anyone have any ideas how to insert it quick? 🤝
[Image: 36gGo5H.gif]
No idea but good for you dude, very nice of you to do this for free :)
Terminal and 'cut' are the last things you'll ever need in formatting strings, like db data in this case.
So all your files are .txt , and do the data inside have some delimiters ?
Just insert the data with prepared statements if that's really the way you want to go. However, I would honestly use a tool that was made for stuff like this like elasticsearch
Don't use mysql. If you plan on adding loads of data (Billions of records) mysql will struggle. Not to mention the slow imports and hideous indexing times. Try using mongoDB instead.

I worked on a similar project for a while, MySQL was nothing but problems and we ended up quitting the project.

If you are still going for MySQL, try using something like navicat. It has an excellent import wizard which allows you to set up delimiters.
[Image: x8KB36H.gif]
You mean like LeakedSource? I attempted to make a site just like it using MySQL, however ended up stopping because it just wasn't cut out for the amount of data. Been reading about mongoDB so that might be the way to go.
MariaDB can handle a couple of million records effectively. You might want to look at MongoDB, or use the cloud scalable service from AWS.
Yeah many people have suggested it, I'm very uneducated on it however as I've only ever focused on mysql.
[Image: 36gGo5H.gif]
(Oct 7, 2016 12:23 PM)Linus Torvalds Wrote:  Yeah many people have suggested it, I'm very uneducated on it however as I've only ever focused on mysql.

What a perfect opportunity and reason to learn something new.
BTC: 1PQFRwoyRUTCWMC7anLdVxTp4t22MVoos2
Indeed, do you have any good resources?
[Image: 36gGo5H.gif]
(Oct 7, 2016 12:39 PM)Linus Torvalds Wrote:  Indeed, do you have any good resources?

Honestly, I'm not really a fan of MongoDB so I can't really give you any good advice regarding it, and I doubt you can get that much better results than with MySQL.

I don't want to discourage you, but this is definitely not an easy job. A database lookup is essentially useless unless you have hundreds of millions or billions of records and searching through that isn't simple. I'm not saying it's not doable, but you're gonna have to make compromises if you want to offer this for free, since it's gonna cost you.

If you want the users to be able to lookup by email, it's rather easy to optimize the DB, but if you want to be able to lookup by any keyword, things get complicated. You'll want to scale out, not up. Rather many cheaper computers than one high-end.

As for what DB should you use? It depends entirely on how you're going to do this and what's good enough for you. Maybe the way haveibeenpwned.com did it is good enough? They use Azure so don't expect it to be free: https://www.troyhunt.com/working-with-15...ecords-on/
BTC: 1PQFRwoyRUTCWMC7anLdVxTp4t22MVoos2
Yeah I'll have to find some way, I hope to not give up never the less
[Image: 36gGo5H.gif]
I once made a db lookup using GREP,however it wasn't the best solution, but it did the job.
Yeah if you want to be able to index billions of records and have more than one person grepping at one time, the server would probably die
[Image: 36gGo5H.gif]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by Gonz0Nov 6, 2017 08:21 AM 7 411 Nov 6, 2017 08:21 AM
Last Post: V3t3r4n
[PHP] by Kasual™Oct 29, 2016 03:13 AM 24 3,718 Oct 29, 2016 03:13 AM
Last Post: Maudiy
[PHP] by ugofirstimtrustedMay 29, 2016 07:56 PM 8 216 May 29, 2016 07:56 PM
Last Post: ugofirstimtrusted