473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Need help in Design

I am developing an application which need to support various data sources
like SQL Server, Access, Oracle etc

I am in search of a design pattern which will best suit my requirement.

Can somebody help me in that ..
--
Rahul Deshmukh
MCP - SQL Server 2000
Nov 16 '05 #1
2 966
Rahul,

A bit more information on what you want to do would help, but assuming you
are performing the same operations on different types of databases you could
use Template Method. This has an abstract base class that defines the steps
with the derived classes providing the implementation for those steps:

abstract class DataSource
{
abstract public void Open();
abstract public void Process();
abstract public void Close();

public void Run()
{
Open();
Process();
Close();
}
}

class SqlDataSource : DataSource
{
public override void Open()
{
// SQL specific implementation
}

...
}

--Liam.

"Rahul" <Ra***@discussions.microsoft.com> wrote in message
news:FD**********************************@microsof t.com...
I am developing an application which need to support various data sources
like SQL Server, Access, Oracle etc

I am in search of a design pattern which will best suit my requirement.

Can somebody help me in that ..
--
Rahul Deshmukh
MCP - SQL Server 2000

Nov 16 '05 #2
You may be interested in one of the talks presented at OOPSLA a couple of
months ago... this one by Joe Hummel, a CS Professor. He was discribing how
the use of the factory method pattern can be useful in not only teaching OO,
but creating a good structure for encapsulating database access... in .NET
of all things.

Here's a link. Sounds right down your alley:
http://campus.lakeforest.edu/~hummel/_talks.htm

--- Nick

"Rahul" <Ra***@discussions.microsoft.com> wrote in message
news:FD**********************************@microsof t.com...
I am developing an application which need to support various data sources
like SQL Server, Access, Oracle etc

I am in search of a design pattern which will best suit my requirement.

Can somebody help me in that ..
--
Rahul Deshmukh
MCP - SQL Server 2000

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Matt Stanley | last post by:
I am trying to build a page that scales to fit the browser window regardless of size or resolution. The navigation on the top of the page is framed in dark red/brown using CSS with a background...
39
by: Steven T. Hatton | last post by:
I came across this while looking for information on C++ and CORBA: http://www.zeroc.com/ice.html. It got me to wondering why I need two different languages in order to write distributed computing...
9
by: sk | last post by:
I have an applicaton in which I collect data for different parameters for a set of devices. The data are entered into a single table, each set of name, value pairs time-stamped and associated with...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
7
by: Jack Addington | last post by:
I've got a fairly simple application implementation that over time is going to get a lot bigger. I'm really trying to implement it in a way that will facilitate the growth. I am first writing a...
2
by: David | last post by:
SUMMARY: If you don't want to read all of this, what I'm looking for more or less is ideas on how to implement websites using ASP.NET that have a templated look and feel and many pages that make...
3
by: vijaykokate | last post by:
Our company http://www.softnmation.com/ offers its customers a great variety of products. Everything you need can be found in this site. Web Template, CSS Template, Logo Template, Corporate...
2
by: Bob Heitzman | last post by:
I need to store data in, update, and read data from an XML file. An INI structure worked fine: a= 123 b= xyz c= etc
18
by: bsruth | last post by:
I tried for an hour to find some reference to concrete information on why this particular inheritance implementation is a bad idea, but couldn't. So I'm sorry if this has been answered before....
2
by: jmDesktop | last post by:
I'm using C#, but I don't know that it matters for this question. I know that many experienced folks are on here, so sorry for being off topic. I am finally at a point where I want to and I think...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.