Hi All, Going through the email archives, I found this thread, which effectively covers the questions I have with respect to inheritance and RDBO (or any OR layer for that matter):
http://www.mail-archive.com/rose-db-object@lists.sourceforge.net/msg00102.html Given that this thread was from a year ago, and RDBO has moved along, where do things stand now? What's the conventional wisdom? I'm looking heavily at RDBO for a pretty major overhaul of a site I'm working on, and the handling of inheritance is a major problem - we have one major object structure with fairly simple inheritance (e.g. only one level down), but a ton of data - structuring things as to not clobber our database is a big deal. Quoting from the original thread (and dropping option #3, which won't work for our purposes), there are two options: 1. Table per class (aka "union mapping" aka "filtered mapping") a single table with pkey corresponding to the base class, and a table for each subclass table sharing the same pkey. the "base class" table has a discriminant column in addition to its pkey value. pro: optimal storage, and can use "NOT NULL" appropriately con: foreign key to a base class is a little awkward con: query requires a join to get all columns 2. "Table per instantiable class" (aka "horizontal mapping") a table for each instantiable subclass. each table has all columns, including pkey and all inherited columns. There may not be anything to ensure pkey uniqueness across these multiple tables. pro: query by class is easy con: following a foreign key to a base class (can go to any subclass) is awkward When each subclass could contain as many as 5M rows of data, and the sub total could approach 30-50M rows, what approach would you take? Thank you, Peter ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object