1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
create table web (
web_link varchar(250) not null unique,
web_id int identity(2,1),
web_country varchar(60) not null,
web_language varchar(10) not null,
web_title nvarchar(200) not null default 'Document untitled',
web_size float not null,
web_maps bit not null default '0',
constraint [pk_web] primary key
(
[web_id]
)
)
go
create table pictures (
pic_link varchar(250) not null unique,
pic_id int identity(2,1),
web_id int not null,
pic_loc varchar(250) not null,
pic_title nvarchar(200) not null,
pic_size float not null,
pic_type int not null,
pic_width int not null,
pic_height int not null,
constraint [pk_pictures] primary key
(
[pic_id]
)
)
go
create table feed (
feed_link varchar(250) not null unique,
feed_id int identity(2,1),
web_id int not null,
feed_title nvarchar(200) not null,
feed_description nvarchar(200) not null,
feed_size float not null,
constraint [pk_feed] primary key
(
[feed_id]
)
)
go
alter table feed
add constraint fk_feed_reference_web foreign key (web_id)
references web (web_id)
go
alter table pictures
add constraint fk_pictures_reference_web foreign key (web_id)
references web (web_id)
go |
Partager