943,520 Members | Top Members by Rank

Ad:
Dec 12th, 2008
0

Database reverse engineering problems

Expand Post »
To all fellow geeks and to whom have prior knowledge in database design, I'd like your consultation on several issues I've faced in my project. So first I'll give a brief explanation about the it:

We are supposed to develop the following software:

Semi Automated ER diagram generator

Input:

Meta data (data dictionary) of an existing relational database including:

•Tables' names
•Columns' names
•Constraints:

-Primary key
-Foreign key and the table that it references
Process:

Given the above data the system derives the relational schema of that database (logical model), then applies an algorithm that was based on the heuristics of mapping a conceptual model (ER diagram) to logical model (relational schema).


Output:

ER diagram that represents an approximation of the original ERD that the database was built upon it.


My Dilemma:

1. Normalization: the system we've suggested does not reverse the effect of normalization in the design process. This is based on several reasons:
a. One of the objectives of normalization is to get the optimal grouping of attributes and a solid database free of updates anomalies. So why should I denormalize??
b. In order to normalize we need determine the functional dependencies between attributes which we could not derive them from the metadata. In addition functional dependency is based on semantics that no other than a user expert can define.
2. Is it possible for an entity to be weak for two different entities? If yes, then what is the difference between mapping it and a M : N relationship.
3. If a weak entity is mapped to logical model, is it mandatory to put a determinant as a part of the primary key.
4. I've stumbled on some slides on the internet that explains the process of mapping ERD to logical model and it says that all weak relationships are 1 : M is it true?
5. Last but not least how can I map a sub class that has several super classes(generalization)


The reasons I mentioned above (a and b ) may lack proper scientific explanation, but that was I concluded from what I read and my humble knowledge. But I'm here to acquire a better understanding, to develop better software.

Thanxx for reading my long and tedious post…
I'm counting on you titans of database design around the globe.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Hussah is offline Offline
1 posts
since Dec 2008
Jan 9th, 2009
0

Re: Database reverse engineering problems

To answer a quick question, I cannot understand why you think that you need to de-normalise the data.

An ERD is (or should be) created BEFORE the database. The DB definitions are based upon the ERD and thus the original ERD (or a very close approximation thereof) can be logically deduced from the DB design.

The table positioning and type of the foreign key constraints will show the type of relationship between two entities, though be carefull with those tables which links two others to provide a many to many relationship.
Reputation Points: 33
Solved Threads: 9
Junior Poster
pclfw is offline Offline
132 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: Db structure needed please
Next Thread in Database Design Forum Timeline: Help database design





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC