Re: Regarding Database Design
Date: Mon, 11 May 2009 18:21:43 +1000
DeB <debashish.majumdar_at_gmail.com> writes:
> Hi Faculties,
> Please accept my apologies if this query is out of context of the
> discussions in this forum.
> I've with me a proposed database design which is not normalized
> fully. There are some other tables that we plan to denormalize. The
> targeted database platform is Oracle Database 10g Release 2.
Why on erth do you want to de-normalise a db that is in a normalised form?
> For ex:- We have a table called user_groups which links the users
> and the groups table. But now we are thinking to eliminate this table
> and have a group_ids column storing comma separated values of groups
> ids from the groups table instead.
This sounds like a very bad idea to me. However, not really knowing exactly how you intend to use the data, I'm only guessing.
> The records will look like -
> group_id group_name
> 1 Admin
> 2 Operator
> 3 Power User
> user_id user_name group_ids
> 1 User1 1,3
> 2 User2 2,3
> The targeted database will be a typical OLTP system. Please suggest
> if this approach to database design has any fundamental flaws.
Well, apart from basic relational database theory that recommends normalising rather than de-normalising your data, I'd ask
- How do you plan to enforce any referential integrity?
- How do you imagine using the data. For example, if you had the requirement to retrieve all users in group 2, how would you structure that query efficiently?
- Why do you believe this change will make things better than they currently are? Is there a real problem your trying to solve or is this just an imaginary issue?
- Depending on design, you may run into data conversion issues (assuming the original values are NUMBERs, your new design will need to convert to a character type, such as VARCHAR2.
From the little you have provided and not really knowing exactly how the data is used, its difficult to give a definit yes/no answer. However, I'd suspect that if your considering doing tis, then the data itself may not really be necessary at all - I mean, does having this data really provide you with anything - if not, rather than create a nightmare, get rid of the data or leave it in its normalised form.
Basically, sounds like madness to me.
You need to provide rationale as to why you think this is a good idea. From what you have provided, it seems to be at best pointless and at worst a very bad idea.
-- tcross (at) rapttech dot com dot auReceived on Mon May 11 2009 - 03:21:43 CDT