首页 新增
92zf
2007-11-26 23:30:07 创建 by soybean217@sina.com.cn | 2008-1-11 0:57:31 最后修改 by soybean217@sina.com.cn 编辑标题 插入资源

customs

2007-12-25 0:44:01来自IP:218.19.X.X by soybean217@sina.com.cn
id bigint identity(1,1)   primary key,
created datetime default getdate not null  
modified datetime default getdate not null  
email varchar(200)   not null ,--邮件,unique index
pwd varchar(100)   not null ,--密码MD5加密
mode tinyint default 0 not null  
nickname varchar(100)      
sex tinyint default 0 not null  ,--0未知1男2女
编辑以上内容 删除以上内容 追加资源

foods

2008-1-11 0:57:34来自IP:219.137.X.X by soybean217@sina.com.cn
id bigint identity(1,1)   primary key,
created datetime default getdate not null  
modified datetime default getdate not null  
title varchar(200)   not null ,--名称
father_id bigint default 0 not null ,--父ID
mode tinyint default 0 not null  
UserName nvarchar(256)   not null ,--引用非FK
edible decimal(8,5) default 100 not null ,--食部
编辑以上内容 删除以上内容 追加资源

nutriments

2008-1-11 0:56:45来自IP:219.137.X.X by soybean217@sina.com.cn
id bigint identity(1,1)   primary key,
created datetime default getdate not null  
modified datetime default getdate not null  
title varchar(200)   not null ,--名称
mode tinyint default 0 not null  
UserName nvarchar(256) default 0 not null ,--引用非主键
unit tinyint   not null ,--计量单位
0:千卡/100克(热量)
1:克/100克
2:毫克/100克
3:微克/100克
pri int default 0 not null ,--排序 order by acs
编辑以上内容 删除以上内容 追加资源

nutriment2foods

2008-1-11 0:57:07来自IP:219.137.X.X by soybean217@sina.com.cn
id bigint identity(1,1)   primary key,
created datetime default getdate not null  
modified datetime default getdate not null  
nutriment_id bigint   not null ,--FK
food_id bigint   not null ,--FK,with nutriment_id unique index
UserName nvarchar(256)   not null ,--引用非主键
mode tinyint default 0 not null ,--状态0任意1引用
detail decimal(12,6)   not null ,--含量 
编辑以上内容 删除以上内容 追加资源

list

2008-1-8 0:54:36来自IP:219.136.X.X by soybean217@sina.com.cn

单人床
二人食街
乖乖小宝贝
老少皆宜
大团圆

菜谱(烹饪时间,步骤)
原料(储藏、营养价值、配伍)
厨房窍门

主食
菜肴
甜点
水果
药膳

早中晚宵夜

冰箱管家

营养计算

膳食建议

偏食 禁忌 饮食偏好

厨房设备 小工具

邮件问题

编辑以上内容 删除以上内容 追加资源

sql

2008-1-6 12:17:54来自IP:219.136.X.X by soybean217@sina.com.cn

if exists(select top 1 * from dbo.sysobjects where id = object_id(N'[dbo].[customs]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table customs
create table customs(
  id bigint not null identity(1,1) primary key,
  created datetime not null default getdate(),
  modified datetime not null default getdate(),
  email  varchar(200)   not null  ,--邮件
  pwd varchar(400)   not null  ,--密码MD5加密
  mode tinyint default 0 not null ,--0:正常1:停用
  nickname varchar(100),
  sex tinyint default 0 not null,--0未知1男2女
);
create unique index idx_customs_email on customs(email)

if exists(select top 1 * from dbo.sysobjects where id = object_id(N'[dbo].[foods]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table foods
create table foods(
  id bigint not null identity(1,1) primary key,
  created datetime not null default getdate(),
  modified datetime not null default getdate(),
  title  varchar(200)   not null  ,
  father_id bigint not null,--父ID
  mode tinyint default 0 not null ,
  custom_id bigint not null ,--引用非主键
  edible decimal(8,5) default 100 not null,
);

if exists(select top 1 * from dbo.sysobjects where id = object_id(N'[dbo].[nutriments]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table nutriments
create table nutriments(
  id bigint not null identity(1,1) primary key,
  created datetime not null default getdate(),
  modified datetime not null default getdate(),
  title varchar(200) not null,
  mode tinyint default 0 not null ,
  custom_id bigint not null ,
  unit tinyint not null,
  pri int default 0 not null,
);
create unique index idx_nutriments_title on nutriments(title)

if exists(select top 1 * from dbo.sysobjects where id = object_id(N'[dbo].[nutriment2foods]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table nutriment2foods
create table nutriment2foods(
  id bigint not null identity(1,1) primary key,
  created datetime not null default getdate(),
  modified datetime not null default getdate(),
  nutriment_id bigint not null,
  food_id  bigint not null,
  custom_id bigint not null,
  mode tinyint default 0 not null ,
  detail decimal(12,6) not null,
  foreign key (nutriment_id) references nutriments(id) on delete cascade,
  foreign key (food_id) references foods(id) on delete cascade,
);
create unique index idx_nutriment2foods_3_id on nutriment2foods(nutriment_id,food_id,custom_id)

编辑以上内容 删除以上内容 追加资源

@@add_newSrcLink@@
更新记录
此处显示新 left 标签的内容