Home » Developer & Programmer » Designer » Advice on views (Oracle 10i, Solaris 10)
Advice on views [message #529512] Tue, 01 November 2011 11:54 Go to next message
clancypc
Messages: 36
Registered: December 2006
Member
Hi,
I am thinking of using views as a way of consolidating some data structures that I need to store. I have some data structures, 14 in total, that have some common elements between them, but also have elements that are unique to each structure. My first thought was to create a consolidated table of all the elements in all the structures, but that would leave for each record some wasted fields in each record. My second thought then was to store the data each in its own table (no wasted space) and then to create consolidated views using the common elements from each table. I would appreciate a second opinion on this train of thought.
If you need specifics on the data fields involved please let me know.
Thanks
Re: Advice on views [message #529517 is a reply to message #529512] Tue, 01 November 2011 12:23 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why would the 3rd normal form not be OK?
Re: Advice on views [message #529686 is a reply to message #529517] Wed, 02 November 2011 09:12 Go to previous messageGo to next message
clancypc
Messages: 36
Registered: December 2006
Member
The data doesnt really lend itself well to normalisation, it is as basic as it is going to get. There is commonality between the 14 different record types such that you could define a parent record table, with child tables being created to hold the specific elements unique to each record type. The difficulty with that will be defining the primary key of the parent record sufficiently to identify it in the child record. At the moment I think you would need to define 3 columns as the primary key of the parent record. It could work I suppose.
Re: Advice on views [message #529689 is a reply to message #529686] Wed, 02 November 2011 09:19 Go to previous message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Quote:
I think you would need to define 3 columns as the primary key of the parent record.
Why would this be a problem? If you really don't want a compound key, then you could link the tables with a surrogate key. But that throws you into the whole debate of surrogate versus natural keys, which some people get really upset about.
LF is right: 3NF should be the starting point for any data that can be stored in two dimensional tables. Of course, you may need to compromise the 3NF model later - but that should usually be the exception to the rule.
Previous Topic: schemester question
Next Topic: Database Design
Goto Forum:
  


Current Time: Thu Mar 28 07:57:47 CDT 2024