Quality Testing

Quality is delighting customers

What are the things you test in DB of Shopping Cart ?.. Kindly Explain with examples..

Tags: DB, Shoppig, cart, testing

Views: 88

Reply to This

Replies to This Discussion

Hi Subramanian

I never worked on E-commerce appliaction but here are the few examples I have saved for myself.

The below answer might not be the best one for you but this can give you some kind of idea on  database.

 

 

 

Most of the e-commerce applications you are either building data or retrieving data 

In e-commerce applications you are either building data up or retrieving data,shopping,order processing & purchasing.

Creating The Table “cart”

  • punkisID — A unique id relating to the users browser.

* id — This references to the id number in the “catalogue” table

  • amount — The quantity of the item ordered.

This is a table which the user can change the data stored within it. There are three ways the user can change data stored with a table within this e-commerce website. They can add, delete & update data stored in a specific table. Below are some code examples to add, delete & update data within the table.

CREATE TABLE cart (
punkisID varchar(255) NOT NULL default '',
id int(11) NOT NULL default '0',
amount int(11) NOT NULL default '1'
) TYPE=MyISAM;

 

Add Data To The Table “cart”

$add = mysql_query("INSERT INTO cart (ID,amount)". "VALUES ('$addid','$amount')");

 

Delete Data From The Table “cart”

$delete = mysql_query("DELETE FROM cart WHERE id LIKE '$id' ")


Update Data In The Table “cart”

$update = mysql_query("UPDATE cart SET amount='$amount' ");
shopping cart table:-

The first selects all the data from the table specified. The second manipulates the information gathered, by ordering it by a specified field in ascending order. Finally, the query limits how many entries are displayed.

  • id — An identification number for each item. This number is unique and is section — CD, Sticker or Badge. A string of a maximum 64 characters.
  • genre — A string of a maximum 64 characters.
  • artist — Name of artist. A string of a maximum 128 characters.
  • album — Title of album or item. A string of a maximum 128 characters.
  • price — An integer number only.. Default value of “0”.
  • description — A description, used only for CDs. Longtext holds up to a maximum of 4GB characters.
  • label — Record label, only used for CDs.
  • tracks — CD tracks seperated by a comma (,), used only for CDs.
  • image — Image name only, with no extension or directory information.
  • rec — Is the product recommended? Default value of “no”. Other value is “yes”.

Creating The Table “catalogue”

CREATE TABLE catalogue (
id int(64) NOT NULL auto_increment,
section varchar(64) NOT NULL default '',
genre varchar(64) NOT NULL default '',
artist varchar(128) NOT NULL default '',
album varchar(128) NOT NULL default '',
price float NOT NULL default '0',
description longtext NOT NULL,
label varchar(128) NOT NULL default '',
tracks longtext NOT NULL,
image varchar(128) NOT NULL default '',
rec varchar(8) NOT NULL default 'no',
KEY `id` (`id`)
) TYPE=MyISAM;


Inserting Values Into The Table “catalogue”

INSERT INTO catalogue VALUES (id, 'section', 'genre', 'artist', 'album', 'price',
'description', 'label', 'tracks', 'image', 'rec');

INSERT INTO `catalogue` VALUES (35, 'Badge', 'Power-Punk', 'The Ataris', 'Rainbow',




'1', '', '', '', 'ataris_rainbow', 'yes');

Hope this helps you little bit...:))

Thanks,
Suma










 

 



 

 

 



 

Hey sumalatha,

                  thanks so much for sharing.. :)

RSS

TTWT Magazine

Welcome to Quality Testing!

Sachin Natu

 Manager QA at IdeaS Revenue Optimization

Advertisement

Submit A Job

Submit A Tool

Advertisement

Videos

  • Add Videos
  • View All

Badge

Loading…

© 2013   Created by Quality Testing.

Badges  |  Report an Issue  |  Terms of Service