Which SQL is best to use

Forum help and suggestions to improve this forum.

Moderator: Rathinagiri

icjindal
Posts: 11
Joined: Thu Mar 12, 2009 1:01 am

Which SQL is best to use

Post by icjindal » Thu Nov 19, 2009 1:39 am

Dear Friends,
Some time ago, I was following thread on "Which SQL is best to use". This thread appears to be terminated without any conclusion. HMG community is still open on this point which IMHO,is very crucial for future of XBASE. Pl. conclude this issue.
Regards
IC Jindal

User avatar
Rathinagiri
Posts: 5036
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 76 times
Been thanked: 87 times
Contact:

Post by Rathinagiri » Thu Nov 19, 2009 3:05 am

IMHO, it is open because we can not come to a single conclusion.

Just like other software products, each of them is having its own advantages and disadvantages. Each one may have upper hand on portability, connectivity, security, networking.

With regard to me, I am using MysQL and don't have any problems with that. After that, I use SQLite. I wish I would try PostgreSQL and Firebird soon.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
sudip
Posts: 1443
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Post by sudip » Thu Nov 19, 2009 4:24 am

Hello IC Jindal,
Very happy to see your post :D How are you? :)
I also agree with Rathi. I am adding one point more. As MySql has some licensing problems, I decided to use other DBMS, eg., Sqlite, Pgsql, Firebird etc.
Currrently I am developing an application for a medium sized pharmaceuticals company with HMG300+SQLite :)

Again, our good old DBF (especially DBFCDX) has lots of power also. :)

It's very hard to say a single DBMS is best. Eg., for a small to medium sized DBMS, one may select SQLite, but for a large DBMS with many online users one may select PostgreSql ;)

With best regards.
Sudip
With best regards,
Sudip

claudiotedesco
Posts: 131
Joined: Thu Jul 31, 2008 12:05 pm

Post by claudiotedesco » Thu Nov 19, 2009 11:19 am

Yo tambien quisiera empezar a utilizar SQL.
Que les parece si comienzo con Sqlite es mejor para empezar o me recomiendan otro?
Es facil de instalar? de donde lo descargo?
Si tienen algunos ejemplos para ir probando se los agradeceria.
Saludos

Claudio

I also would like to start using SQL.
They think if I start with Sqlite is better to start or recommend me another?
It is easy to install? where I download it?
If you have some examples to get tested ?
Greetings

Claudio

User avatar
Rathinagiri
Posts: 5036
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 76 times
Been thanked: 87 times
Contact:

Post by Rathinagiri » Thu Nov 19, 2009 11:32 am

I also would like to start using SQL.
Welcome.
They think if I start with Sqlite is better to start or recommend me another?
Yes. It is fine for single user or small network.
It is easy to install? where I download it?
It is already installed and bundled with HMG 3.0 ;)
If you have some examples to get tested ?
You can find out working samples in HMG\samples\sqlite folder.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
sudip
Posts: 1443
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Post by sudip » Thu Nov 19, 2009 1:48 pm

claudiotedesco wrote: If you have some examples to get tested ?
You may also check at (viewtopic.php?f=15&t=853) with lots of discussion from Master Roberto, Friend Rathi and other experienced friends of this forum :)
With best regards.
Sudip
With best regards,
Sudip

claudiotedesco
Posts: 131
Joined: Thu Jul 31, 2008 12:05 pm

Post by claudiotedesco » Fri Nov 20, 2009 11:33 am

Hola Gente

Estuve viendo los ejemplo que estan en la carpeta HMG\samples\sqlite folder.
Lo ejecute sin inconveniente y lo veo muy util.
Pero me resulta un poco complejo entender bien las siguientes lineas, especialmente las que estan marcadas en rojo

function RefreshTable

sample.table.DeleteAllItems()

aTable := sql(dbo,"select * from new where date1 <= "+c2sql(ctod("15-04-2010")))
for i := 1 to len(aTable)
aCurRow := aTable
sample.table.additem({aCurRow[1],str(aCurRow[2]),str(aCurRow[3]),dtoc(aCurRow[4]),iif(aCurRow[5]==1,"True","False"),aCurRow[6]})
next i

if sample.table.itemcount > 0
sample.table.value := 1
endif
sample.table.Refresh
return nil

Les agradeceria si me pueden explicar dicho uso
Saludos

Claudio

claudiotedesco
Posts: 131
Joined: Thu Jul 31, 2008 12:05 pm

Post by claudiotedesco » Fri Nov 20, 2009 11:36 am

I was watching the example that HMG are in the folder \ samples \ sqlite folder.
It runs without problem and I see it very useful.
But I find it a bit complex to understand well the following lines, especially those that are marked in red

function RefreshTable

sample.table.DeleteAllItems()

aTable := sql(dbo,"select * from new where date1 <= "+c2sql(ctod("15-04-2010")))
for i := 1 to len(aTable)
aCurRow := aTable
sample.table.additem({aCurRow[1],str(aCurRow[2]),str(aCurRow[3]),dtoc(aCurRow[4]),iif(aCurRow[5]==1,"True","False"),aCurRow[6]})
next i
if sample.table.itemcount > 0
sample.table.value := 1
endif
sample.table.Refresh
return nil

if I can explain this use
Greetings
Claudio

User avatar
Rathinagiri
Posts: 5036
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 76 times
Been thanked: 87 times
Contact:

Post by Rathinagiri » Fri Nov 20, 2009 12:36 pm

Actually this sql() function is a wrapper function. It returns a two dimensional array of the SQL query record set. It is in Row,Col format.

The red colored code is used to update a HMG grid with the SQL record set.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

icjindal
Posts: 11
Joined: Thu Mar 12, 2009 1:01 am

Post by icjindal » Sat Nov 21, 2009 3:33 am

Friends,
I wish to opt for PostgreSQL. My all programmes are in Dos/Windows environment. On preliminary reading, I understand that PostgreSQL works best on Linux/ Unix OS. I have Ubuntu as 2nd OS on my laptop, along with Vista. Kindly guide me on this point.

Regards
IC Jindal

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests