| To: | users@xxxxxxxxxx |
|---|---|
| Subject: | Re: [cinjug-users] DbUnit and Hibernate |
| From: | "Edward Sumerfield" <esumerfd@xxxxxxxxx> |
| Date: | Wed, 9 Aug 2006 09:42:23 -0400 |
| Delivered-to: | mailing list users@cinjug.org |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=MRGXx2UbmwoPBduxdqpuJmufWA4rHOQV9NK/u3gjdJfSsgL+2hyBkk2CNe33jV3LJf6YE2gVP8StEfqhYgLxookaD1dgVGwky1laan0XN3rt+Gqb31ozGzorH+/phMReUmJXt3HJzIP7fzl38X+HI7doj4bKqlnU6vxc8mVz6pc= |
| In-reply-to: | <000c01c6bb40$5234a240$6401a8c0@CARMANI9300> |
| Mailing-list: | contact users-help@cinjug.org; run by ezmlm |
| References: | <6a216ba20608081444q7f25cd48q633f82828d1fdb82@mail.gmail.com> <000c01c6bb40$5234a240$6401a8c0@CARMANI9300> |
| Reply-to: | esumerfd@xxxxxxxxxxxxxx |
|
That's interesting, I didn't know that. So from an editability perspective we can compare XML, Excel and now SQL. None if which ends up being very good. XlsDataSet.write(dataSet, file); I can confirm that Excel sucks completely. While it might sound convenient, each table is a separate sheet and there is no way to find a sheet by name. Same as columns. With massive numbers of columns in a table it is painstaking to find the right one. XmlDataSet.write(dataSet, file); XML is better because you can at least find the table and column names in a text editor but there are some downsides. This XML format encodes tables as tags and columns as attributes and is the easiest to edit. However, it doesn't give you manageable foreign key errors at load time so is next to impossible to get right after the export. FlatXmlDataSet.write(dataSet, file); The flat XML format uses a "table" tag with name attribute followed by a list of "column" tags that contain the column names. This is followed by lists of value tags that are assumed to be in the same order as the column tags. Anyway, for tables with lots of columns this makes it really hard to find the value to edit. This format does, however, give us the good foreign key errors. <dataset> <table name="customer"> <column>A</column> <column>B</column> <column>C</column> <row> <value>something</value> <value>something else</value> <null/> </row> </table> </dataset> SQL. This format is going to require that we get the data into hsqldb before it can be saved to the file. This means we need an intermediate format that can be edited. To the testing issue of load, save and replace between tests, I am not sure. Yes, the ant integration would work fine but I can't see how I could integrate it into an eclipse test. We could take the intermediate solution of using a junit base class to do the creation and the setup to do the replacement, so at least the db is only being loaded once per test class. On 8/8/06, James Carman <james@xxxxxxxxxxxxxxxxxxxx> wrote:
-- Ed |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Vaiggra and Vi-Kodin Offer, Eugenio Blue |
|---|---|
| Next by Date: | Vaiggra and Vi-Kodin Offer, Sonny Mcginnis |
| Previous by Thread: | Re: [cinjug-users] DbUnit and Hibernate, James Carman |
| Next by Thread: | RE: [cinjug-users] IDE Warning - Parameter value should not be assigned, Forsythe, Brian |
| Indexes: | [Date] [Thread] [Top] [All Lists] |