A new database access framework for any Ruby (Iron or J)

  • Thread starter Post-no-reply Tudbc
  • Start date
P

Post-no-reply Tudbc

I would like to introduce my new exciting research in TUDBC (Truly
Unified Database Connectivity) to you, which brings both high
performance and high productivity to database access. Currently, it
supports

* Several programming languages with the same unified coding style,
including

1. C# (also other .NET compliant languages, such as VB.NET and J#).
2. Java.
3. PHP (including three flavors: original PHP, Phalanger with ADO.NET
and Quercus with JDBC).
4. Ruby (including three flavors: original Ruby, IronRuby with ADO.NET,
and JRuby with JDBC).
There is plan to expand to other programming languages, including C,
C++, Perl, Python, etc.

* All major DBMSes: Access, DB2, Derby, MySQL, Oracle, SQL Server, plus
text CSV and Excel spreadsheets.

Even though TUDBC works for multiple platforms, the performance is not
sacrificed because it is using a new paradigm and caching technique.
Performance comparisons show that it is close-to-the-best and the best
in various settings.

On the website (http://www.tudbc.org), you will find interactive live
demos and source codes for all languages. There are also videos of demos
and tutorials, including one that shows you how you can use TUDBC to
create a simple web application in 2 minutes.

Please share this great news with your friends and colleagues.

Thanks!

TUDBC
http://www.tudbc.org
 
R

Robert Klemme

I would like to introduce my new exciting research in TUDBC (Truly
Unified Database Connectivity) to you, which brings both high
performance and high productivity to database access. Currently, it
supports

Is it just me or do others also get the feeling that this is spam,
trying to get some google ad clicks? IMHO there is not enough meat to
sell a revolutionary new invention for a day to day feature that
millions of developers use.

robert
 
D

David Masover

Is it just me or do others also get the feeling that this is spam,
trying to get some google ad clicks?

I hadn't read thoroughly, but this is the part that reminds me of *ahem*
Bingo:

Even though TUDBC works for multiple platforms, the performance is not
sacrificed because it is using a new paradigm and caching technique.
Performance comparisons show that it is close-to-the-best and the best
in various settings.

"New paradigm" -- bingo! We have a winner!

"New caching technique", but no details -- hmm.

I'm willing to be proven wrong, but the site itself doesn't help:

"Best practices: TUDBC promotes the best practices for coding styles using
super-strongly-typed SQL statement cache and connection cache."

What makes a SQL statement "super" strongly-typed?

And you do realize this is the _ruby_ mailing list, right? A lot of duck
typers here. Not really the best place for strong typing.


But the real kicker is, login required for "source codes and tools", and it's
got a custom license -- sorry, there are too many open DBCs for me to waste
time getting a fscking _login_ for yours, especially when I'd rather be
moving beyond SQL anyway (see: CouchDB, ThruDB...)
 
T

Todd Benson

And you do realize this is the _ruby_ mailing list, right? A lot of duck
typers here. Not really the best place for strong typing.


But the real kicker is, login required for "source codes and tools", and it's
got a custom license -- sorry, there are too many open DBCs for me to waste
time getting a fscking _login_ for yours, especially when I'd rather be
moving beyond SQL anyway (see: CouchDB, ThruDB...)

Umm, yeah. CouchDB is 'beyond' an SQL database. Well, if the shoe
fits (use it). I still don't understand why, for some people,
_everything_ has to be dynamic. On the CouchDB site, quote, "Ad-hoc
and schema-free with a flat address space." That's what should run an
enterprise? Be it on your own head.

Todd
 
D

David Masover

Umm, yeah. CouchDB is 'beyond' an SQL database. Well, if the shoe
fits (use it). I still don't understand why, for some people,
_everything_ has to be dynamic.

Well, in the same sense that Ruby would be "beyond" C. Not that there's no use
case for C at all, but in almost all cases, I'd rather use Ruby, and the
dynamism is part of that.
On the CouchDB site, quote, "Ad-hoc
and schema-free with a flat address space." That's what should run an
enterprise? Be it on your own head.

My own head? Sure.

And why shouldn't that run an enterprise? Some enterprises, in fact, run on
exactly that kind of database -- Google's BigTable, for example, isn't far
off. In practice, it's a superset of the functionality and scalability of a
modern SQL database, only less statically typed and probably slower on a
single machine.

Again: There are cases where it matters that SQL is faster on a single
machine. I just think that most of the cases where SQL is used today don't
fit that at all.
 
P

Post-no-reply Tudbc

I am trying to give some more details to address a few questions that
people asked.

David said:
I hadn't read thoroughly, but this is the part that reminds me of *ahem*
Bingo:



"New paradigm" -- bingo! We have a winner!

Well, history always shows that people tend to not believe in any new
paradigm when they first surfaced. Didn't we say the earth was not
supposed to be round? Well, the source codes for TUDBC are available for
download, you can see them and try them yourself, then make your
judgment.
"New caching technique", but no details -- hmm.

I am currently writing an academic research paper about the overall
architecture, and definitely I will share that when I am done.

I am not selling the product, so I am just as happy to share my research
with the world, so I annouced it in several forums (hopefully this is
not a crime ;D). I do my diligence by announcing it in only the
languages that TUDBC currently supports: PHP(s) and Ruby(s). I couldn't
find any list for Java, C#, VB.NET, etc.

The source codes are available for download for anyone interested to
examine its correctness, so I didn't make any excessive claims that I
cannot substantiate.
I'm willing to be proven wrong, but the site itself doesn't help:

"Best practices: TUDBC promotes the best practices for coding styles
using

The wording may be a bit ambitious, but I think TUDBC does it quite
well.


super-strongly-typed SQL statement cache and connection cache."

What makes a SQL statement "super" strongly-typed?

Excellent question! This is part of the so-called new paradigm.

When you get an instance of SqlCommand (an example in .NET for
SQLServer), it is always generic, which could be a INSERT or SELECT or
any other SQL statement in it. Not any more in TUDBC, you always get
exactly the specific SQL statement you want to work with. (How? I am
afraid you need to look at the source codes, because each language
implements it differently, but TUDBC hides all the differences by
creating a consitent interface for the getSQL() method which is
explained later)

Why is generic statement bad? You cannot enforce what it should or
should not do. Let's say it is an INSERT statement, ADO.NET does not
prevent you from writing codes to try to get a DataReader (like a result
set) out of it, although we shouldn't and only at run-time it will cause
error. The specific statement that you get from TUDBC will not allow you
to do that (in the "standard style" which is from my original design;
later two National Science Foundation (which is the most prestiguous
research administration instituition in the US if are not familiar with)
Program Directors gave a comment that it may be too restrictive for
practical usage, so I relaxed this requirement to create an alternative
more agile "EZ style", but it looses the super strongly-typed
characteristic, but I could still mimic the strongly-typed characteric
in another way.)

Why is it called "super strongly-typed"? We already defined what is
"strongly-typed". In fact, SqlCommand is "strongly-typed" already, but
it is still generic in what it repesents inside. So I coined a new term
that means it is stronger than the traditional sense of
"strongly-typed".

And you do realize this is the _ruby_ mailing list, right? A lot of duck
typers here. Not really the best place for strong typing.

I guess I should should explain more about what I mean.

Actually, Ruby is still a strongly-typed language that doesn't require
you to declare the type in advance. But by and large, Ruby is still a
strongly-typed language, because "123"+3 would cause syntax error. It
provides a more convenient way of "ducking" types. For example the very
succint syntax of ".to_i" or ".to_s" is clever, because we convert types
so frequently that "Convert.ToInteger" or "Convert.ToString" (in C#) or
Integer.ParseInt or .toString() (in Java) would be too laborious.

I admit that the super strongly-typed characteristic only applies to
strongly-typed languages in theory. But I beg to diff, because it can
also be enforced or helped by good IDEs to ease development. That's why
I intentionally leave the wording as is. (Read more about exactly what I
mean in the next two paragraphs.)

My hope is that hopefully one day when TUDBC is widely accepted and IDEs
eventually catch up, then actually there is a simple way to implement
this feature inside any good IDEs, even for dynamically strongly-typed
languages (like Ruby) and non-strongly-typed language (PHP, Perl, etc.).
How? The IDEs just need to know which method requires support for super
strongly-typed. For TUDBC, there is only one method, which is getSQL()
method. So theoretically speaking, IDEs can find out the type of
getSQL() requires, and it can then support this super strongly-typed
feature, even for non-strongly-typed languages.

As for strongly-typed languages (e.g. Java, C#, VB.NET, J#, etc.),
existing IDEs (such as NetBeans, Visual Studios) already can handle the
super strongly-typed feature. For example, whenever you use getSQL() and
follow by a dot, the IDEs will auto-complete with exactly the methods
that it shoud have and no more generic SQL methods. Nothing needs to be
changed in the existing IDEs for any strong-typed languages to support
this, and it works beautifully!!!!

That's why it is called super strongly-typed, and that's why it is
called a new paradigm, because it has never been done this way (I think,
or at least in any of the existing database APIs).

But the real kicker is, login required for "source codes and tools", and
it's
got a custom license -- sorry, there are too many open DBCs for me to
waste
time getting a fscking _login_ for yours, especially when I'd rather be
moving beyond SQL anyway (see: CouchDB, ThruDB...)

That is your choice, and I respect that.

Hopefully I do dispel some of your misconceptions about TUDBC.


p/s: As for another criticism of being a spam website to draw
advertisements. Let's just say that it is so insignificant that right
now my account still shows a balance of zero. Luckily I don't depend on
it for a living. :D

Cheers!
 
G

gustin

does Tudbc support Visual FoxPro tables?

I"ve been searching for a good way to write back to VFP with Ruby for
awhile (the dbf gem does a great job reading from).

thanks,
gustin
 
P

Post-no-reply Tudbc

Gustin said:
does Tudbc support Visual FoxPro tables?

I"ve been searching for a good way to write back to VFP with Ruby for
awhile (the dbf gem does a great job reading from).

thanks,
gustin

On Sep 15, 12:50�am, Post-no-reply Tudbc <[email protected]>

It doesn't now. But TUDBC is designed for you to extend to support
virtually any DBMSes.

I don't have FoxPro myself, but I can give you some pointers. Here are
the steps to extend for FoxPro:

For FoxPro, because it is older, so my guess is the best route is to go
through ODBC, and also because there is already support for Access ODBC,
which should be similar enough that making it to work for FoxPro will
require very minimal effort. (It looks like ODBC should also give you
access to INSERT and UPDATE SQL which are for writing back to FoxPro.
You should be able to user AutoGenerateIDs as well.)

If you don't have ODBC driver for FoxPro, you can download from
Microsoft website (search for "foxpro odbc" in google and you will see).

Which Ruby are you using?
* If you're using original Ruby, then you look at the Ruby source for
ODBC. (You also need the latest version of Ruby ODBC driver from
http://www.ch-werner.de/rubyodbc/. The binary version on their website
is outdated and does not work properly, so you need to compile the
latest on your own. Let me know if you need the binary that I compiled.)
* If you're using JRuby, then look at DOTNET source for ODBC.
* If you're using IronRuby, then look at Java source for ODBC.

Then look at the file for Access ODBC, and create a class similar to it
for FoxPro ODBC.

Load your new class in TUDBCConfig_PreferredNative_AllProviders (for
original Ruby, this class is stored in the file called
TUF_TUDBC0_Ruby.rb).

You can just do this thru learning-by-example, because you will see
similar codes there.

Then you should be ready to go by.

How to use TUDBC after that? Watch speed-thru video to learn how to use
TUDBC Assistant, and then use TUDBC Assistant to generate codes for you.
Done.


To be fair, you can do access FoxPro with or without TUDBC. But by using
TUDBC, it will not require you to learn RubyODBC, which is relatively
harder to learn, compared to the clean implementation of TUDBC. TUDBC
also allows you to switch to other DBMSes in the future without change
of codes.


Let me know via support@xxx email if you need RubyODBC binary or if you
run into trouble.


Have fun!
 
D

David Masover

David Masover wrote:

Well, history always shows that people tend to not believe in any new
paradigm when they first surfaced. Didn't we say the earth was not
supposed to be round?

Extraordinary claims require extraordinary proof.
There is extraordinary proof that the world is round, and not flat.

But I'm talking more about the arrogance of assuming that *YOU* have developed
an earth-shaking, paradigm-shifting concept. A lot of people say that. Not a
lot of people can actually back it up.
Well, the source codes for TUDBC are available for
download, you can see them and try them yourself, then make your
judgment.

With a free registration barrier and a license barrier in the way. Which means
it's going to be a hassle to even get the code, and possibly a hassle to
discuss it later, if I want to cite snippets as an example of how bad (or
good!) it might be.

I'm curious: Why did you choose to release it this way?
I am currently writing an academic research paper about the overall
architecture, and definitely I will share that when I am done.

Even academic research papers have abstracts. Is your caching technique so
complex that it can't be explained in 100 words or less? If not, it might be
good to include that explanation when you talk vaguely about a new caching
technique.

If, as you say, you're not selling the product, I can only assume that your
goal is wide adoption. This would lead to quicker adoption of these caching
techniques, if not the whole program -- and possibly, quicker adoption of the
program.

But if it really is that complex, it's also that much harder to prove correct.
Excellent question! This is part of the so-called new paradigm.

When you get an instance of SqlCommand (an example in .NET for
SQLServer), it is always generic, which could be a INSERT or SELECT or
any other SQL statement in it. Not any more in TUDBC, you always get
exactly the specific SQL statement you want to work with.

Are more complex queries supported, then? Like nested selects?

For example:

delete from users where (select count(*) from groups where groups.user_id =
users.id) = 0
Why is generic statement bad? You cannot enforce what it should or
should not do. Let's say it is an INSERT statement, ADO.NET does not
prevent you from writing codes to try to get a DataReader (like a result
set) out of it, although we shouldn't and only at run-time it will cause
error.

Then, what about:

insert ...; select ...

Interesting, thanks for that explanation.

I'm still not entirely sure I see the use, though -- mostly because I can't
imagine a case where I would be using an insert when I meant to select. If it
somehow did manage to happen, it would almost certainly be caught by a unit
test.
Why is it called "super strongly-typed"? We already defined what is
"strongly-typed". In fact, SqlCommand is "strongly-typed" already, but
it is still generic in what it repesents inside. So I coined a new term
that means it is stronger than the traditional sense of
"strongly-typed".

What you've done is, you've made the return value of a SQL statement more
strongly typed. That's something else you could put as a simple, <100 word
explanation of what "super strongly typed" means.
I guess I should should explain more about what I mean.

Actually, Ruby is still a strongly-typed language that doesn't require
you to declare the type in advance.

True.

What that adds up to is, type checking is largely at runtime, not at compile
time (or IDE-time). Which means that "strongly-typed" SQL already more than
handles the typical Ruby need for types.
I admit that the super strongly-typed characteristic only applies to
strongly-typed languages in theory. But I beg to diff, because it can
also be enforced or helped by good IDEs to ease development.

That's another place you're at odds with the majority of the Ruby community.
The closest thing most Rubyists seem to use is TextMate, which is a really,
really nice text editor, but not quite an IDE.
That's why it is called super strongly-typed, and that's why it is
called a new paradigm, because it has never been done this way (I think,
or at least in any of the existing database APIs).

And I would call it a new feature. Not a bad feature, but if that's your new
paradigm, you've overhyped it by quite a lot.
p/s: As for another criticism of being a spam website to draw
advertisements. Let's just say that it is so insignificant that right
now my account still shows a balance of zero. Luckily I don't depend on
it for a living. :D

Spam doesn't require money. I also file chain letters as "spam" -- you know
the kind; "If you forward this message to ten people in the next ten minutes,
you'll win the lottery! But if you don't, you'll lose your life savings!" No
one profits from these, but I still consider them spam.
Hopefully I do dispel some of your misconceptions about TUDBC.

Thanks for taking the time.

Something to remember: As savagely as I might attack your work, or your ideas,
it's not saying anything about you. I don't know you, so I can't hate you.
So, don't take it personally.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top