Jump to content
UBot Underground

Recommended Posts

I I have a bot that write to an SQLITE file.  I want to write to msyql server instead because I believe the sqlite file can only have one concurrent connection at a time. My question is, can I connect to the mysql server with different bots at the same time?

Link to post
Share on other sites

My question is, can I connect to the mysql server with different bots at the same time?

 

Yes, why not? But I use sqlite in my bots.

If you are create bots for yourself, mysql will be a cool solution.

Link to post
Share on other sites

SQLite goes so fast that it's usually not a problem and if you use Heopas plugin the connection is only open while the command/function is running which is going to likely be milliseconds - I just ran a query that took 40 milliseconds..

  • Like 1
Link to post
Share on other sites

SQLite goes so fast that it's usually not a problem and if you use Heopas plugin the connection is only open while the command/function is running which is going to likely be milliseconds - I just ran a query that took 40 milliseconds..

But can MYSQL handle multiple connections?

Link to post
Share on other sites

Wait, STOP!

 

Don't just tell someone to go ahead and drive a Nascar car when the fastest thing they drove so far was a bicycle ;) and lets add some value for others which will see this topic, cause databases are important step and will have wrong assumptions.

 

 

#factSQL B)

 

 

#1. If you are totally new to storing/reading/manipulating any kind of data with use of any databases of any types, choosing SQLite is the BEST OPTION and no other solution will be better especially combined with uBot and whatever-kind-of-program you make. The leap will be a big one for any one going from lists/tables to databases and with SQLite the only thing you need to get it running is the same computer you are creating your bots on.

 

 

 

#2. SQLite itself is really an awesome and a very powerful solution for data storage which you can and should master by yourself quickly and easily. It's really not wise to use other database solutions and waste a lot of time on things that you won't be able to utilize even in 20% for months to come (yes, MySQL is just an overkill really). Instead of spending 100's of hours to be a begginner in other db solutions, you can get a lot more out of using SQLite + it's so easy to use it that you will be looking for more ways and data to put in there (0 maintnance compare to MySQL).

(this one is also answering OP)

 

 

 

#3. CHECK YOUR FACTS. ALWAYS. Base your decisions on data and more data, not assumptions!

OP here has assumed that he needs to go with MySQL databases, and was confirmed in that bs based on assumptions that he needs THAT solution which again is total bu....t.

 

 

Here are some facts, straing from official SQLite website - and to make it even easier for anyone reading this, below are FACTS from SOURCE:
 

(5) Can multiple applications or multiple instances of the same application access a single (SQLite) database file at the same time?

 

SOURCE: https://www.sqlite.org/faq.html#q6

Multiple processes can have the same database open at the same time. Multiple processes can be doing a SELECT at the same time. But only one process can be making changes to the database at any moment in time, however. [...]

 

We are aware of no other embedded SQL database engine that supports as much concurrency as SQLite. SQLite allows multiple processes to have the database file open at once, and for multiple processes to read the database at once. When any process wants to write, it must lock the entire database file for the duration of its update. But that normally only takes a few milliseconds. Other processes just wait on the writer to finish then continue about their business. Other embedded SQL database engines typically only allow a single process to connect to the database at once.

 

But experience suggests that most applications need much less concurrency than their designers imagine.

 

 

 

#4. RE-READ the sentece above. They said it, I will say the same and many others will agree with that statement in full. I've personally made that mistake too many times, thinking that "the other" technology/solution will solve my needs/app needs when in reality it only post-poned or terminated the projects cause it was way too much to what I wanted to get done.

 

 

#5. Simple SQLite database (which is just a .db file) CAN HANDLE 10 - 10 000X the amount of data compared to lists/tables OR whatever you think you will need in faraway future for your app. Quickly change whatever you want, in 1 row manually, or in 1 000 000 rows not-so-manually + you can make a COPY of DB file in case you break something to quickly restore the SQLite.

 

 

 

 

There is so much awesome things that you can do with a SQLite database that it will take you a really really long time before you push it to it's limits and/or will need to use different database solution and I think there is no better way to get QUICKLY and EFFECTIVELY a more serious application/bot done with data stored in database then with SQLite. Learn it in and out, use it to the fullest and you will see that the only limitation was in your knowledge/skills rather then in the technology itself.

 

Of course, MySQL got it's place in DB world for specific use cases, same as other DB types. But what you can do easily, in a time that it takes for a water to boil, with SQLite and your own brain and 2 hands and have fun expanding your creator skills (+ taking your uBots to NEW LEVEL with SQLite) would even faster go straight to SH&* and slow you down/bot development just cause you wanted to go with MySQL which will be outperformed 9 out of 10 times by SQLite performance, ease-of-use and your happiness using it.

 

I understand that MySQL itself is like a common knowledge type of DB solution, I was in the same boat cause of web developments and online stuff where it's widely used (at least was ;) ) but using it always seemed like a daunting task and instead of wanting to push forward, having to deal with anything MySQL related made me freakin hate the DB stuff (I outsourced it all) and thinking that all DB stuff is that complicated etc. I heard about SQLite when I started with uBot and ohhh I was so amazed at how easy and fantastic working on a DB part of a bot/application was with it, that summing this post of mine with a summary.

 

GO WITH SQLITE! If you think otherwise, go with SQLite anyways. 100%

 

 

:ph34r: :wub: :ph34r:

  • Like 1
Link to post
Share on other sites

 

Wait, STOP!

Don't just tell someone to go ahead and drive a Nascar car when the fastest thing they drove so far was a bicycle ;) and lets add some value for others which will see this topic, cause databases are important step and will have wrong assumptions.

 

#factSQL B)

 

 

#1. If you are totally new to storing/reading/manipulating any kind of data with use of any databases of any types, choosing SQLite is the BEST OPTION and no other solution will be better especially combined with uBot and whatever-kind-of-program you make. The leap will be a big one for any one going from lists/tables to databases and with SQLite the only thing you need to get it running is the same computer you are creating your bots on.

 

 

 

#2. SQLite itself is really an awesome and a very powerful solution for data storage which you can and should master by yourself quickly and easily. It's really not wise to use other database solutions and waste a lot of time on things that you won't be able to utilize even in 20% for months to come (yes, MySQL is just an overkill really). Instead of spending 100's of hours to be a begginner in other db solutions, you can get a lot more out of using SQLite + it's so easy to use it that you will be looking for more ways and data to put in there (0 maintnance compare to MySQL).

(this one is also answering OP)

 

 

 

#3. CHECK YOUR FACTS. ALWAYS. Base your decisions on data and more data, not assumptions!

OP here has assumed that he needs to go with MySQL databases, and was confirmed in that bs based on assumptions that he needs THAT solution which again is total bu....t.

 

 

Here are some facts, straing from official SQLite website - and to make it even easier for anyone reading this, below are FACTS from SOURCE:

 

 

 

#4. RE-READ the sentece above. They said it, I will say the same and many others will agree with that statement in full. I've personally made that mistake too many times, thinking that "the other" technology/solution will solve my needs/app needs when in reality it only post-poned or terminated the projects cause it was way too much to what I wanted to get done.

 

 

#5. Simple SQLite database (which is just a .db file) CAN HANDLE 10 - 10 000X the amount of data compared to lists/tables OR whatever you think you will need in faraway future for your app. Quickly change whatever you want, in 1 row manually, or in 1 000 000 rows not-so-manually + you can make a COPY of DB file in case you break something to quickly restore the SQLite.

 

 

 

 

There is so much awesome things that you can do with a SQLite database that it will take you a really really long time before you push it to it's limits and/or will need to use different database solution and I think there is no better way to get QUICKLY and EFFECTIVELY a more serious application/bot done with data stored in database then with SQLite. Learn it in and out, use it to the fullest and you will see that the only limitation was in your knowledge/skills rather then in the technology itself.

 

Of course, MySQL got it's place in DB world for specific use cases, same as other DB types. But what you can do easily, in a time that it takes for a water to boil, with SQLite and your own brain and 2 hands and have fun expanding your creator skills (+ taking your uBots to NEW LEVEL with SQLite) would even faster go straight to SH&* and slow you down/bot development just cause you wanted to go with MySQL which will be outperformed 9 out of 10 times by SQLite performance, ease-of-use and your happiness using it.

 

I understand that MySQL itself is like a common knowledge type of DB solution, I was in the same boat cause of web developments and online stuff where it's widely used (at least was ;) ) but using it always seemed like a daunting task and instead of wanting to push forward, having to deal with anything MySQL related made me freakin hate the DB stuff (I outsourced it all) and thinking that all DB stuff is that complicated etc. I heard about SQLite when I started with uBot and ohhh I was so amazed at how easy and fantastic working on a DB part of a bot/application was with it, that summing this post of mine with a summary.

 

GO WITH SQLITE! If you think otherwise, go with SQLite anyways. 100%

 

:ph34r: :wub: :ph34r:

 

Thabks for that useful info [emoji4]

 

 

Sent from my iPhone using Tapatalk Pro

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...