Which comes first?

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

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
 
Hello Mike,
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?

The only correct answer here is probably: it depends.
 
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?

Personally, I prefer to start with classes...
 
Mike said:
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


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
 
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>
 
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

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top