Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / August 2007

Tip: Looking for answers? Try searching our database.

Which comes first?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 30 Aug 2007 22:43 GMT
Which comes first?  The database schema or class design?

I'm used to developing the database tables and fields based on the
functional requirements of an application, so it makes sense to me to model
my objects on the database schema, and their methods on the SQL/stored
procs.  Most of what I read suggests starting with the class.  Am I doing it
wrong?

Mike
Jesse Houwing - 30 Aug 2007 22:50 GMT
Hello Mike,

> Which comes first?  The database schema or class design?
>
[quoted text clipped - 3 lines]
> SQL/stored procs.  Most of what I read suggests starting with the
> class.  Am I doing it wrong?

The only correct answer here is probably: it depends.

--
Jesse Houwing
jesse.houwing at sogeti.nl
Mark Rae [MVP] - 30 Aug 2007 22:56 GMT
> Which comes first?  The database schema or class design?
>
[quoted text clipped - 3 lines]
> SQL/stored procs.  Most of what I read suggests starting with the class.
> Am I doing it wrong?

Personally, I prefer to start with classes...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Smithers - 30 Aug 2007 23:52 GMT
> Which comes first?  The database schema or class design?
>
[quoted text clipped - 5 lines]
>
> Mike

General advice that I've heard over the years is this: Design from the top -
down; build from the bottom - up.

Personal preference: When starting with a new client/project, I start with
the database schema. As I identify and document the major entities, I will
learn a whole bunch about the business/industry/client. The class design
soon emerges thereafter - but isn't usually a direct reflection of the DB
schema - and in some cases, not even close (especially in cases of more,
rather than less, normalized db designs). Of course if you do a good job of
normalizing the database early on, and designing your classes, it will be
relatively easy to make adjustments later - so don't waste too much time
trying to perfect it on the first shot. Verify - as you go - that you get
close, document important decisions, get buy-in, and move on. You can't
really go "wrong" with this sort of approach unless, of course....

:-)

-HTH
Michael Nemtsev, MVP - 31 Aug 2007 02:39 GMT
Hello Mike,

I suppose it depends on many factors, there is no one golden question.
if it's data-centric app - then from schema;
I prefer to start from schema, because the DB is the bottom of your app and
changing the schema is more costly rather regenerating your classes for it.
the advantage of this is that u have the robust and powerfull db schema and
afterthat u can tune it on the conceptual level (with classes)

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

M> Which comes first?  The database schema or class design?
M>
M> I'm used to developing the database tables and fields based on the
M> functional requirements of an application, so it makes sense to me to
M> model my objects on the database schema, and their methods on the
M> SQL/stored procs.  Most of what I read suggests starting with the
M> class.  Am I doing it wrong?
M>
M> Mike
M>
Bond - 31 Aug 2007 12:29 GMT
> Which comes first?  The database schema or class design?
>
[quoted text clipped - 5 lines]
>
> Mike

I had done reasearch on your query, It's Concluded that Class comes
first and then design is mapped with the Classs. so what u think, is
it OK!!!!!!!!!!!

thank you

Jitesh tolar
http://www.intelcs.com/IT-Companies/

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.