Jump to content



Photo

Mysql Vs Sqlite


  • Please log in to reply
7 replies to this topic

#1 BigEfromDaBX

BigEfromDaBX

    Advanced Member

  • Members
  • PipPipPip
  • 377 posts
  • OS:Windows 8
  • Total Memory:< 1Gb
  • Framework:v3.5
  • License:Standard Edition

Posted 11 July 2019 - 03:00 PM

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?



#2 Misha

Misha

    Advanced Member

  • Members
  • PipPipPip
  • 56 posts
  • OS:Windows 8
  • Total Memory:8Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 12 July 2019 - 01:51 AM

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.



#3 HelloInsomnia

HelloInsomnia

    Advanced Member

  • Moderators
  • 3202 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 12 July 2019 - 12:51 PM

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..



#4 BigEfromDaBX

BigEfromDaBX

    Advanced Member

  • Members
  • PipPipPip
  • 377 posts
  • OS:Windows 8
  • Total Memory:< 1Gb
  • Framework:v3.5
  • License:Standard Edition

Posted 12 July 2019 - 01:00 PM

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?



#5 HelloInsomnia

HelloInsomnia

    Advanced Member

  • Moderators
  • 3202 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 12 July 2019 - 03:51 PM

But can MYSQL handle multiple connections?

 

Yes



#6 BigEfromDaBX

BigEfromDaBX

    Advanced Member

  • Members
  • PipPipPip
  • 377 posts
  • OS:Windows 8
  • Total Memory:< 1Gb
  • Framework:v3.5
  • License:Standard Edition

Posted 13 July 2019 - 02:24 PM

Yes


Cool

#7 MasteRofBotS

MasteRofBotS

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts
  • Location127.0.0.1
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Professional Edition

Posted 19 July 2019 - 05:45 PM

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:



#8 BigEfromDaBX

BigEfromDaBX

    Advanced Member

  • Members
  • PipPipPip
  • 377 posts
  • OS:Windows 8
  • Total Memory:< 1Gb
  • Framework:v3.5
  • License:Standard Edition

Posted 19 July 2019 - 06:20 PM

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


Sent from my iPhone using Tapatalk Pro




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users