Microsoft Windows [Versión 6.1.7601] Copyright (c) 2009 Microsoft Corporation. Reservados todos los derechos. C:\Users\601-17>cd.. C:\Users>cd.. C:\>cd xampp C:\xampp>cd mysql C:\xampp\mysql>cd bin C:\xampp\mysql\bin>mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.27 MySQL Community Server (GPL) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | cdcol | | mysql | | performance_schema | | phpmyadmin | | test | | webauth | +--------------------+ 7 rows in set (0.03 sec) mysql> create database biblioteca; Query OK, 1 row affected (0.00 sec) mysql> use biblioteca Database changed mysql> create table libro(cod_lib varchar(11) not null primary key,descripcion v archar(50) not null) engine=innodb; Query OK, 0 rows affected (0.09 sec) mysql> create table autor(cod_aut varchar(11) not null primary key,nom varchar(4 0) not null,apell varchar(40) not null,email varchar(40) not null) engine=innodb ; Query OK, 0 rows affected (0.03 sec) mysql> create table editorial(cod_edit varchar(11) not null primary key,nom varc har(40) not null,dir varchar(40) not null,tel varchar(12) not null) engine=innod b; Query OK, 0 rows affected (0.05 sec) mysql> create table lib_aut(cod_lib varchar(11) not null,cod_aut varchar(11) not null,foreign key (cod_lib) references libro(cod_lib) on delete cascade on updat e cascade,foreign key (cod_aut) references autor(cod_aut) on delete cascade on u pdate cascade) engine=innodb; Query OK, 0 rows affected (0.08 sec) mysql> create table autor_edit(cod_aut varchar(11) not null,cod_edit varchar(11) not null,foreign key (cod_aut) references autor(cod_aut) on delete cascade on u pdate cascade,foreign key (cod_edit) references editorial(cod_edit) on delete ca scade on update cascade) engine=innodb; Query OK, 0 rows affected (0.13 sec)