我是一名數據庫初學者,我有這個困難的拍賣數據庫項目。 我也使用SQL Server Management Studio。帶觸發器的初學者
create table user(
name char(10) not null,
lastname char(10) not null
)
create table item(
buyer varchar(10) null,
seller varchar(10) not null,
startprice numeric(5) not null,
description char(22) not null,
start_date datetime not null,
end_date datetime not null,
seller char(10) not null,
item_nummer numeric(9) not null,
constraint fk_user foreign key (buyer) references user (name)
)
基本上什麼規則IM試圖在這裏提出的是: 列買方NULL,除非時間(開始日期和結束日期)結束,startprice didnt漲還是會增加。然後專欄買家將從在該商品上競標的表格用戶處獲得名稱。
規則是出價太難爲我做的,我想做出一個觸發器,但林不知道..
這也可能會採取數據庫解決方案。 OPs的設計看起來像是一個UI操作的倒退 –