en otra ventana

Anuncio
APÉNDICE B.
Modelo entidad-relación y diseño de base de datos.
B.1. Modelo entidad relación.
Resources
Eventos
Rel_Resources
Users
Suggestions
B.2. Tablas utilizadas.
create table users (
username varchar(10) not null primary key,
password varchar(10) not null,
country varchar (20),
experience integer
primary key(username));
create table stereotypes(
Stereotypes
username varchar(10),
neofito float not null,
desarrollo float not null,
comunicacion float not null,
informativo float not null,
entretenimiento float not null,
adicto float not null,
primary key (username),
foreign key (username) references users(username)
);
create table resources
(
key varchar(10) not null,
description varchar(250) not null,
primary key(key)
);
create table rel_resources
(
r1 varchar(10) not null,
r2 varchar(10) not null,
relation float,
primary key (r1, r2),
foreign key (r1) references resources(key),
foreign key (r2) references resources(key)
);
create table eventos(
clave varchar(10),
tipo varchar(10),
username varchar (10),
fecha date,
description varchar(250),
primary key (clave,username),
foreign key (username) references users(username)
);
create table suggestions(
username varchar(10) not null,
key varchar(10) not null,
description varchar(250) not null,
value float not null,
primary key(username,key));
Descargar