Re: renaming columns
Andrew McIntyre wrote: After Derby was open sourced, rename and drop of columns quickly became one of the most voted for items in JIRA, probably because most other database systems support it. A volunteer chipped in and now both rename and drop have been reimplemented in the trunk (thanks, Bryan!) and will be available in the next feature release. these are excellent news! I am very much looking forward to the new release then!!
Re: renaming columns
Ralf Wiebicke wrote: Hi! I try to rename a column using the following statements: create table t (a int) rename column t.a to b The second statement throws an exception: [Error Code: 3, SQL State: 42X01] Syntax error: Encountered column at ine 1, column 8. Although this feature is not yet documented, according to this bug entry: http://issues.apache.org/jira/browse/DERBY-1490 this should work since subversion revision 472708. I'm using version 10.2.2.0 - (485682) which is later. When I look at the diff for revision 472708, this seems to be, what I want. Any ideas? The release note for 10.2 does not mention that rename column has been added. Note that 10.2.2 is made from another svn branch than the development branch (trunk). Revision numbers on different branches are not directly comparable. -- Øystein
Re: renaming columns
hi, then why it's described in the reference manual http://db.apache.org/derby/docs/10.2/ref/ref-single.html#crefsqljrenamestatements btw: it doesn't work for me either... i'm using also 10.2.2.0 cheers. On Fri, 2006-12-29 at 13:22 +0100, Øystein Grøvlen wrote: Ralf Wiebicke wrote: Hi! I try to rename a column using the following statements: create table t (a int) rename column t.a to b The second statement throws an exception: [Error Code: 3, SQL State: 42X01] Syntax error: Encountered column at ine 1, column 8. Although this feature is not yet documented, according to this bug entry: http://issues.apache.org/jira/browse/DERBY-1490 this should work since subversion revision 472708. I'm using version 10.2.2.0 - (485682) which is later. When I look at the diff for revision 472708, this seems to be, what I want. Any ideas? The release note for 10.2 does not mention that rename column has been added. Note that 10.2.2 is made from another svn branch than the development branch (trunk). Revision numbers on different branches are not directly comparable. -- Øystein
Re: renaming columns
Note that 10.2.2 is made from another svn branch than the development branch (trunk). Revision numbers on different branches are not directly comparable. [slap-on-forehead] Thanks for the hint. I'm wondering, that such a fundamental feature is not yet available in the latest release. I noticed derby, because its included in Java 6. So I thought, it's mature enough to support it in my project. All other databases I use do support renaming columns. I'm not yet sure, whether I want to work around this problem, or wait for the next release. Best regards, Ralf.
Re: renaming columns
sorry, my fault. i was looking at the same time the latest alpha version of the documentation that includes column renaming, but 10.2 not. http://db.apache.org/derby/docs/dev/ref/ref-single.html#crefsqljrenamestatements then why it's described in the reference manual http://db.apache.org/derby/docs/10.2/ref/ref-single.html#crefsqljrenamestat ements This link does not describe renaming columns, but tables and indexes. Renaming tables works for me. cheers.
Re: renaming columns
I was recently extremely disappointed and annoyed too, as I could not believe, that such a fundamental feature is missing; what's even worse is the fact, that deleting of rows is not possible (can you imagine that, when you worked with mySQL, PostgreSQL, hsqldb, ... before??) and so on. I would highly recommend you check the alter table syntax and think of the consequences, when you use the current version. So when you have to do minor modifications on the schema you are actually often in deep sh... because all workarounds are unbelievably laborious (check out the tips I received recently). This is terrible, particularly when you are working on the database schema in development time. However, this is nothing you want to do if you want to keep some kind of efficiency in development, and it is also not a risk I want to take in case I have to restructure a running database instance. *I* am listening to the newswire and hope for the next release, but for now, I changed back th hsqldb and I am monitoring H2. best greetings Alex Ralf Wiebicke wrote: I'm wondering, that such a fundamental feature is not yet available in the latest release. I noticed derby, because its included in Java 6. So I thought, it's mature enough to support it in my project. All other databases I use do support renaming columns. I'm not yet sure, whether I want to work around this problem, or wait for the next release. Best regards, Ralf.
Re: renaming columns
Stanley Bradbury wrote: Ralf Wiebicke wrote: Note that 10.2.2 is made from another svn branch than the development branch (trunk). Revision numbers on different branches are not directly comparable. Hi Ralf - I'm glad to see that you are taking Derby for a test drive. Being included in latest JAVA release will introduction Derby to a much wider audience than ever before. One thing that you and others will notice about Derby is that it is not just a database of a different color, notably it has a very small footprint and so lacks some out-of-the-box features of larger, mainstream systems. This can cause some frustration. A little background will help you understand and possibly anticipate some of the differences between Derby and other databases. The software was first released in 1997 by Cloudscape Inc. as a product called JBMS. In his article / tutorial Pan Pantziarka provides a brief history of the software at: http://www.regdeveloper.co.uk/2006/11/08/java_database_derby/ JBMS (later renamed Cloudscape) was designed primarily for embedded use hence the lack of features (thought of as administrative) such as RENAME, GRANT/REVOKE, etc. The underlying engine, however, is very solid and easy to deploy and use. Currently many of these useful features are being added by the Derby development community with minimal impact of the software footprint. And, as you can see from the following list of software, Derby in it's current state is the choice on many software projects because of it's portability and ease of use in production environments: http://wiki.apache.org/db-derby/UsesOfDerby In the meantime, even though these differences can prove frustrating, I hope you will keep your eye on the product and provide additional feedback on the features you consider important but lacking in Derby. I personally don't mind the limitations and sometimes welcome them. They force me to be more forward thinking in my db design. And for most things Derby is perfect, I use it most often for quick prototyping and proof of concept builds. Then when it comes time to build out production systems I will often move to a larger Database product. I often find that Derby works fine even in production environments. You just have to think ahead about what changes to the structure could happen down the road. Paul
Re: renaming columns
Paul J DeCoursey wrote: I personally don't mind the limitations and sometimes welcome them. They force me to be more forward thinking in my db design. And for most things Derby is perfect, I use it most often for quick prototyping and proof of concept builds. Then when it comes time to build out production systems I will often move to a larger Database product. I often find that Derby works fine even in production environments. You just have to think ahead about what changes to the structure could happen down the road. Hm... there are some advantages Derby has (mainly considering ACID), but considering your scenario I really wonder why you would want to accept this considering there are systems like hsqldb and H2 and One$DB that offer these features with some drawbacks (hsqldb) that are mainly relevant for production systems??? this I do not get. I actually want(ed) Derby because I could also use it in the production system, but this is obviously not such a good idea at the moment... Alex
Re: renaming columns
Alexander Schatten wrote on 29.12.2006 17:21: I was recently extremely disappointed and annoyed too, as I could not believe, that such a fundamental feature is missing; what's even worse is the fact, that deleting of rows is not possible (can you imagine that, when you worked with mySQL, PostgreSQL, hsqldb, ... before??) and so on. You probably meant deleting of *columns* is not possible, right? Because deleting of *rows* using the DELETE statement works fine for me. Thomas
Re: renaming columns
On 12/29/06, Ralf Wiebicke [EMAIL PROTECTED] wrote: I'm wondering, that such a fundamental feature is not yet available in the latest release. I noticed derby, because its included in Java 6. So I thought, it's mature enough to support it in my project. All other databases I use do support renaming columns. I'm not yet sure, whether I want to work around this problem, or wait for the next release. Before the decision to open source Cloudscape as Derby had been made, an effort was already underway to make its SQL syntax more compatible with DB2 UDB. The DB2 UDB version which was current at the time, v8, did not support renaming or dropping columns. After Derby was open sourced, rename and drop of columns quickly became one of the most voted for items in JIRA, probably because most other database systems support it. A volunteer chipped in and now both rename and drop have been reimplemented in the trunk (thanks, Bryan!) and will be available in the next feature release. There are several workarounds which have been posted in previous threads. As an interesting side note, DB2 UDB v9 now has drop column support, but still no rename column. :-) cheers, andrew