Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.databases > #239
| From | "Lew" <lew@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Java Toplink Essentia |
| Message-ID | <cqWdnWKfq97dBlXVnZ2dnUVZ_rCdnZ2d@comcast.com> (permalink) |
| Newsgroups | comp.lang.java.databases |
| References | <ga9fj1$t22$2@localhost.localdomain> |
| Date | 2011-04-27 15:22 +0000 |
| Organization | TDS.net |
To: comp.lang.java.databases nicola wrote: >> In my db there are some tables like >> >> TABLE1_2006 (ID, CODE, VOLUME) >> TABLE2_2007 (ID, CODE, VOLUME) >> TABLE3_2008 (ID, CODE, VOLUME) Martin Gregorie wrote: > Declare a view over all the tables and enquire on that. > > But, why on earth use multiple tables? They don't do anything that a > single table with a YEAR column couldn't do while managing to make at > least one task more difficult as you've just demonstrated. I feel suspicion when I read about inherited tables in a DBMS, such as in Postgres. At first blush the OP's situation seemed to me like an inherited-table scenario. I felt about as I might encountering an escaped specimen from Dr. Moreau's island. I used to feel that way about automated object-relational mapping (ORM) packages, but JPA alleviates that. There is a dichotomy between the world view of object-oriented programming and that of relational database architecture. Inherited tables seem out of place to me - object-oriented monstrosities in a data world. Multiple identical tables are like that also - if the data structures are the same and have the same interpretation, that argues for a single logical table. Martin's suggestion is spot on, and completely harmonious with the data-world outlook. I don't know of a term analogous to "normal form" (as in "third normal form") for excessive splitting of tables into many tables; all the normal forms have to do with insufficient splitting. Advances in the database world occur in how to structure data - relations, normal forms, star schemae, foreign keys, these are the building blocks of DBMSes as classes and objects are of O-O programming. How one structures data for a database is different from how one structures objects for a program. -- Lew --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.databases | Previous | Next — Previous in thread | Next in thread | Find similar
Java Toplink Essential - "nicola" <nicola@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
Re: Java Toplink Essentia "Martin Gregorie" <martin.gregorie@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
Re: Java Toplink Essentia "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
Re: Java Toplink Essentia "Arved Sandstrom" <arved.sandstrom@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
csiph-web