Jump to content
UBot Underground

Will UBOT 4 have databases?


Recommended Posts

Hi Ubot Devs,

 

I have a quick question for you. I am working on an interface for my bots in which I am trying to mimic the functionally of having database to communicate with my bots.

 

It is a big job I am a fair way but still needs a fair bit of work let alone testing and bug fixes.

 

I wanted to quickly ask if UBOT 4 will have database communication features?

 

This answer could save me tons of hours and effort that I am going to invest into it.

 

Looking forward to a reply.

 

Thanks,

 

Praney

Link to post
Share on other sites

I use oracle XE and Application Express because it is web based and can run in a browser. But the forms and "apps" must be made within it. I know how challenging it is to use databases in general, never mind with ubot. The need for database management in applications today is becoming stronger. I know I would love to see this built into ubot as well! Hope to hear good news soon! :D

Link to post
Share on other sites

I am definitely looking for this feature as well.

 

I know that the software making tool Tiger Software Builder uses a relational database set up and

has some very cool features. I also know that the owner is working on adding web automation features

to compete with Ubot. So this may very well be something to consider because as of now TSB can make

already makes some awesome aps and if they can make web automation work as well as UBOT then watch out.

Link to post
Share on other sites

jj,

 

you are 100% correct. Seems though that every piece of software has it's strong points and weak points. BTW, pop me off a pm regarding the tiger software. Would like to hear more.

 

Frank

Link to post
Share on other sites

well i hope the Ubot guys really consider a database integration in Ubot version 4.0

 

The owner of TBS thomas belknap is a a very rude person... i dealt with him earlier and had couple of presale question for him before i make my purchasing decision of getting his product and at one instance he burst in my face for no reason whatsoever... thomas might be a brilliant programmer but he seems just a very egocentric and unprofessional individual. So i let go of his software and cross my fingers that UBOT will kick TBS ass! :)

 

cheers,

 

Ziad

Link to post
Share on other sites

What exactly would you like to see in terms of databases? Would you like to be able to connect to external databases and execute SQL on them, where you would get results back as tables?

 

I guess I would like to know what features you feel like you need databases for?

 

Thanks :)

Link to post
Share on other sites

I personally would like to communicate with mysql database's

and be able to get the information back in any form really ( at that point working with the information would be easier)

 

So you would like to connect to a MySQL database on a web server and just type in your SQL queries? Such as in pseudo ubot code:

 

 

connect to database("mysite.com", "username", "password", port)

%results = $send query("SELECT * FROM users WHERE id = 5")

 

 

Or are you looking for something in UBot that could generate the SQL for you?

Link to post
Share on other sites

Hi Eddie,

 

I don't know about others, but I'd like to have my cake and eat it too, lol.

 

1. I'd love to be able to connect to remote mysql databases. Having simple commands would be awesome. This way I can communicate with a remote database quietly and easily.

 

2. I'd love to be able to house a local pseudo database. Something that permits me to store data with the bot but not in flat files. I'm not sure how that would look, but again, it would be cool to not to have to worry about any support files or to have a database program installed. I've seen other programs just work with their local database. I personally package up a ubot program like a standard windows install and install it into the program files folders. I also open up the folder for easy changes in the future, so allowing me to house the database there and make calls to it easily would be awesome. Now, I'll deny that I said this in the future, but something like an access database would be great. That way I can setup the database framework and then package it with the bot.

 

Boy as clear as mud, right? And I know that this is possibly a serious undertaking.

 

Frank

Link to post
Share on other sites

Eddie: Just pseudo ubot code to do simple database interaction, like you mentioned. That would be perfect. Like for example:

 

- does a post with a name exist?

- add x,y,z variables to specific table

 

etc

Link to post
Share on other sites

Hi Eddie,

 

I don't know about others, but I'd like to have my cake and eat it too, lol.

 

1. I'd love to be able to connect to remote mysql databases. Having simple commands would be awesome. This way I can communicate with a remote database quietly and easily.

 

2. I'd love to be able to house a local pseudo database. Something that permits me to store data with the bot but not in flat files. I'm not sure how that would look, but again, it would be cool to not to have to worry about any support files or to have a database program installed. I've seen other programs just work with their local database. I personally package up a ubot program like a standard windows install and install it into the program files folders. I also open up the folder for easy changes in the future, so allowing me to house the database there and make calls to it easily would be awesome. Now, I'll deny that I said this in the future, but something like an access database would be great. That way I can setup the database framework and then package it with the bot.

 

Boy as clear as mud, right? And I know that this is possibly a serious undertaking.

 

Frank

 

Frank,

 

 

Are you OK with writing your own SQL? Or would you like ubot to try to simplify it for you?

 

As far as a local database, would you just want that so you could run SQL queries on your own data in the middle of a bot? Or are there other reasons for it? MySQL for example can load in a CSV file into a database table, and you can do queries on the data you've taken so far. But doing this inside UBot right now is still a little tricky. If we did allow you to connect to a remote database, you could probably run MySQL on your own computer and just connect to localhost, and that way you could store the data in your own database.

 

If you would like a solution where each user who uses your compiled bot has their own database, I would like to know why you would need a database vs. a CSV file. Is it just because you would like to use queries in SQL instead of writing the routines in ubot? If so that's a perfectly valid reason, I'm just trying to understand what people want out of this idea.

 

If you need me to clarify anything let me know :)

 

Thanks

 

Eddie: Just pseudo ubot code to do simple database interaction, like you mentioned. That would be perfect. Like for example:

 

- does a post with a name exist?

- add x,y,z variables to specific table

 

etc

 

 

So you would be okay with writing your SQL to do that right? For example you have a MySQL table named posts, you might write:

 

#result = send query("SELECT COUNT(*) FROM posts WHERE name='Furniture Stores'") and you would get back the number of posts where the name is furniture stores.

 

Or for inserting you might do:

 

send query("INSERT INTO posts (id, name) VALUES (1, 'My New Post')")

 

Is that okay with you? Or would you want something more built in to UBot where you would not have to know SQL?

Link to post
Share on other sites

My guess would be, not having to learn SQL would be ideal, but having the ability to connect, add/delete/modify and query would not be bad thing under any circumstances.

Link to post
Share on other sites

My guess would be, not having to learn SQL would be ideal, but having the ability to connect, add/delete/modify and query would not be bad thing under any circumstances.

 

Is the reason you would like to connect to a database to be able to share data between multiple bots?

 

If you are using a local database, I can't think of any advantages to using a database vs. using a CSV file if you don't know how to use SQL.

 

Does that make sense?

Link to post
Share on other sites

that is correct.

 

Take into consideration stead of having to place an update for a bot that has a list of websites on a csv, or txt file.

 

stead we can auto update the bots for all users right from the database instead and wouldnt have to issue an update to everyone individually.

 

As well this helps in that the install, and instructions for users would be cut in half as well.

Link to post
Share on other sites
So you would be okay with writing your SQL to do that right? For example you have a MySQL table named posts, you might write:

 

#result = send query("SELECT COUNT(*) FROM posts WHERE name='Furniture Stores'") and you would get back the number of posts where the name is furniture stores.

 

Or for inserting you might do:

 

send query("INSERT INTO posts (id, name) VALUES (1, 'My New Post')")

 

Is that okay with you? Or would you want something more built in to UBot where you would not have to know SQL?

 

That is 100% okay with me!

Link to post
Share on other sites

Hey Eddie, writing my own sql would be fine, at least for me. But I'm sure generating specific commands wouldn't be too bad. Take a look at dreamweaver and how you can use the advanced sql statment generator to create sql statements.

 

As to the local machine, I was thinking more in line of a flat file, no database engine, type database. Almost like a microsoft access database. That would be ideal. Allowing us to precreate a ms access database and then populate the database right from ubot.

 

Here's some code in vb to illustrate some functions:

 

Data Access using MSAccess 

To work with Microsoft Access we use the OleDb data Provider. 

Sample Code 

Create a database named Emp in Microsoft Access in the C: drive of your machine. In the Emp database create a table, Table1 with EmpNo, EName and Department as columns, insert some values in the table and close it. Open Visual Studio .NET, on a new form drag three TextBoxes and a Button. The following code will assume that TextBox1 is for EmpNo, TextBox2 is for EName and TextBox3 is for Department. Our intention is to retrieve data from Table1 in the Emp Database and display the values in these TextBoxes without binding when the Button is clicked. 

Code for retrieving records 

Imports System.Data.OleDb
Public Class Form1 Inherits System.Windows.Forms.Form
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e as _
System.EventArgs) Handles MyBase.Load
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_
System.EventArgs) Handles Button1.Click
Try
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;_
Data Source=C:\emp.mdb;")
'provider to be used when working with access database
cn.Open()
cmd = New OleDbCommand("select * from table1", cn)
dr = cmd.ExecuteReader
While dr.Read()
TextBox1.Text = dr(0)
TextBox2.Text = dr(1)
TextBox3.Text = dr(2)
' loading data into TextBoxes by column index
End While
Catch
End Try
dr.Close()
cn.Close()
End Sub
End Class  


When you run the code and click the Button, records from Table1 of the Emp database will be displayed in the TextBoxes. 

Retrieving records with a Console Application 

Imports System.Data.OleDb
Imports System.Console
Module Module1

Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader

Sub Main()
Try
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\emp.mdb;_
Persist Security Info=False")
cn.Open()
cmd = New OleDbCommand("select * from table1", cn)
dr = cmd.ExecuteReader
While dr.Read()
WriteLine(dr(0))
WriteLine(dr(1))
WriteLine(dr(2))
'writing to console
End While
Catch
End Try
dr.Close()
cn.Close()
End Sub

End Module  


Code for Inserting a Record 

Imports System.Data.OleDb
Public Class Form2 Inherits System.Windows.Forms.Form
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Dim icount As Integer
Dim str As String

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As_
System.EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_
System.EventArgs) Handles Button2.Click
Try
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\emp.mdb;")
cn.Open()
str = "insert into table1 values(" & CInt(TextBox1.Text) & ",'" & TextBox2.Text & "','" &_
TextBox3.Text & "')"
'string stores the command and CInt is used to convert number to string
cmd = New OleDbCommand(str, cn)
icount = cmd.ExecuteNonQuery
MessageBox.Show(icount)
'displays number of records inserted
Catch
End Try
cn.Close()
End Sub
End Class  

 

But also being able to access mysql databases would be cool.

 

Whatever it is for a local app has to be simple, simple. Too many applications are starting to package the mysql engine as a service and they conflict. One such program is Simply Accounting. I cannot run any mysql stuff on my Simply Accounting pc. Bloody terrible!

 

Frank

 

Frank,

 

 

Are you OK with writing your own SQL? Or would you like ubot to try to simplify it for you?

 

As far as a local database, would you just want that so you could run SQL queries on your own data in the middle of a bot? Or are there other reasons for it? MySQL for example can load in a CSV file into a database table, and you can do queries on the data you've taken so far. But doing this inside UBot right now is still a little tricky. If we did allow you to connect to a remote database, you could probably run MySQL on your own computer and just connect to localhost, and that way you could store the data in your own database.

 

If you would like a solution where each user who uses your compiled bot has their own database, I would like to know why you would need a database vs. a CSV file. Is it just because you would like to use queries in SQL instead of writing the routines in ubot? If so that's a perfectly valid reason, I'm just trying to understand what people want out of this idea.

 

If you need me to clarify anything let me know :)

 

Thanks

 

 

 

 

So you would be okay with writing your SQL to do that right? For example you have a MySQL table named posts, you might write:

 

#result = send query("SELECT COUNT(*) FROM posts WHERE name='Furniture Stores'") and you would get back the number of posts where the name is furniture stores.

 

Or for inserting you might do:

 

send query("INSERT INTO posts (id, name) VALUES (1, 'My New Post')")

 

Is that okay with you? Or would you want something more built in to UBot where you would not have to know SQL?

Link to post
Share on other sites

I can think of a few ways to use this. I am pretty familiar with SQL and if you can just make a run query command where it uses the login paramaters (Server, DB, User, Pass) and then execute a raw sql command (i.e. INSERT INTO table...) this could be VERY useful.

 

Of course, simple add/edit/delete/search would be nice as quick commands. I think a run sql command makes the most sense as it gives unlimited access to the DB.

 

Here is one example, and this is completely made up, but one I can see doing. It incorporates another feature I requested that allows the user to run a sub prior to pushing the play button.

 


  •  
  • User enters their login info to a settings section (UI Window)
  • Save the login info so they never have to re-enter (feature request from above)
  • Run a URL scrape from google to get a couple thousand urls off google
  • All those urls get saved to DB (urls table)
  • Run another tab that acts on those urls, or filters them, or whatever
  • This would also allow for adding things like timestamp, boolean values, keyword used

 


  •  
  • Another bot or tab could then be run, same DB parameters
  • Call this Account Creation
  • A different table (say users) would store all the account parameters for web 2.0 sites
  • User could run the bot and it could create accounts for the urls from the urls table
  • Save the account profile information to the users table

 

  • Third bot or tab runs (Call it Poster)
  • Preloads the user accounts (again with the preload feature request above)
  • Starts using the profiles from users and logs in to post to each account
  • Saves those URL's to the DB for later verification

 

This may sound vaguely familiar to something like SENuke. But I think a tool like that could be created using ubot, if it's all that it's being hyped up to be. This is only one scenario, there are a thousand more.

 

I think the uses for SQL queries become quite obvious when you start talking about this much data, keeping it all in a RDBM system JUST MAKES SENSE. I definitely support this idea and hope it is added in V4!

Link to post
Share on other sites

I'm pretty familiar with SQL but lately have been using Zoho Creator which uses it's own method of database interaction. It's a great simple alternative to SQL. In particular it makes updating tables far easier than the UPDATE WHERE method of SQL.

 

There you'd just define the table and update like this:

 

g = table [column = criteria];

 

while i in g loop {

i.column1 = new value;

i.column2 = new value;

}

 

Hmm, well maybe that isn't easier to code, but I do find it easier to understand than SQL UPDATE statements :).

Link to post
Share on other sites
  • 2 weeks later...

ubot database = orgasm!

 

With SQL (learn it for God's sake, ubot has JS and you have to learn that too!) this could really make ubot a different animal.

 

You could make commercial bots that set up shopping carts, and modify records, or even speak directly to the wordpress databases of your blogs.

 

This would be amazing.

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