OOP - a question about database access

From: Tim (nocomment_at_rogers.com)
Date: 10/31/03


Date: Fri, 31 Oct 2003 18:49:07 GMT

If this is the wrong newsgroup, can someone please point me to the
correct one and disregard this.

I've been programming for 20 years but I'm trying to understand OOA and
OOD now. What I've decided to do is try to take a little database I have
that includes a table with a sports league's schedule and try to use
this to develop a little application to help me understand the concepts
and proper techniques of OOA, OOD and OOP.
The columns in the table are date, home team, visitor team and starting
time.
(I'm going to use Java in a JDeveloper environment and the database is
an MSAccess using a JDBC/ODBC bridge)

So, how would you divide the various functions regarding interfaces,
inheritance, etc.

Does the object that represents a game's information have the methods to
connect to the database, execute the query and retrieve the rows from
the resultset or are they done in the calling program or elsewhere? Does
each column have it's own get method or do you pass all of the game's
info to the calling class by a container once retrieved? Do you get all
rows of the result set from one call to the method of the object or do
you use a GetNextRow method and check a return code?
Are the rules for this hard and fast because I've looked around and
there doesn't seem to be anything definite considering this type of
thing must be fairly common.



Relevant Pages

  • Re: Theres got to be a better way
    ... I work with annoyingly complex database tables whose structure ... Programming is all about reinventing the wheel. ... But we're still writing code must like we did 40 years ago. ...
    (comp.lang.php)
  • Re: Theres got to be a better way
    ... I work with annoyingly complex database tables whose structure ... changes as my client changes their requirements, ... Instead of repeatedly writing code to format output from the DB, ... Programming is all about reinventing the wheel. ...
    (comp.lang.php)
  • Re: Theres got to be a better way
    ... I work with annoyingly complex database tables whose structure ... changes as my client changes their requirements, ... Instead of repeatedly writing code to format output from the DB, ... ALways with programming it's bread and butter, ...
    (comp.lang.php)
  • Re: What is .net
    ... software) for installing and running ASP.NET desktop applications and Web ... You just want to learn, and have no experience programming (nothing ... relational database design in general and SQL Server in particular. ... don't ignore the topic of "relational database design" - ...
    (microsoft.public.dotnet.faqs)
  • Re: What is .net
    ... software) for installing and running ASP.NET desktop applications and Web ... You just want to learn, and have no experience programming (nothing ... relational database design in general and SQL Server in particular. ... don't ignore the topic of "relational database design" - ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)