File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Refactoring Databases: help to design ?

 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We could need to refactor a database when we notice that the whole thing does not fit further requirements, or when the original design was simply poor.

Is there any chapter in your book treating about how to make a good design, and avoid common pitfalls ?
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Satou kurinosuke:
Is there any chapter in your book treating about how to make a good design, and avoid common pitfalls ?


We have many good books out there covering your desired stuff.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Are there selling any orange juice in this shop ?"
"Lots of shops are selling any."
Is this an answer ?

I'm sure there are many out there, I'm just asking whether it's covered or not in this particular book
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Satou kurinosuke:
"Are there selling any orange juice in this shop ?"
"Lots of shops are selling any."
Is this an answer ?

I'm sure there are many out there, I'm just asking whether it's covered or not in this particular book


We can put it this way too.

"Apple Juice Corner"
"Are we selling any orange juice in this shop ?"
"Lots of good shops out there."

It looks like a perfect and helpful answer to me. I'm sure, you wouldn't find me offensive.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sure, you wouldn't find me offensive.

Not at all

"Apple Juice Corner" says it all. A book title does not.
A book called "Refactoring" could contain :
1. Intro
2. Refactoring
3. How to avoid common smells

I would like to know if number 3 is also in the book.
If you happened to have read it, could you please tell me ?

I think that I have most trouble to decide how to design tables first.
After the design, I'm using it and I find myself in a situation where I should have done it another way. I can refactor. But that could have been avoided.

Ok, reading a book on DB refactoring should undirectly teach about what not to do. I'd better go buy some juice
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Satou kurinosuke:
Ok, reading a book on DB refactoring should undirectly teach about what not to do.


Indeed.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually prior to this book we dont have any book about database refactoring, or better say any good book incase if there are few not known to me. So I guess we would find related stuff in this book, related to database refactoring.

There might be some kind of tips to come up with a good design given in the book but I believe if you are really interested in how to make a good design then you had better off go for some other good books. Which are relatively more relevent. Inspite of, design database and refactoring database are related to eachother. But a design book would be more appropriate and straight forward for the one looking this book for learning good designs.

Haven't read the book. Just playing hmmmm... juices .
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Satou kurinosuke:

Is there any chapter in your book treating about how to make a good design, and avoid common pitfalls ?


There is one short chapter about "database design smells".

And of course the whole point of refactorings is about improving the design while avoiding common pitfalls, so I'd say, yes, in that sense the whole book is about it.

But I'm not sure whether that really answers your question...?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But I'm not sure whether that really answers your question...?

It does ! Thank you very much
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As an aside, I originally learned the basics of OO design from Martin Fowlers "Refactoring" book. I guess in principle database refactorings could provide a similar experience...
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've actually learned a lot myself too with "Refactoring to Patterns". I guess that new book on db refactoring will be enlightening too.
 
Peer Reynders
Bartender
Posts: 2933
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Satou kurinosuke:
I think that I have most trouble to decide how to design tables first.

If you are determined to resolve that situation go and have a look at Terry Halpin's Object Role Model (ORM).
I left some links in this topic.
If you google around you may find quotes like

It works great, but you throw away the diagrams and just use the sentences after awhile. What drives people nuts is that it takes longer to do ORM than to splash up an ER diagram. But you will get it right, which is not guaranteed by ER."

Just be warned: Terry Halpin's MSDN article reads like it was written by someone way too familiar with the subject matter; he makes assumptions that aren't apparent to a neophyte. And his book can be equally frustrating because he uses concepts before he defines them; this could be alleviated by a good glossary or index, but those don't deliver either - so you are basically committed to reading the book twice.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've read the PDF sample and it seems like a pretty heavy lad
Thanks for the link Peer.
 
Scott Ambler
author
Ranch Hand
Posts: 608
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. As you can see in the description for the book in the first chapter we cover Agile Model Driven Development (AMDD) (and other things) which could potentially help you to design your db well.

However, regardless of the notation used, if any, there are never any guarantees. It is always up to the skills of the people involved as to how well you "get it right" to begin with. The important thing with database refactoring is that now you have a safe way to evolve your schema on the off chance that requirements change or that you're not a super-human modeler who is perfect in every way.

- Scott
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic