① 購物網站資料庫問題
如果你不想那麼麻煩,可以設計在一張表中,品牌標識欄位。如
create table shoes (
id int not null auto_increment,#自增專id
brand_id int not null,#品牌屬ID
brand_name varchar(30),#品牌名稱
brand_type int,#品牌類型1-耐克,2-ad,3-李寧,4......
size decimal(4,2),#鞋子碼數
)
等等,可以根據實際情況添加欄位
② 建立一個購物網站,資料庫中需要建立哪幾個表
用戶表
商品表
訂單表
這是最最基本的.少一張也不行.
復雜的話,龐大到幾百張表也不是不可能.
③ 做一個類似淘寶的購物商城資料庫需要哪些表
開發網站啊
我們學校給的作業,JSP+oracle
我想做一個類似淘寶與趕集網的結合體,但資料庫不知該如何設計。五個人一起開發
大概有兩個月的時間
④ 想做一個購物網站,不知道資料庫如何建
請三思而後來行!!!!!
強烈建源議先在淘寶,易趣等網站開個店鋪試試,如果這樣的小店都開不好,那還是清醒點吧!!!
很多有實力的公司也在這些網站上開店,他們並沒有建設自己的銷售網站-----。
你賣的什麼稀缺貨?!讓人非上你的網站去買。付款放心嗎?!
先期投資,維護等都需要不少錢!!!!
希望這些不中聽的話能對你們有作用。
⑤ 購物網站用什麼資料庫好啊
如果是剛起步的話access+ASP就夠用了,而且開發難度最小。以後壯大之後再換成SQL,mysql吧。
安全快捷,用mysql+php吧,難度稍大。
⑥ 關於購物網站的資料庫設計問題
不要這樣,這樣你會有無數多的表,而且以後新的一個產品時候非常麻煩,如果要屬於新的類別,而且還會因為避免資料庫太復雜而使得許多不同類的產品歸在一個類。而且你的程序很麻煩,要為每個類編寫不同程序,因為數據表名不同。
應該用下面的辦法,主要使用四個表存儲所有類別的商品:
第一、類別名稱表,欄位有
類別ID,類別名稱
1 電腦
2 洗衣機
第二、類別屬性表,欄位有:
類別ID,屬性ID,屬性名稱
1 1 CPU
1 2 內存
1 3 屏幕尺寸
2 1 容量
2 2 類型
第三、商品名稱表,欄位有:
商品ID,類別ID
1 1
2 1
3 2
4 2
第四、商品屬性表,欄位有:
商品ID,屬性ID,屬性值
1 1 P4
1 2 128M
1 3 CRT 14
2 1 P4
2 2 512M
2 3 LCD19
3 1 9公斤
3 2 滾筒
4 1 8公斤
4 2 波輪
上面定義了四個商品,商品ID為1~4,分別是128M、512M內存的電腦,和9公斤滾筒、8公斤的波輪洗衣機。
這樣定義的資料庫結構,可以包含任何商品,一般不會改變,那麼程序也就無需改變,定義新的產品、或者修改現有商品只需要在程序界面有操作員點點滑鼠。
⑦ 一個購物網站資料庫
我 正好在做一個電子商務的網站 資料庫也基本建好 可以給你看看不過呢我這個電子商務的 資料庫比較簡單 但是 基本的功能 都可以實現了 也只是供參考哈了 你自己看看吧:CREATE table [User] --用戶表
(
Uid int identity(1,1) primary key,--用戶ID
--擁有的 商店 ID號
UName varchar(50),
UPass varchar(100),
UEmail varchar(50),--電子郵件
UTel varchar(50),--電話
UAdress varchar(100),--住址
UPastcode varchar(50),--郵編
UCreatetime datetime, --用戶創建日期
UOnline varchar(50), --用戶在線時間
UState tinyint,--用戶狀態
URemark text --備注信息
)create table Category --產品分類表
(
Cid int identity(1,1) primary key,
Ckindname varchar(100),--分類的名稱
--CParentID int--父分類ID
--CShowOrder int ,--顯示的順序
CRemark text --備注
)create table Proct --產品詳細信息表
(
Pid int identity(1,1) primary key,
Cid int references Category(Cid), --對應 分類表的 主鍵
PName varchar(100),--商品的名稱
PText text,--商品的說明信息
PImage varchar(50),--商品的圖片信息
PPrices money,--商品的價格
Uid int references [User](Uid),--所屬的主人 及用戶表的ID號
PCreatetime datetime,--商品的上架時間
PStock int,--庫存
PsellNum int ,--已經銷售的數量
--PLeaveMessage text,--瀏覽者(用戶)對商品的評價
PViewCount int,--商品被瀏覽的次數
PStatus tinyint,--狀態
PRemark text--備注
)
create table Orders --訂單表
(
OrderID int identity(1,1) primary key, --訂單編號
Uid int foreign key(Uid) references [User](Uid),--這個訂單所屬的主人
--Pid int ,--訂單中商品的信息
OCreatetime datetime,--創建的時間
OTotalNum int,--訂單中商品的總數量
OTotalMoney money,--訂單商品的 總價格
)create table OrdersItem --訂單表關聯信息表
(
OrderItemID int identity(1,1) primary key,
OrderID int references Orders(OrderID),--訂單表的訂單編號
Pid int references Proct(Pid),--關聯的 商品表ID
ONum int,--商品的數量
--OrderItemName varchar(100),--商品的名稱
--OrderItemNum int,--該商品的數量
--OrderItemPrices money,--該商品的單價
)create table ProctLeaveMessage --用戶 瀏覽者對商品的評論表
(
PLid int identity(1,1) primary key,
Pid int references Proct(Pid),--商品表中商品的ID號
Uid int references [User](Uid),--用戶表的用戶ID
IP varchar(50),--如果不是 會員 評論的名稱就是他的IP地址
PLEmail varchar(50),--郵箱地址
PLtime datetime,--評論的時間
PLMessage text,--評論商品的內容
) 希望你能從中 有點啟發 學習愉快!!
⑧ 商城系統一般用什麼資料庫
之前商城平台用的是php+mysql開發的,但運營幾年後,只要數據量一上來系統專系統響應就非常慢,後台打屬開一個頁面經常要花十幾秒,應該是mysql對海量數據的查詢性能不太好導致的。目前已經將商城平台遷移至shop++,因為shop++同時支持mysql、sqlserver、oracle多種資料庫,現在使用的是oracle,運行挺穩定的,暫時沒有出現過系統響應緩慢的問題。
⑨ 做一個簡單的商城網站,資料庫裡面大約需要做幾張表比較適合,希望有前輩可以賜教下!
看你需要實現什麼功能才決定需要多少張表啊,最基本的:商品分類表,商品列表,管理員表,用戶信息表,訂單表,關於我們等等,復雜一點還要加上seo表,友情鏈接表,新聞資訊表,廣告圖表,留言表,數據統計表等
⑩ 購物網站資料庫設計
一、概述
網上購物店的數據模型,主要模式有產品:proct ,帳戶:Account,定單:Order。和產品相關的表有category ,proct,item, inventory, supplier;和用戶相關表有的account ,signon,profile;和定單相關的表有orders,orderstatus,lineitem ,整體關系如下.
二、帳戶模型
帳戶模型,記錄者用戶的登錄名稱,密碼。以及個人信息如地址,性名,電話等,還有它在系統中的profile信息。表有Account 主鍵是userID,它記錄用戶的基本信息,如email,name等。Signon 表記錄者userID和password,Profile表記錄者用戶的登錄系統的系統設置。可以根據用戶的類型,顯示不同的登錄信息。
(1)account表
create table account (
userid varchar(80) not null,
email varchar(80) not null,
name varchar(80) not null,
status char(2) null,
addr1 varchar(80) not null,
addr2 varchar(40) null,
city varchar(80) not null,
state varchar(80) not null,
zip varchar(20) not null,
country varchar(20) not null,
phone varchar(80) not null,
constraint pk_account primary key (userid)
)
說明:primary key是userID,它記錄帳戶的基本信息。
(2)Signon 表
create table signon (
username varchar(25) not null,
password varchar(25) not null,
constraint pk_signon primary key (username)
)
說明:記錄登錄名和密碼。
(3)Profile表
create table profile (
userid varchar(80) not null,
langpref varchar(80) not null,
favcategory varchar(30),
mylistopt int,
banneropt int,
constraint pk_profile primary key (userid)
)
說明:用戶的登錄信息,方便個性化定製。
(4)Bannerdata 表
create table bannerdata (
favcategory varchar(80) not null,
bannername varchar(255) null,
constraint pk_bannerdata primary key (favcategory)
)
說明:記錄不同的登錄信息。
三、產品模型
產品的模型主要有分類,它是產品的大類。表category 就是記錄分類名稱,描述信息。Proct
記錄每個產品的基本信息,包括產品名稱,和產品的描述。它是一對多的關系。Supplier 表
記錄產品的提供者信息,包括提供者的名稱,地址,狀態等。Item 記錄產品的提供者,產
品ID,價格,狀態。Inventory 表記錄產品的數量。關系如下:
(1) category表
create table category (
catid char(10) not null,
name varchar(80) null,
descn varchar(255) null,
constraint pk_category primary key (catid)
)
(2)proct表
create table proct (
proctid char(10) not null,
category char(10) not null,
name varchar(80) null,
descn varchar(255) null,
constraint pk_proct primary key (proctid),
constraint fk_proct_1 foreign key (category)
references category (catid)
)
(3) item表
create table item (
itemid char(10) not null,
proctid char(10) not null,
listprice decimal(10,2) null,.unitcost decimal(10,2) null,
supplier int null,
status char(2) null,
attr1 varchar(80) null,
attr2 varchar(80) null,
attr3 varchar(80) null,
attr4 varchar(80) null,
attr5 varchar(80) null,
constraint pk_item primary key (itemid),
constraint fk_item_1 foreign key (proctid)
references proct (proctid),
constraint fk_item_2 foreign key (supplier)
references supplier (suppid)
)
(4) inventory 表
create table inventory (
itemid char(10) not null,
qty int not null
)
(5)supplier表
create table inventory (
suppid int not null
name varchar(80)
status char(2)
attr1 varchar(80)
attr2 varchar(80)
city varchar(80)
state varchar(80)
zip char(6)
phone varchar(80)
constraint pk_supplier primary key (suppid),
)
四、定單模型
定單記錄用戶的選擇產品信息,數量,表主要有Orders,記錄用戶的地址,帳戶信息,總金
額。Orderstatus 記錄定單狀態。Lineitem 記錄定單中的產品數量,單位價格,產品ID。
(1)orders表
create table orders (
orderid int not null,
userid varchar(80) not null,
orderdate date not null,
shipaddr1 varchar(80) not null,
shipaddr2 varchar(80) null,
shipcity varchar(80) not null,
shipstate varchar(80) not null,
shipzip varchar(20) not null,
shipcountry varchar(20) not null,
billaddr1 varchar(80) not null,
billaddr2 varchar(80) null,
billcity varchar(80) not null,
billstate varchar(80) not null,
billzip varchar(20) not null,
billcountry varchar(20) not null,
courier varchar(80) not null,
totalprice number(10,2) not null,
billtoname varchar(80) not null,
shiptoname varchar(80) not null,
creditcard varchar(80) not null,
exprdate char(7) not null,
cardtype varchar(80) not null,
locale varchar(20) not null,
constraint pk_orders primary key (orderid),
constraint fk_orders_1 foreign key (userid)
references account (userid)
)
定單的信息。
(2)Orderstatus表
create table orderstatus (
orderid int not null,
linenum int not null,
timestamp date not null,
status char(2) not null,
constraint pk_orderstatus primary key (orderid, linenum),
constraint fk_orderstatus_1 foreign key (orderid)
references orders (orderid)
)
定單中的產品狀態
(3)lineitem表
create table lineitem (
orderid int not null,
linenum int not null,
itemid char(10) not null,
quantity int not null,
unitprice number(10,2) not null,
constraint pk_lineitem primary key (orderid, linenum),
constraint fk_lineitem_1 foreign key (orderid)
references orders (orderid)
)