我是一名数据库初学者,我有这个困难的拍卖数据库项目。 我也使用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操作的倒退 –