Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 28th, 2004, 06:20 AM
Micsu Micsu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 3 Micsu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Incompatible FireBird and InterBase??

Hi.

We are using the free version of InterBase for 3 years. It is v601 on both windows and linux. There are some serious problem so we think that it would be better to change to FireBird. The main problems are:
1., The gdb file (database file) size is 2 GB. The InterBase runing on windows can use the file but the InterBase on linux has the next error message "File size too large." while we try toto connect to the gdb.
2., There are many times the next message on the client application: "violation of primary key....". This is very exciting because the application execute a command to insert a row into a table and this table's primary key is an autoincrement field with a trigger and a generator. So how the hell can be this kind of error message?

The database has 240 tables, 204 stored procs, 362 triggers...

Do U think that is this a good idea to change the database server from interbase to firebird?

If we change the database server the client application will be able to work correctly? Is there anything to modify in the gdb?

I mean I tried FireBird of course! That is why ask U.
I have some querys which can run on interbase but not on firebird.
That means InterBase and FireBird are not compatible 100%!

Some examples of problems querys:

1.,
SELECT e.EGYSEG_HK,
(select max(ceg) from params where egyseg_azon = e.egyseg_azon)
from egyseg e
where egyseg_tip = 'N'
group by e.EGYSEG_HK

This can run on InterBase, but on FireBird there is an error msg:
"Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause)."
In FireBird I have to use the SUM agregate function for the second field of the select.

2.,
SELECT *
FROM egyseg e
join dolgozo d
on d.egyseg_azon = e.egyseg_azon
WHERE EGYSEG_AZON = 'LV'

In FireBird I have to use the alias for field egyseg_azon after the where.
The FireBird's error msg is:
"Ambiguous field name between table EGYSEG and table DOLGOZO .
EGYSEG_AZON."

3.,
SELECT MT_AZON,
sum(RM_BRUTTO)
FROM RM
GROUP BY MT_AZON
ORDER BY RM_BRUTTO

This can run on InterBase, but on FireBird there is an error msg:
"Invalid expression in the ORDER BY clause (not contained in either an aggregate function or the GROUP BY clause)."
In FireBird I have to use the order by like this: "ORDER BY 2"

After all that is my main questioin:
Where can I found a list of incompatibility InterBase and FireBird?


Thanks.

Reply With Quote
  #2  
Old April 28th, 2004, 07:47 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,824 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 1 Day 8 h 35 m 21 sec
Reputation Power: 278
I don't know of an Interbase-Firebird incompatibility list, but, from my (Oracle - MsSQL mainly) point of view Firebird's syntax is more strict but much more accurate!

Reply With Quote
  #3  
Old July 13th, 2005, 03:59 PM
NE1410S NE1410S is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 1 NE1410S User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 2 sec
Reputation Power: 0
I have noticed the same problem with firebird that you post under problem with group by clause ... the only way that I have found to work around it is to do:

SELECT COALESCE(MAX(SD.uniid), 0), DT.jobno, LT.unid
FROM detlentr DT
LEFT JOIN ledgertrans LT
ON ( DT.unumber = LT.sourceid )
LEFT JOIN shipdetl SD
ON ( DT.jobdetno = SD.jobdetno )
GROUP BY DT.jobno, LT.unid ")

if I leave LT.unid out of group by clause then I get the same error you were getting but if I include LT.unid in group by clause it works ... Hope this helps and maybe someone has an explanation for it or better work around.

Reply With Quote
  #4  
Old July 14th, 2005, 03:33 AM
egidy egidy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 166 egidy User rank is Private First Class (20 - 50 Reputation Level)egidy User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 15 h 49 m 31 sec
Reputation Power: 5
""violation of primary key....". This is very exciting because the application execute a command to insert a row into a table and this table's primary key is an autoincrement field with a trigger and a generator"

well - I know that sometimes Interbase generators can change their values aribtrarily (I don't know whether it is an bug, but it certainly occures when the Interbase datapage is too small for containing all the generators in database in one page) - so check the current values of generators and - possibly the second problem will end.

Regarding the first problem - db can be organized in multiple fiels, I have heard about 35 GB large Interbase databases

Reply With Quote
  #5  
Old July 14th, 2005, 05:55 AM
SilverDB's Avatar
SilverDB SilverDB is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Romania
Posts: 173 SilverDB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 45 m 53 sec
Reputation Power: 4
Send a message via Yahoo to SilverDB
Quote:
2.,
SELECT *
FROM egyseg e
join dolgozo d
on d.egyseg_azon = e.egyseg_azon
WHERE EGYSEG_AZON = 'LV'

In FireBird I have to use the alias for field egyseg_azon after the where.
The FireBird's error msg is:
"Ambiguous field name between table EGYSEG and table DOLGOZO .
EGYSEG_AZON."

Selecting ALL the columns of the 2 tables gives you that ambiguous field error ... you SHOULD only select the required fields (that is a major query design error unless you actually need all the records) and also try this:
Code:
SELECT D.EGYSEG
....
FROM
....
you can also use inner join / left join and right join ...

Quote:
3.,
SELECT MT_AZON,
sum(RM_BRUTTO)
FROM RM
GROUP BY MT_AZON
ORDER BY RM_BRUTTO

Here you can avoid the error by selecting the RM_BRUTTO ... example:
Code:
SELECT MT_AZON
, RM_BRUTTO
sum(RM_BRUTTO)
FROM RM
GROUP BY MT_AZON,RM_BRUTTO
ORDER BY RM_BRUTTO


Anyway ... you should expect some language improvements in FireBird and in time you will see their advantage too
__________________
If i've been helpful, please add to my reputation.
My unfinished site: http://www.dever.ro

Reply With Quote
  #6  
Old December 3rd, 2005, 09:00 PM
Roytsganda Roytsganda is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2005
Posts: 1 Roytsganda User rank is Private First Class (20 - 50 Reputation Level)Roytsganda User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 9 m 30 sec
Reputation Power: 0
Experience of Interbase to Firebird migration

After all that is my main questioin:
Where can I found a list of incompatibility InterBase and FireBird?


Thanks.[/QUOTE]


We recently converted our InterBase 6.01 application to Firebird 2.0 Beta and kept a record of differences and their effect on our conversion process.

Before we started, we searched for any migration guidance document on the web and did not find any one summarizing document, so we decided to keep a record and make it available to others who might want to tread the same path.

If you are considering InterBase to Firebird conversion you can find our notes at
http://www.topicscape.com/InterBase_Firebird_migration/IB2FB.php

Roytsganda
Comments on this post
pabloj agrees: Thanks for the valuable infos

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Incompatible FireBird and InterBase??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway