Database for Online Shopping Site ???

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Database for Online Shopping Site ???

Post by mudkicker »

Hi,

I have a project in my workplace, i have to write a whole online shopping site. But I cannot imagine how the database of this site should be built...
It is a very important project and obviously serious.

Please give me any good information or advice. It will be appreciated.
Thanks,
mudkicker
:?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?: :?:
Unipus
Forum Contributor
Posts: 409
Joined: Tue Aug 26, 2003 2:06 pm
Location: Los Angeles, CA

Post by Unipus »

First piece of advice: don't take the job if you don't think you can do it. I'm working on a very major e-commerce site right now, and I knew from the outset that there would be problems, but I still thought I could do it. There HAVE been problems, and if I hadn't already had at least some decent experience with databases and so forth, and someone far more experienced in that particular area to guide me (in person), there would be very large problems.

I understand it's a tough economy, and people need work wherever they can get, but there's just a never-ending cycle of people taking jobs they can't do. I've done two jobs this year that were just fixing mistakes that 2,3, even 4 different sets of designers/programmers had previously made for the client. Most of this stuff isn't that hard, really... how are there so many people who have no clue successfully selling their services?

(None of that above necessarily specifically applies to you)

As far as practical advice goes, it's difficult to give extremely general advice that will really help you. There are a lot of variables. What's the scale of the site? Is it a couple products, a couple hundred, 20000? How much traffic do they expect to do? Do they have a database or system in place already? Are you expected to replace, supplant, or improve that system? Are you stuck with a given technical specification (server OS, languages, database types, etc)?
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

well, first off, you need to ask the client to give you some info:

* list of features s/he wants
* server info
* number of items
* is there a sample you can see?


the first one is what i always get, makes my work easier and helps the client see what i have done and if it is based on his/her specs or not. + later if the client wants something else added, you can charge them extra beacuse it was not in the oringal documents...

in alot of jobs, the client will ask you to do more then he told you in the start, you can end up doing lot more work for the same price...so a list of features also put a price tag on the job.

server info matters cos you might found out that you could've done soemthing much more quicker...

a sample always helps, why? well, would't you like to teste your food first? see if you like it or not, a sample can sometimes tell you if u can do a job or not.

well, hope that helps
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

mudkicker wrote:But I cannot imagine how the database of this site should be built... It is a very important project and obviously serious.
I agree with what Unipus said.
As a friendly point; If it's as serious as it sounds, you should really consider this twice. 'Serious project' and 'cant imagine database structure' does not go hand in hand I'm afraid... :/

And on top of that there is security, sessions, and as Unipus mentioned, various aspects depending on creating/recreating code, hardware, connection aso.

If you still want to venture in to the project...
It's a big topic to discuss so far at the beginning. To far to actually (for me) make any comment or suggestions. There are a couple of prebuildt ones (on sites like http://www.hotscripts.com) but if they are bug free, secure, works at all etc. is another topic...
Unipus
Forum Contributor
Posts: 409
Joined: Tue Aug 26, 2003 2:06 pm
Location: Los Angeles, CA

Post by Unipus »

Towards that end, I could recommend osCommerce. It has a pretty wide variety of options, doesn't look bad out of the box, and is written pretty intelligently from what I've seen.
Unipus
Forum Contributor
Posts: 409
Joined: Tue Aug 26, 2003 2:06 pm
Location: Los Angeles, CA

Post by Unipus »

Also:

"well, would't you like to teste your food first?"

Eww. No!


:P
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

Hi again and thanks for your replies.

http://www.koctas.com.tr is their current website and this will be redesigned and re-programmed! Design is not my work but coding&scirpting is 60% mine... It will be SSL, i think i will write it with ASP but that's not the problem what i want to know is how would be a database created?

for examples which tables and columns should it have...
orders,carts,members,products,categories etc...

that is my problem, i dont think coding will be too heavy (sure it will be but "not" if i can start this job.) as much as i create the database.

thank you,
have a nice day.
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

Sorry to rain on your parade, but if you need to ask questions about any aspect of program design you really shouldn't contemplate creating a program which handles credit card numbers. Would you place an order with an online shop where the programmer is seeking help on a bulletin board?

A great little tutorial on relational db design can be found here: http://www.oreilly.de/catalog/javadtabp ... r/ch02.pdf

I've used something called dansie cart (sorry no link) in the past before I took up php-ing - a decent little cart for about $150 or so. There are various php solutions - couldn't comment on any of them.
Unipus
Forum Contributor
Posts: 409
Joined: Tue Aug 26, 2003 2:06 pm
Location: Los Angeles, CA

Post by Unipus »

Well, I'd still have some serious reservations about the whole thing, but here's basically how I'd set up the system:

ITEMS table. This table includes all details about every item in the catalog.
CATEGORIES table(s). To keep track of Category-Parent relationships.
ORDERS table. Tracks items purchased, referenced by a purchaser ID.
PURCHASERS table. Here's where you'd track the details of your buyers... addresses, contact info, etc. If you wanted to you could have a separate MEMBERS table, or you could make everyone have to become a member before buying (personally, that <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> me off... but you could do it).

Those would be the essentials. On the project I'm working on now we also have a REBATES table (cross-referenced by Manufacturer # to ITEMS), a FEATURES table (ditto), a SHIPPING table (cross-referenced by category), and a variety of statistics and tracking tables.
Post Reply