MySQL Forums
Forum List  »  InnoDB

error 1005 (hy000): can't create table reparto.simone (errno:105)
Posted by: simone mancaruso
Date: February 01, 2013 07:38AM

why i can't create the table reparto??? i use mysql 5.5 command line client


Create table film (
anno_produzione integer not null,
titolo char not null,
versione char,
fascia_appartenenza char,
primary key (anno_produzione, titolo),
unique (titolo));

create table abbonamento (
cod integer primary key not null,
Tipo char,
Sconto integer,
Data_reg datetime,
Ncopie integer,
Durata char,
unique (cod));

create table regione (
nome char primary key not null,
unique (nome));

create table distributore (
pi integer primary key not null);

create table lingua (
nome char primary key not null);




create table provincia (
nome char primary key not null,
nome_regione char ,
foreign key (nome_regione) references regione (nome),
unique (nome));

create table citta (
nome char primary key not null,
nome_provincia char,
pi_distributore integer,
foreign key (nome_provincia) references provincia (nome),
foreign key (pi_distributore) references distributore (pi),
unique (nome));

create table servicepoint (
pi integer primary key not null,
pi_distributore integer,
nome_citta char,
foreign key (pi_distributore) references distributore (pi),
foreign key (nome_citta) references citta (nome),
unique (pi));





create table copiafisica (
supporto char not null,
titolo_film char not null,
anno_produzione_film integer not null,
primary key (supporto, titolo_film, anno_produzione_film),
foreign key (titolo_film) references film (titolo),
foreign key (anno_produzione_film) references film (anno_produzione));

create table magazzino (
via char not null,
numero_civico integer not null,
pi_servicepoint integer not null,
nome_citta char,
primary key (via, numero_civico, pi_servicepoint),
foreign key (pi_servicepoint) references servicepoint (pi),
foreign key (nome_citta) references citta (nome),
unique (via, numero_civico));

create table reparto (
nome char primary key not null,
numero_civico_magazzino integer,
via_magazzino char,
foreign key (numero_civico_magazzino) references magazzino (numero_civico),
foreign key (via_magazzino) references magazzino (via));

Options: ReplyQuote


Subject
Views
Written By
Posted
error 1005 (hy000): can't create table reparto.simone (errno:105)
1966
February 01, 2013 07:38AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.