473,394 Members | 1,755 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,394 software developers and data experts.

connecting to SQL database

Hi Folk

I have been asked to create an e-commerce website, where we need to
connect to an SQL database. The database is used to run their POS in
several branches. As this database is on the company server and we are
hosting the website with a webhost we have to solve an communication
issue.

Here are the options that I can see:

a. create a branch like environment on the webserver and then directly
access the branch database (OBDC??)

b. run a script that sucks data from the SQL environment and then ftps
it as a text file to a LAMP server. PHP and Mysql (my preferred
platform), will then notice the new file and do something with it?

c. have a direct OBDC connection between the website and the company's
server

What option do you recommend? What difficulties do you see?

I would love to get some ideas from you and more ideas on the typical
problems.

TIA

Nicolaas

May 10 '06 #1
3 1554
windandwaves wrote:
Hi Folk

I have been asked to create an e-commerce website, where we need to
connect to an SQL database. The database is used to run their POS in
several branches. As this database is on the company server and we are
hosting the website with a webhost we have to solve an communication
issue.

Here are the options that I can see:

a. create a branch like environment on the webserver and then directly
access the branch database (OBDC??)

b. run a script that sucks data from the SQL environment and then ftps
it as a text file to a LAMP server. PHP and Mysql (my preferred
platform), will then notice the new file and do something with it?

c. have a direct OBDC connection between the website and the company's
server

What option do you recommend? What difficulties do you see?

I would love to get some ideas from you and more ideas on the typical
problems.

TIA

Nicolaas


Nicolaas,

Too little information for what you're asking.

What database are they going to have on their company server? Do they want you
to have direct access to this server (possible security issues)? How often is
the database updated? Do they need live data? If not, how old can the data be
and still be valid?

There are any number of possibilities beyond what you're asking. But there's
way too many variables to even have a reasonable list of possibilities.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
May 10 '06 #2
Hi Jerry

Thank you for your reply.

It is a SQL server on their company server. We dont want to talk to it
directly because of security issues. The database is updated daily most
of the time, with some specials going live almost instantly.

Your questions are actually really useful, because they give me more
confidence that I am on the right track.

What else do you like to know?

Thank you

Nicolaas

May 10 '06 #3
windandwaves wrote:
Hi Jerry

Thank you for your reply.

It is a SQL server on their company server. We dont want to talk to it
directly because of security issues. The database is updated daily most
of the time, with some specials going live almost instantly.

Your questions are actually really useful, because they give me more
confidence that I am on the right track.

What else do you like to know?

Thank you

Nicolaas


Nicolaas,

Sorry for the delay; I've been musing on your questions, thinking of the various
options. And I wouldn't necessarily say you're asking the right questions based
on what I asked! :-)

You indicate it's a SQL server. But there are several of them around there,
such as Microsoft's SQL Server, Oracle, DB2, MySQL, Postgres and many others.
What you need to do is going to be based the options available to you - and that
depends on the server.

I can understand the security issues - but many SQL database servers can handle
that. For instance, you can limit external connections to originating from one
IP address only (your web server), and further isolate that to only allow SELECT
requests on specific tables and/or views.

Or if the database supports replication, you can have all or part of it
replicated to another server.

But if they are limiting access to the company database due to security issues,
then you won't be able to suck the data from the database. The transfer will
need to be initiated by the server. Same with an ODBC connection to the server.

IOW, you're going to need to work with the DBA on the server end to discuss your
options and how he wants to allow you to handle it.

And I would suggest you then ask in a newsgroup specific to that database;
you'll get better answers on questions like this, because it really isn't a PHP
question - it's database-related.

And BTW - I typically do not use ODBC for something like this, if there is a
database-specific interface available. ODBC is great for when you don't have a
specific database in mind or it's one PHP can't talk to directly. But being
general-purpose, it will have higher overhead because it has to first translate
your calls to database-specific ones, then call the database. And you won't be
able to make use of features specific to your database.

In your case, you know what database you'll be working with, and if the
interface does exist you can make better use of your database.

Hope this helps.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
May 10 '06 #4

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

Similar topics

4
by: John Morgan | last post by:
I have Enterprise Manager on my local machine. For the last twelve months it has been connecting without problem to my online SQL Server database provided by my ISP. Three weeks ago the ISP...
4
by: CodeImp | last post by:
A simple app I quickly wrote to try getting info from a database. Here is the first part of its code. The rest of the code is irellevant. using System; using System.Data; using...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
5
by: Sebastian | last post by:
I'm using the following code to connect to an access 2000 database. (with reference to adodb) Public DBvar As New ADODB.Connection() DBvar.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data...
3
by: GTDriver | last post by:
I'm trying to connect my application with a web service located on my own web server(localhost). I guess when the solution/proect is built it makes a file called 'Web...
5
by: nielsgron | last post by:
Hi, I have created a database on DB2 8.1 and 8.2 for Windows using the codeset "Big5" with the command: db2 CREATE DATABASE TWBIG5 USING CODESET BIG5 TERRITORY TW When I try to connect to...
5
by: Odd Bjørn Andersen | last post by:
I have installed DB2 9 Enterprise Edition on my laptop and created the sample database. Now I'm having truble connecting to the database from Command Editor. If I connect from Command Window it's...
0
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, I've my win32 application which connecting to my sql database. till now i used MSDE as my database and now i want to upgrade to sql express 2005. after the upgrade i tried to connect to the...
3
by: Sebouh | last post by:
Hi guys. I'm completely new to databases, so i wanna ask you if this is achievable. I've been learning how to connect to an MS SQL database file with java. I've finally learned the basics,...
2
by: bobt1991 | last post by:
I just installed Microsoft Visual Studio 2008 Express edition, and it installs some sort of stripped down version of SQL Server. It comes with no tools for connecting to your "local" database,...
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: 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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.