Ministerio de Salud
Datoshospital
Enter password: *************
Welcome to the MySQL monitor.
Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 6.0.4-alpha-community-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database MinisterioPublico;
Query OK, 1 row affected (0.00 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| ministeriopublico |
| mysql |
| phpmyadmin |
| prueba1 |
| test |
+--------------------+
6 rows in set (0.00 sec)
mysql> use MinisterioPublico;
Database changed
mysql> show tables;
Empty set (0.02 sec)
mysql> create table
Datoshospital(Codigo_Hospital integer,Nombre_Hospital varchar(10),Calle
varchar(15),Numero integer,Colonia varchar(15),Municipio
varchar(15),Codigo_Postal integer,Telefono_Hospital
varchar(20),Numero_Camas
integer,Codigo_Laboratorio integer,Numero_Cedula integer,Codigo_Salas integer);
Query OK, 0 rows affected (0.05 sec)
mysql> insert into Datoshospital
values(2565642,'Centro_Medico_Dalinde','Basilio_Badillo',25,'Tuxpan','MexicoDF',6760,
'52-55-55-74-44-44',41,82040,1590331,876);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into Datoshospital values(3456543,'Hospital San
Javier','Pablo casals',44670,'Obispado','Monterrey',64060,
'52-33-36-69-02-22',32,54024,4723451,567);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into Datoshospital values(5575323,'Hospital
General','eje Sur',6726,'Pradois','Cuauhtemoc',6729, '01-55-27-89-20-00',24,16032,1375327,236);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into Datoshospital values(7567154,'Sanjavier
Marina','Francisco Medina',2760,'Montesori','Sona Hotelera',48333,
'52-32-22-26-10-10',21,45003,1834892,473);
Query OK, 1 row affected, 2 warnings (0.00 sec)
mysql> insert into Datoshospital values(2753571,'Angeles
Lomas','Viliadad Barranca','SN','Valledelaspalmas','MexicoDF',6760,
'52-55-52-46-50-00',17,21044,4562894,847);
Query OK, 1 row affected, 4 warnings (0.00 sec)
mysql> insert into Datoshospital values(2362140,'Angeles
Pedregal','Camino SantaTeresa',1055,'Heroes Padierna','Mexico',1055,
'52-56-52-20-11',32,15150,1723843,248);
Query OK, 1 row affected, 2 warnings (0.00 sec)
mysql> insert into Datoshospital values(9583752,'Hosp
Carmen','Tarascos',3435,'Fracc
Monraz','Jalisco',44670,'52-38-13-00-42',26,96105,2462721,364);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into
Datoshospital values(3557684,'Mexico Americano','Colomos',2110,'Sectro Hidalgo','Jalisco',44610,
'52-36-41-36-78',56,32239,4026721,234);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into Datoshospital values(7203125,'Privado
Hermosillo','San Miguel',35,'Rio Sonora','Hermosillo',83280,
'52-62-59-09-00',42,45247,1392034,542);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into Datoshospital values(3806151,'Rio Loza','Paseos
Alexander',88,'Sec Lomas Verdes','Naucalpan Juarez',53120,
'52-53-43-10-60',19,74376,2135267,652);
Query OK, 1 row affected, 3 warnings (0.00 sec)
mysql> describe Datoshospital;
+--------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+-------------+------+-----+---------+-------+
| Codigo_Hospital |
int(11) | YES | |
NULL | |
| Nombre_Hospital | varchar(10)
| YES | | NULL
| |
| Calle | varchar(15)
| YES | | NULL
| |
| Numero |
int(11) | YES | |
NULL |
|
| Colonia | varchar(15)
| YES | | NULL
| |
| Municipio | varchar(15)
| YES | | NULL
| |
| Codigo_Postal |
int(11) | YES | |
NULL | |
| Telefono_Hospital | varchar(20) | YES | |
NULL | |
| Numero_Camas | int(11) | YES
| | NULL |
|
| Codigo_Laboratorio |
int(11) | YES | |
NULL | |
| Numero_Cedula | int(11) | YES
| | NULL |
|
| Codigo_Salas | int(11) | YES
| | NULL |
|
+--------------------+-------------+------+-----+---------+-------+
12 rows in set (0.02 sec)
mysql> select * from Datoshospital;
+-----------------+-----------------+-----------------+--------+-----------------+-----------------+---------------+-------------------+--------------+--------------------+---------------+--------------+
| Codigo_Hospital |
Nombre_Hospital | Calle |
Numero | Colonia | Municipio | Codigo_Postal | Telefono_Hospital |
Numero_Camas | Codigo_Laboratorio | Numero_Cedula | Codigo_Salas |
+-----------------+-----------------+-----------------+--------+-----------------+-----------------+---------------+-------------------+--------------+--------------------+---------------+--------------+
| 2565642 | Centro_Med | Basilio_Badillo | 25 | Tuxpan | MexicoDF | 6760 | 52-55-55-74-44-44 | 41 | 82040 | 1590331 | 876 |
| 3456543 | Hospital S |
Pablo casals | 44670 | Obispado | Monterrey |
64060 | 52-33-36-69-02-22 |
32 | 54024 | 4723451 | 567 |
| 5575323 | Hospital G | eje Sur |
6726 | Pradois | Cuauhtemoc |
6729 | 01-55-27-89-20-00 |
24 | 16032 | 1375327 | 236 |
| 7567154 | Sanjavier | Francisco Medin | 2760 | Montesori | Sona Hotelera |
48333 | 52-32-22-26-10-10 | 21 | 45003 | 1834892 | 473 |
| 2753571 | Angeles Lo | Viliadad Barran | 0 | Valledelaspalma | MexicoDF | 6760 | 52-55-52-46-50-00 | 17 | 21044 | 4562894 | 847 |
| 2362140 | Angeles Pe | Camino SantaTer | 1055 | Heroes Padierna | Mexico | 1055 | 52-56-52-20-11 |
32 | 15150 | 1723843 | 248 |
| 9583752 | Hosp Carme | Tarascos |
3435 | Fracc Monraz |
Jalisco | 44670 | 52-38-13-00-42 |
26 | 96105 | 2462721 | 364 |
| 3557684 | Mexico Ame | Colomos |
2110 | Sectro Hidalgo | Jalisco | 44610 | 52-36-41-36-78 |
56 | 32239 | 4026721 | 234 |
| 7203125 | Privado He | San Miguel |
35 | Rio Sonora |
Hermosillo | 83280 | 52-62-59-09-00 |
42 | 45247 | 1392034 | 542 |
| 3806151 | Rio Loza | Paseos Alexande | 88 | Sec Lomas Verde | Naucalpan Juare
| 53120 | 52-53-43-10-60 |
19 | 74376 | 2135267 | 652 |
+-----------------+-----------------+-----------------+--------+-----------------+-----------------+---------------+-------------------+--------------+--------------------+---------------+--------------+
10 rows in set (0.02 sec)
mysql>
Laboratorio
mysql> create table
Laboratorio(Codigo_Laboratorio integer,Nombre_Laboratorio
varchar(15),Direccion_Laboratorio varchar(15),Telefono_Laboratorio
varchar(20));
Query OK, 0 rows affected (0.05 sec)
mysql> show tables;
+-----------------------------+
| Tables_in_ministeriopublico |
+-----------------------------+
| datoshospital |
| laboratorio |
+-----------------------------+
2 rows in set (0.00 sec)
mysql> insert into Laboratorio
values(82040,'HormonaAdrenocorticotropica','4-6-2','57-14-76-49');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into Laboratorio
values(54024,'Acetaminofeno','2-8-5','15-51-63-51');
Query OK, 1 row affected (0.00 sec)
mysql> insert into Laboratorio
values(16032,'Androstenediona','3-4-3','56-93-91-03');
Query OK, 1 row affected (0.00 sec)
mysql> insert into Laboratorio
values(45003,'Bioquimica','5-3-6','58-56-43-29');
Query OK, 1 row affected (0.00 sec)
mysql> insert into Laboratorio
values(21044,'UrinariaCuantitativa','3-7-7','57-16-95-55');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into Laboratorio
values(15150,'AnfetaminaoMetanfetamina','3-11-2','59-75-28-64');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into Laboratorio
values(96105,'Alfa-Fetoproteina','2-3-5','57-32-18-25');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into Laboratorio
values(32239,'Microglobulina','6-9-7','53-41-78-24');
Query OK, 1 row affected (0.00 sec)
mysql> insert into Laboratorio
values(45247,'AcidosBiliares','4-10-8','26-06-92-69');
Query OK, 1 row affected (0.00 sec)
mysql> insert into Laboratorio
values(74376,'Monoxidodecarbono','4-5-3','53-41-00-10');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> describe Laboratorio;
+-----------------------+-------------+------+-----+---------+-------+
| Field |
Type | Null | Key | Default |
Extra |
+-----------------------+-------------+------+-----+---------+-------+
| Codigo_Laboratorio | int(11) | YES
| | NULL |
|
| Nombre_Laboratorio | varchar(15) | YES | |
NULL | |
| Direccion_Laboratorio |
varchar(15) | YES | | NULL
| |
| Telefono_Laboratorio | varchar(20) | YES | |
NULL | |
+-----------------------+-------------+------+-----+---------+-------+
4 rows in set (0.00 sec)
mysql> select * from Laboratorio;
+--------------------+--------------------+-----------------------+----------------------+
| Codigo_Laboratorio |
Nombre_Laboratorio | Direccion_Laboratorio | Telefono_Laboratorio |
+--------------------+--------------------+-----------------------+----------------------+
| 82040 | HormonaAdrenoco | 4-6-2 | 57-14-76-49 |
| 54024 | Acetaminofeno | 2-8-5 | 15-51-63-51 |
| 16032 | Androstenediona | 3-4-3 | 56-93-91-03 |
| 45003 | Bioquimica | 5-3-6 | 58-56-43-29 |
| 21044 | UrinariaCuantit | 3-7-7 | 57-16-95-55 |
| 15150 | AnfetaminaoMeta | 3-11-2 | 59-75-28-64 |
| 96105 | Alfa-Fetoprotei | 2-3-5 | 57-32-18-25 |
| 32239 | Microglobulina | 6-9-7 | 53-41-78-24 |
| 45247 | AcidosBiliares | 4-10-8 | 26-06-92-69 |
| 74376 | Monoxidodecarbo | 4-5-3 | 53-41-00-10 |
+--------------------+--------------------+-----------------------+----------------------+
10 rows in set (0.00 sec)
mysql>
Cédula
mysql> create table Cedula(Numero_Cedula
integer,Apellido_Paterno varchar(30),Apellido_Materno varchar(30),Nombre_es
varchar(30),Especialidad varchar(20));
Query OK, 0 rows affected (0.09 sec)
mysql> show tables;
+-----------------------------+
| Tables_in_ministeriopublico |
+-----------------------------+
| datoshospital |
| laboratorio |
| cedula
|
+-----------------------------+
3 rows in set (0.01 sec)
mysql>
insert into Cedula values(1590331,'Frausto','Rico','Gerardo','Cirujano');
Query OK, 1 row affected (0.02 sec)
mysql>
insert into Cedula values(4723451,'Acosta','Barrios','Monica','Pedriatia');
Query OK, 1 row affected (0.00 sec)
mysql>
insert into Cedula
values(1375327,'Aizpuru','Gibson','AnaPaula','Anestesiologia');
Query OK, 1 row affected (0.00 sec)
mysql> insert into Cedula
values(1834892,'Alanis','Blancas','Luis Manuel','OrtopediayTraumatologia');
Query OK, 1 row affected, 1 warning (0.00
sec)
mysql>
insert into Cedula values(4562894,'Basave','Rojas','Marcelo
Noe','Cardiologia');
Query OK, 1 row affected (0.00 sec)
mysql> insert into Cedula
values(1723843,'Dejuna','Erades','Carlos Publio','Urologia');
Query OK, 1 row affected (0.00 sec)
mysql> insert into Cedula
values(2462721,'Gallo','Reynoso','Julia Santiago','Endoscopia');
Query OK, 1 row affected (0.00 sec)
mysql>
insert into Cedula values(4026721,'Garcia','Gonzalez','Ulises','Neurocirugia');
Query OK, 1 row affected (0.02 sec)
mysql> insert into Cedula
values(1392034,'Hernandez','Bribiesca','MariaElena','Medicina Interna');
Query OK, 1 row affected (0.00 sec)
mysql>
insert into Cedula values(2135267,'Neri','Paez','Edgar','Urologia');
Query OK, 1 row affected (0.01 sec)
mysql> describe Cedula;
+------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+-------------+------+-----+---------+-------+
| Numero_Cedula | int(11) | YES
| | NULL |
|
| Apellido_Paterno | varchar(30) | YES | |
NULL | |
| Apellido_Materno | varchar(30) | YES | |
NULL | |
| Nombre_es | varchar(30) | YES | |
NULL | |
| Especialidad | varchar(20) | YES | |
NULL | |
+------------------+-------------+------+-----+---------+-------+
5 rows in set (0.02 sec)
mysql> select * from Cedula;
+---------------+------------------+------------------+----------------+----------------------+
| Numero_Cedula | Apellido_Paterno |
Apellido_Materno | Nombre_es |
Especialidad |
+---------------+------------------+------------------+----------------+----------------------+
|
1590331 | Frausto |
Rico | Gerardo | Cirujano |
|
4723451 | Acosta |
Barrios | Monica | Pedriatia |
|
1375327 | Aizpuru |
Gibson | AnaPaula | Anestesiologia |
|
1834892 | Alanis |
Blancas | Luis Manuel | OrtopediayTraumatolo |
|
4562894 | Basave | Rojas | Marcelo Noe | Cardiologia |
|
1723843 | Dejuna |
Erades | Carlos Publio | Urologia |
|
2462721 | Gallo |
Reynoso | Julia Santiago |
Endoscopia |
|
4026721 | Garcia |
Gonzalez | Ulises | Neurocirugia |
|
1392034 | Hernandez |
Bribiesca | MariaElena | Medicina Interna |
|
2135267 | Neri |
Paez | Edgar | Urologia |
+---------------+------------------+------------------+----------------+----------------------+
10 rows in set (0.00 sec)
mysql>
Paciente
mysql> create table
Paciente(Cedula_Paciente varchar(30),Apellido_Paterno varchar(30),Apellido_Materno
varchar(30),Nombre_es varchar(30),Numero_Registro integer,Sexo
varchar(15),Fecha_Nacimiento date,
Direccion_Paciente varchar(50),Codigo_Salas
integer);
Query OK, 0 rows affected (0.06 sec)
mysql> show tables;
+-----------------------------+
|
Tables_in_ministeriopublico |
+-----------------------------+
|
datoshospital |
| laboratorio
|
| cedula |
| Paciente
|
+-----------------------------+
4 rows in
set (0.01 sec)
mysql>
insert into Paciente
values('1304273732','Alcazar','Barrena','Angela',35425,'Mujer','1985/04/24','Cristal','No.5','Dominguez','Azcapotzalco',2710,876);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Paciente values('5620157236','Ramirez','Cabrera','Sergio
Antonio',72452,'Hombre','1976/03/12','Humanista','No.34','Anzures','Monterrey',64988,567);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Paciente
values('3732180326','Ferrera','Luna','Victor',84362,'Hombre','1984/01/6','Central','No.12
OjoAgua Cuauhtemoc 6500',236);
ERROR 1136
(21S01): Column count doesn't match value count at row 1
mysql>
insert into Paciente values('5732105893','Pinedo','Escolano','Patricia
Estela',18394,'Mujer','1987/06/17','12Sep','No.6','Las
Palmas','ZonaNorte',85010,473);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Paciente values('3256954670','Silva','Larrea','Rosa
Maria',20456,'Mujer','1967/08/20','Vaquita','No.161','Centro','Iztacalco',8500,847);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Paciente values('3209345671','Casals','Soto','Mario
Enrique',25251,'Hombre','1960/12/14','Piedra','No.23','FuentesTepepan','Chicoloapan',56377,248);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Paciente values('4328164830','Barrios','Granados','Maria
Cristina',89473,'Mujer','1971/9/10','Batalla
Naco','No.230','Alvaro','Atengo',48190,364);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Paciente values('2068453217','Galvan','Nieto','Jose
Francisco',10367,'Hombre','1968/02/1','11May','No.37','Zopilote
Moiado','Ocotlan',47880,234);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Paciente values('3145628901','Franco','Coronado','Diana
Paola',34829,'Mujer','1966/5/11','Mar Crisis','No.21','Selene','Hermosillo',83278,542);
Query OK,
1 row affected (0.00 sec)
mysql> insert into Paciente
values('6834935436','Alvarez','Dominguez','Carlos
Antonio',54627,'Hombre','1958/10/28','RayandoelSol','No.02','BenitoJuarez','Naucalpan
de Juarez',53320,652);
Query OK,
1 row affected, 1 warning (0.00 sec)
mysql>
describe Paciente;
+------------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+------------------+-------------+------+-----+---------+-------+
| Cedula_Paciente | varchar(30) | YES | |
NULL | |
| Apellido_Paterno | varchar(30) | YES | |
NULL | |
| Apellido_Materno | varchar(30) | YES | |
NULL | |
| Nombre_es | varchar(30) | YES | |
NULL | |
| Numero_Registro | int(11)
| YES | | NULL
| |
| Sexo | varchar(15) | YES | |
NULL | |
| Fecha_Nacimiento | date | YES
| | NULL |
|
| Calle | varchar(15) | YES | |
NULL | |
| Numero | varchar(15) | YES | |
NULL | |
| Colonia | varchar(15) | YES | |
NULL | |
| Municipio | varchar(15) | YES | |
NULL | |
| Codigo_Postal | int(11) | YES
| | NULL |
|
| Codigo_Salas | int(11) | YES
| | NULL |
|
+------------------+-------------+------+-----+---------+-------+
13 rows in
set (0.02 sec)
mysql>
select * from Paciente;
+-----------------+------------------+------------------+-----------------+-----------------+--------+------------------+--------------+--------+-----------------+-----------------+---------------+--------------+
|
Cedula_Paciente | Apellido_Paterno | Apellido_Materno | Nombre_es | Numero_Registro | Sexo | Fecha_Nacimiento | Calle | Numero | Colonia | Municipio | Codigo_Postal | Codigo_Salas |
+-----------------+------------------+------------------+-----------------+-----------------+--------+------------------+--------------+--------+-----------------+-----------------+---------------+--------------+
|
1304273732 | Alcazar | Barrena | Angela | 35425 | Mujer | 1985-04-24 | Cristal | No.5
| Dominguez | Azcapotzalco |
2710 | 876 |
| 5620157236 | Ramirez | Cabrera | Sergio Antonio |
72452 | Hombre | 1976-03-12
| Humanista | No.34 | Anzures | Monterrey |
64988 | 567 |
| 5732105893 | Pinedo | Escolano | Patricia Estela | 18394 | Mujer | 1987-06-17 | 12Sep | No.6
| Las Palmas | ZonaNorte |
85010 | 473 |
| 3256954670 | Silva | Larrea | Rosa Maria | 20456 | Mujer | 1967-08-20 | Vaquita | No.161 | Centro | Iztacalco |
8500 | 847 |
| 3209345671 | Casals | Soto | Mario Enrique |
25251 | Hombre |
1960-12-14 | Piedra | No.23
| FuentesTepepan |
Chicoloapan | 56377 | 248 |
| 4328164830 | Barrios | Granados | Maria Cristina |
89473 | Mujer | 1971-09-10 | Batalla Naco | No.230 | Alvaro | Atengo | 48190 | 364 |
| 2068453217 | Galvan | Nieto | Jose Francisco |
10367 | Hombre | 1968-02-01
| 11May | No.37 | Zopilote Moiado | Ocotlan | 47880 | 234 |
| 3145628901 | Franco | Coronado | Diana Paola |
34829 | Mujer | 1966-05-11 | Mar Crisis | No.21
| Selene |
Hermosillo | 83278 | 542 |
| 6834935436 | Alvarez | Dominguez | Carlos Antonio |
54627 | Hombre | 1958-10-28
| RayandoelSol | No.02 |
BenitoJuarez | Naucalpan de Ju | 53320 | 652 |
+-----------------+------------------+------------------+-----------------+-----------------+--------+------------------+--------------+--------+-----------------+-----------------+---------------+--------------+
9 rows in
set (0.00 sec)
mysql>
Salas
mysql> create table Salas(Codigo_Salas
integer,Nombre_Salas varchar(30),Cantidad_Camas integer);
Query OK, 0 rows affected (0.05 sec)
mysql>
show tables;
+-----------------------------+
|
Tables_in_ministeriopublico |
+-----------------------------+
| cedula |
| datoshospital |
| laboratorio |
| paciente |
| salas |
+-----------------------------+
5 rows in
set (0.03 sec)
mysql>
insert into Salas values(876,'Observacion',44);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Salas values(567,'Operaciones',32);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Salas values(236,'Terapia Intensiva',24);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Salas values(473,'Partos',21);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Salas values(847,'Emergencia',17);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Salas values(248,'Encamados',32);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Salas values(364,'Recien Nacidos',26);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Salas values(234,'Quirurgico',56);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Salas values(542,'Medicina',42);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Salas values(652,'Congelacion',19);
Query OK,
1 row affected (0.01 sec)
mysql>
describe Salas;
+----------------+-------------+------+-----+---------+-------+
|
Field | Type |
Null | Key | Default | Extra |
+----------------+-------------+------+-----+---------+-------+
|
Codigo_Salas | int(11) | YES
| | NULL |
|
| Nombre_Salas | varchar(30) | YES | |
NULL | |
| Cantidad_Camas | int(11) |
YES |
| NULL | |
+----------------+-------------+------+-----+---------+-------+
3 rows in
set (0.00 sec)
mysql>
select * from Salas;
+--------------+-------------------+----------------+
| Codigo_Salas | Nombre_Salas | Cantidad_Camas |
+--------------+-------------------+----------------+
|
876 | Observacion | 44 |
|
567 | Operaciones | 32 |
|
236 | Terapia Intensiva |
24 |
|
473 | Partos | 21 |
|
847 | Emergencia | 17 |
|
248 | Encamados | 32 |
|
364 | Recien Nacidos | 26 |
|
234 | Quirurgico | 56 |
| 542 | Medicina | 42 |
| 652 | Congelacion | 19 |
+--------------+-------------------+----------------+
10 rows in
set (0.00 sec)
mysql>
Diagnostico
mysql> create table
Diagnostico(Codigo_Diagnostico integer,Tipo_Diagnostico
varchar(30),Complicaciones varchar(70));
Query OK,
0 rows affected (0.05 sec)
mysql>
show tables;
+-----------------------------+
|
Tables_in_ministeriopublico |
+-----------------------------+
| cedula |
| datoshospital |
| diagnostico |
| laboratorio |
| paciente |
| salas |
|
diagnostico |
+-----------------------------+
6 rows in
set (0.01 sec)
mysql> insert into Diagnostico
values(7806,'Sindrome Febril','Fiebre de Origen Desconocido');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Diagnostico
values(4939,'Asma Sibilancias Broncospasm','Asma no especificada');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Diagnostico values(4642,'Laringitis Croup','Laringotraqueitis
aguda');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Diagnostico
values(2508,'Descompensacion diabetes','Diabetes con otra Manifestacion');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Diagnostico
values(6642,'Distocia Social','Circunstancia Psicosocial no Especificada');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Diagnostico
values(6089,'Dolor Testicular','Transtornos no Especificados de Organos
Genitales masculinos');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Diagnostico
values(7992,'Irritabilidad Nerviosismo','Nerviosismo');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Diagnostico
values(2859,'Anemia','Presencia de valores de hematocrito y Hemoglobina');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Diagnostico
values(5909,'Apendicitis','Inflamacion apendicular sin perforacion');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Diagnostico values(7841,'Cafalea','Dolor
de cabeza sin causa Especificada');
Query OK,
1 row affected (0.00 sec)
mysql>
describe Diagnostico;
+--------------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+--------------------+-------------+------+-----+---------+-------+
| Codigo_Diagnostico | int(11) | YES
| | NULL |
|
| Tipo_Diagnostico | varchar(30) | YES | |
NULL | |
|
Complicaciones | varchar(70) |
YES |
| NULL | |
+--------------------+-------------+------+-----+---------+-------+
3 rows in
set (0.02 sec)
mysql> select * from Diagnostico;
+--------------------+------------------------------+--------------------------------------------------------------+
| Codigo_Diagnostico | Tipo_Diagnostico | Complicaciones
|
+--------------------+------------------------------+--------------------------------------------------------------+
| 7806 | Sindrome Febril | Fiebre de Origen
Desconocido
|
| 4939 | Asma Sibilancias Broncospasm
| Asma no especificada |
| 4642 | Laringitis Croup | Laringotraqueitis aguda |
| 2508 | Descompensacion
diabetes | Diabetes con otra
Manifestacion
|
| 6642 | Distocia Social | Circunstancia Psicosocial no
Especificada |
| 6089 | Dolor Testicular | Transtornos no Especificados de
Organos Genitales masculinos |
| 7992 | Irritabilidad
Nerviosismo | Nerviosismo
|
| 2859 | Anemia | Presencia de valores
de hematocrito y Hemoglobina |
| 5909 | Apendicitis | Inflamacion apendicular sin
perforacion |
| 7841 | Cafalea | Dolor de cabeza sin
causa Especificada
|
+--------------------+------------------------------+--------------------------------------------------------------+
10 rows in set (0.00 sec)
mysql>
Biblioteca
Municipal
Autor
Enter password: ****
Welcome to
the MySQL monitor. Commands end with ;
or \g.
Your MySQL
connection id is 6
Server
version: 6.0.4-alpha-community-log MySQL Community Server (GPL)
Type
'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
create database BibliotecaMunicipal;
Query OK,
1 row affected (0.03 sec)
mysql>
show databases;
+---------------------+
|
Database |
+---------------------+
|
information_schema |
|
bibliotecamunicipal |
|
cedula |
|
mysql |
|
phpmyadmin |
|
test |
+---------------------+
6 rows in
set (0.00 sec)
mysql>
use BibliotecaMunicipal;
Database
changed
mysql>
show tables;
Empty set (0.00 sec)
mysql> create table Autor(Codigo_Autor
integer,Apellido_Paterno varchar(30),Apellido_Materno varchar(30),Nombre_es
varchar(30),Codigo_Libro varchar(70));
Query OK,
0 rows affected (0.06 sec)
mysql>
insert into Autor values(8403758,'Nieto','Garcia','Jose','9788461300532');
Query OK,
1 row affected (0.02 sec)
mysql>
insert into Autor values(2749378,'Hong','Chan','Seong','9788496208599');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Autor values(7839467,'Gomez','Cerda','Alfredo','9789504200857');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Autor values(2984037,'de Tudela','Perez','Cesar','9788415643661');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Autor values(2184930,'Murail','Aude','Marie','9788561652227');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Autor
values(2743947,'Guillore','Contreras','Jean','9789942112958');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Autor
values(2910482,'Puerto','Gonzalez','Carlos','9789295055025');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Autor values(1903672,'Inkiow','Baneru','Dimiter','9781234567897');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Autor values(2394728,'Lopez','Stevenson','Ricardo
Antonio','9789584407269');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Autor
values(3827386,'Giambattista','Bautista','Basile','9789801425175');
Query OK,
1 row affected (0.00 sec)
mysql>
describe Autor;
+------------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+------------------+-------------+------+-----+---------+-------+
|
Codigo_Autor | int(11) | YES
| | NULL |
|
| Apellido_Paterno | varchar(30) | YES | |
NULL | |
| Apellido_Materno | varchar(30) | YES | |
NULL | |
| Nombre_es | varchar(30) | YES | |
NULL | |
| Codigo_Libro | varchar(70) | YES | |
NULL | |
+------------------+-------------+------+-----+---------+-------+
5 rows in
set (0.01 sec)
mysql>
select * from Autor;
+--------------+------------------+------------------+-----------------+---------------+
| Codigo_Autor | Apellido_Paterno |
Apellido_Materno | Nombre_es |
Codigo_Libro |
+--------------+------------------+------------------+-----------------+---------------+
|
8403758 | Nieto |
Garcia | Jose | 9788461300532 |
|
2749378 | Hong |
Chan | Seong | 9788496208599 |
|
7839467 | Gomez |
Cerda | Alfredo | 9789504200857 |
|
2984037 | de Tudela |
Perez | Cesar | 9788415643661 |
|
2184930 | Murail |
Aude | Marie | 9788561652227 |
|
2743947 | Guillore |
Contreras | Jean | 9789942112958 |
|
2910482 | Puerto |
Gonzalez | Carlos | 9789295055025 |
|
1903672 | Inkiow |
Baneru | Dimiter | 9781234567897 |
|
2394728 | Lopez |
Stevenson | Ricardo Antonio |
9789584407269 |
|
3827386 | Giambattista |
Bautista | Basile | 9789801425175 |
+--------------+------------------+------------------+-----------------+---------------+
10 rows in
set (0.00 sec)
mysql>
Libro
mysql> use
BibliotecaMunicipal;
Database changed
mysql> create
table Libro(Codigo_Libro Varchar(30),Titulo varchar(70),Editorial
varchar(30),ISBN varchar(70),Numero_Paginas varchar(30),Codigo_Ejemplares
integer);
Query OK,
0 rows affected (0.06 sec)
mysql>
show tables;
+-------------------------------+
|
Tables_in_bibliotecamunicipal |
+-------------------------------+
|
autor |
|
libro |
+-------------------------------+
2 rows in
set (0.00 sec)
mysql> insert into Libro
values('9788461300532','PIPEPACO EN LA SELVA','Magisterio
Español','ISBN978-84-613-0053-2','1-48 Pag',63512);
Query OK,
1 row affected, 1 warning (0.02 sec)
mysql> insert into Libro
values('9788496208599','UNA ALDEA LLAMADA
FELICIDAD','Shinseken','ISBN978-84-96208-59-9','1-40 Pag',52431);
Query OK,
1 row affected (0.00 sec)
mysql> insert into Libro
values('9789504200857','UNA AMIGO EN LA
SELVA','Edelvives','ISBN978-950-42-0085-7','1-152 Pag',57383);
Query OK,
1 row affected (0.00 sec)
mysql> insert into Libro
values('9788415643661','NORTE Y
SUR','Edelvives','ISBN978-84-15643-66-1','volumen 46 numero 1-551
Pag',73845);
Query OK,
1 row affected, 1 warning (0.00 sec)
mysql> insert into Libro
values('9788561652227','EL HOLANDES SIN
ESFUERZO','Edebe','ISBN978-85-61652-22-7','1-44 Pag',26371);
Query OK,
1 row affected (0.00 sec)
mysql> insert into Libro
values('9789942112958','EL VIAJE DE NICOLAS','Bruño','ISBN978-9942-11-295-8','1-176
Pag',15636);
Query OK,
1 row affected, 1 warning (0.00 sec)
mysql> insert into Libro
values('9789295055025','LA ROSA DE LOS
HIELOS','Edelvives','ISBN978-92-95055-02-5','1-160 Pag',94728);
Query OK,
1 row affected (0.00 sec)
mysql> insert into Libro
values('9781234567897','UN VIAJE FANTASMA ALREDEDOR DEL
MUNDO','Everest','ISBN978-1-234-56789-7','1-64 Pag',83621);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Libro values('9789584407269','PETROSINELLA','Asuri','ISBN978-958-44-0726-9','1-32
Pag',62356);
Query OK,
1 row affected (0.00 sec)
mysql> insert into Libro
values('9789801425175','EL SUEÑO DE
ALI','Edelvives','ISBN978-980-14-2517-5','1-104 Pag',72546);
Query OK,
1 row affected, 1 warning (0.00 sec)
mysql>
describe Libro;
+-------------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+-------------------+-------------+------+-----+---------+-------+
| Codigo_Libro | varchar(30) | YES | |
NULL | |
| Titulo | varchar(70) | YES | |
NULL | |
| Editorial | varchar(30) | YES | |
NULL | |
| ISBN | varchar(70) | YES | |
NULL | |
| Numero_Paginas |
varchar(30) | YES | | NULL
| |
| Codigo_Ejemplares | int(11) | YES
| | NULL |
|
+-------------------+-------------+------+-----+---------+-------+
6 rows in
set (0.03 sec)
mysql>
select * from Libro;
+---------------+---------------------------------------+-----------------+-----------------------+----------------+-------------------+
| Codigo_Libro | Titulo |
Editorial | ISBN | Numero_Paginas | Codigo_Ejemplares
|
+---------------+---------------------------------------+-----------------+-----------------------+----------------+-------------------+
| 9788461300532 | PIPEPACO EN LA SELVA | Magisterio Espa |
ISBN978-84-613-0053-2 | 1-48 Pag
| 63512 |
| 9788496208599 | UNA ALDEA LLAMADA
FELICIDAD | Shinseken | ISBN978-84-96208-59-9 | 1-40 Pag | 52431 |
| 9789504200857 | UNA AMIGO EN LA SELVA | Edelvives | ISBN978-950-42-0085-7 | 1-152 Pag | 57383 |
| 9788415643661 | NORTE Y SUR | Edelvives | ISBN978-84-15643-66-1 | volumen
46 | 73845 |
| 9788561652227 | EL HOLANDES SIN
ESFUERZO | Edebe | ISBN978-85-61652-22-7 | 1-44
Pag | 26371 |
| 9789942112958 | EL VIAJE DE NICOLAS | Bru | ISBN978-9942-11-295-8 | 1-176
Pag | 15636 |
| 9789295055025 | LA ROSA DE LOS HIELOS | Edelvives | ISBN978-92-95055-02-5 | 1-160 Pag | 94728 |
| 9781234567897 | UN VIAJE FANTASMA ALREDEDOR
DEL MUNDO | Everest |
ISBN978-1-234-56789-7 | 1-64 Pag
| 83621 |
| 9789584407269 | PETROSINELLA | Asuri | ISBN978-958-44-0726-9 | 1-32
Pag | 62356 |
| 9789801425175 | EL SUE |
Edelvives | ISBN978-980-14-2517-5 |
1-104 Pag | 72546 |
+---------------+---------------------------------------+-----------------+-----------------------+----------------+-------------------+
10 rows in
set (0.02 sec)
mysql>
Ejemplares
mysql> create table
Ejemplares(Codigo_Ejemplares integer,Localizacion varchar(25),Codigo_Usuario
varchar(15));
Query OK,
0 rows affected (0.08 sec)
mysql>
show tables;
+-------------------------------+
|
Tables_in_bibliotecamunicipal |
+-------------------------------+
|
autor |
|
ejemplares |
|
libro |
+-------------------------------+
3 rows in
set (0.00 sec)
mysql>
insert into Ejemplares values(63512,'Interactivo','563784');
Query OK,
1 row affected (0.02 sec)
mysql>
insert into Ejemplares values(52431,'Interactivo','274834');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Ejemplares values(57383,'Interactivo','367378');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Ejemplares
values(73845,'Auto conocimiento','346127');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Ejemplares values(26371,'Interactivo','389023');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Ejemplares values(15636,'Novelas','458903');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Ejemplares values(94728,'Novelas','103479');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Ejemplares values(83621,'Interactivo','721046');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Ejemplares values(62356,'Interactivo','264378');
Query OK,
1 row affected (0.02 sec)
mysql>
insert into Ejemplares values(72546,'Novelas','103983');
Query OK,
1 row affected (0.00 sec)
mysql>
describe Ejemplares;
+-------------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+-------------------+-------------+------+-----+---------+-------+
| Codigo_Ejemplares | int(11) | YES
| | NULL |
|
| Localizacion | varchar(25) | YES | |
NULL | |
| Codigo_Usuario | varchar(15) | YES | |
NULL | |
+-------------------+-------------+------+-----+---------+-------+
3 rows in
set (0.02 sec)
mysql>
select * from Ejemplares;
+-------------------+-------------------+----------------+
| Codigo_Ejemplares | Localizacion | Codigo_Usuario |
+-------------------+-------------------+----------------+
|
63512 | Interactivo |
563784 |
|
52431 | Interactivo |
274834 |
|
57383 | Interactivo |
367378 |
|
73845 | Auto conocimiento | 346127 |
|
26371 | Interactivo |
389023 |
|
15636 | Novelas |
458903 |
|
94728 | Novelas | 103479 |
|
83621 | Interactivo |
721046 |
|
62356 | Interactivo |
264378 |
| 72546 | Novelas | 103983 |
+-------------------+-------------------+----------------+
10 rows in
set (0.00 sec)
mysql>
Usuario
mysql>
use BibliotecaMunicipal;
Database
changed
mysql>
create table Usuario(Codigo_Uruario varchar(15),Apellido_Paterno
varchar(30),Apellido_Materno varchar(30),Nombre_es varchar(30),Telefono_Usuario
varchar(20),Calle varchar(15),Numero varchar(15)
,Colonia
varchar(15),Municipio varchar(15),Codigo_Postal integer);
Query OK, 0 rows affected (0.08 sec)
mysql> show tables;
+-------------------------------+
| Tables_in_bibliotecamunicipal |
+-------------------------------+
|
autor |
|
ejemplares |
|
libro |
|
usuario |
+-------------------------------+
4
rows in set (0.02 sec)
mysql> insert into Usuario values('563784','Hernandez','Beltran','Angela','55-26-73-42-52','Margarita','No.23','Buenavista','Tultitlan',54955);
Query OK, 1 row affected (0.00 sec)
mysql>
insert into Usuario values('274834','Gonzalez','Leyva','Ana
Claudia','55-48-93-46-22','Cobre','No.354','Obrera','Cuauhtemoc',68000);
Query OK, 1 row affected (0.00 sec)
mysql> insert into Usuario
values('367378','Yanez','Camacho','Gabriela','53-80-78-43','Tesoro','No.53','Ocotla','Tlalpan',14500);
Query OK, 1 row affected (0.01 sec)
mysql> insert into Usuario
values('346127','Torres','Benet','Daniel','55-03-56-78-23','Hormiga','No.31','Ojito
de Agua','Iztapalapa',95000);
Query OK, 1 row affected (0.00 sec)
mysql> insert into Usuario
values('389023','Castro','Brecher','Eduardo','55-28-93-67-83','Mango','No.56','Olimpica
Radio','Naucalpan',53698);
Query OK, 1 row affected (0.00 sec)
mysql>
insert into Usuario values('458903','Martinez','Fuentes','Diana
Paola','55-68-90-12-45','Durango','No.123','OlivarConde','Alvaro
Obregon',14000);
Query OK, 1 row affected (0.00 sec)
mysql> insert into Usuario
values('103479','Bas','Galvan','Danna
Atziri','55-27-83-90-35','Violeta','No.54','Jaguay','Azcapotzalco',2950);
Query OK, 1 row affected (0.00 sec)
mysql>
insert into Usuario values('721046','Cabrera','Gomez','Veronica','53-85-17-23','Rafael','No.213','La
Ascension','Tezoyuca',52784);
Query OK, 1 row affected (0.00 sec)
mysql> insert into Usuario
values('264378','Cantero','Herrera','Victor
Manuel','55-80-47-85','Mexiquense','No.143','Candelaria','Xochimilco',16629);
Query OK, 1 row affected (0.01 sec)
mysql> insert into Usuario
values('103983','Delgado','Jurado','Guadalupe','55-26-36-36-89','Chile','No.08','AlvaIxtlixochitl','Ecatepec',55287);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> describe Usuario;
+------------------+-------------+------+-----+---------+-------+
| Field
| Type | Null | Key |
Default | Extra |
+------------------+-------------+------+-----+---------+-------+
| Codigo_Uruario
| varchar(15) | YES | | NULL
| |
|
Apellido_Paterno | varchar(30) | YES
| | NULL |
|
|
Apellido_Materno | varchar(30) | YES
| | NULL |
|
|
Nombre_es | varchar(30) | YES | |
NULL | |
|
Telefono_Usuario | varchar(20) | YES | | NULL
| |
|
Calle | varchar(15) | YES | |
NULL | |
|
Numero | varchar(15) | YES | |
NULL | |
|
Colonia | varchar(15) | YES | |
NULL | |
|
Municipio | varchar(15) | YES | |
NULL | |
|
Codigo_Postal | int(11) | YES
| | NULL |
|
+------------------+-------------+------+-----+---------+-------+
10 rows in set (0.02 sec)
mysql> select * from Usuario;
+----------------+------------------+------------------+---------------+------------------+------------+--------+-----------------+----------------+---------------+
|
Codigo_Uruario | Apellido_Paterno | Apellido_Materno | Nombre_es | Telefono_Usuario | Calle | Numero | Colonia | Municipio | Codigo_Postal |
+----------------+------------------+------------------+---------------+------------------+------------+--------+-----------------+----------------+---------------+
|
563784 | Hernandez | Beltran | Angela | 55-26-73-42-52 | Margarita
| No.23 | Buenavista | Tultitlan |
54955 |
|
274834 | Gonzalez | Leyva | Ana Claudia | 55-48-93-46-22 | Cobre
| No.354 | Obrera |
Cuauhtemoc | 68000 |
|
367378 | Yanez | Camacho | Gabriela | 53-80-78-43 | Tesoro | No.53
| Ocotla | Tlalpan | 14500 |
|
346127 | Torres | Benet | Daniel |
55-03-56-78-23 | Hormiga | No.31
| Ojito de Agua | Iztapalapa |
95000 |
|
389023 | Castro | Brecher | Eduardo | 55-28-93-67-83 | Mango
| No.56 | Olimpica Radio | Naucalpan |
53698 |
|
458903 | Martinez | Fuentes | Diana Paola | 55-68-90-12-45 | Durango
| No.123 | OlivarConde |
Alvaro Obregon | 14000 |
|
103479 | Bas | Galvan | Danna Atziri | 55-27-83-90-35 | Violeta
| No.54 | Jaguay | Azcapotzalco |
2950 |
|
721046 | Cabrera | Gomez | Veronica | 53-85-17-23 | Rafael | No.213 | La Ascension | Tezoyuca |
52784 |
|
264378 | Cantero | Herrera | Victor Manuel | 55-80-47-85 | Mexiquense | No.143 | Candelaria | Xochimilco |
16629 |
|
103983 | Delgado | Jurado | Guadalupe | 55-26-36-36-89 | Chile
| No.08 | AlvaIxtlixochit | Ecatepec |
55287 |
+----------------+------------------+------------------+---------------+------------------+------------+--------+-----------------+----------------+---------------+
10 rows in set (0.01 sec)
mysql>
Concesionaria
Automotriz
Automóvil
Enter password: ****
Welcome to
the MySQL monitor. Commands end with ;
or \g.
Your MySQL
connection id is 8
Server
version: 6.0.4-alpha-community-log MySQL Community Server (GPL)
Type
'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database
ConcesionariaAutomotriz;
ERROR 1007 (HY000): Can't create database
'concesionariaautomotriz'; database exists
mysql>
show databases;
+-------------------------+
|
Database |
+-------------------------+
|
information_schema |
|
bibliotecamunicipal |
|
concesionariaautomotriz |
|
ministeriopublico |
|
mysql |
|
phpmyadmin |
| test |
+-------------------------+
7 rows in
set (0.00 sec)
mysql>
use ConcesionariaAutomotriz;
Database
changed
mysql>
show tables;
Empty set (0.02 sec)
mysql> create table
Automovil(Matricula_Automovil varchar(20),Modelo_Automovil
varchar(30),Marca_Automovil varchar(30),Color_Automovil varchar(15),RFC_Cliente
varchar(30),Matricula_AutomovilNuevo varc
har(30),Matricula_AutomovilUsado
varchar(30),Codigo_Taller integer);
Query OK,
0 rows affected (0.16 sec)
mysql>
insert into Automovil values('JDS-80-80','Mito GTA','Alfa
Romero','Rojo','MMFR2920102238','TSK-45-35','HSG-32-42',262828);
Query OK,
1 row affected (0.02 sec)
mysql>
insert into Automovil values('YBU-80-66','Clio R.S.200
EDC','Renault','Amarillo','AVRD7234799221','RTL-65-87','YER-46-24',523653);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Automovil
values('WLU-94-69','DeZir','Renault','Negro','CCF202838123231','YQR-12-56','FWA-35-51',790356);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Automovil values('GAY-37-83','S4','Audi','Azul
Rey','FZMC2783912384','TOL-36-76','GAA-54-61',120456);
Query OK,
1 row affected (0.01 sec)
mysql>
insert into Automovil
values('JGL-82-95','370Z','Nissan','Blanco','LRLMC628469248','ERT-25-38','JSE-93-37',368923);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Automovil values('XFK-54-97','Mustang
2015','Ford','Gris','PAAN8444765483','JKR-43-76','YOU-23-53',630375);
Query OK,
1 row affected (0.01 sec)
mysql>
insert into Automovil
values('GAK-67-01','F430','Ferrari','Rojo','CMJA8410399343','YTL-75-23','WEL-34-12',129349);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Automovil values('DZG-20-01','R8
e-tron','Audi','Negro','JCE623823024823','FGT-35-56','YTZ-43-51',547804);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Automovil values('UUL-75-16','SLS AMG Electric
Drive','Mercedes-Benz','Amarillo','CCRI62464624953','FHS-24-35','LKS-34-52',357486);
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Automovil values('TKG-46-06','Focus
RS','Ford','Verde','HYMA4435352255','GSW-35-73','GAQ-35-76',467899);
Query OK,
1 row affected (0.00 sec)
mysql>
describe Automovil;
+--------------------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+--------------------------+-------------+------+-----+---------+-------+
| Matricula_Automovil | varchar(20) | YES | |
NULL | |
| Modelo_Automovil | varchar(30) | YES | |
NULL | |
| Marca_Automovil | varchar(30) | YES | |
NULL | |
| Color_Automovil | varchar(15) | YES | |
NULL | |
| RFC_Cliente | varchar(30) | YES | |
NULL | |
| Matricula_AutomovilNuevo | varchar(30) |
YES |
| NULL | |
| Matricula_AutomovilUsado | varchar(30) | YES | |
NULL | |
| Codigo_Taller | int(11) | YES
| | NULL |
|
+--------------------------+-------------+------+-----+---------+-------+
8 rows in
set (0.01 sec)
mysql>
select * from Automovil;
+---------------------+------------------------+-----------------+-----------------+-----------------+--------------------------+--------------------------+---------------+
| Matricula_Automovil | Modelo_Automovil | Marca_Automovil | Color_Automovil |
RFC_Cliente |
Matricula_AutomovilNuevo | Matricula_AutomovilUsado | Codigo_Taller |
+---------------------+------------------------+-----------------+-----------------+-----------------+--------------------------+--------------------------+---------------+
| JDS-80-80 | Mito GTA | Alfa Romero | Rojo | MMFR2920102238 | TSK-45-35 | HSG-32-42 | 262828 |
| YBU-80-66 | Clio R.S.200 EDC | Renault | Amarillo | AVRD7234799221 | RTL-65-87 | YER-46-24 | 523653 |
| WLU-94-69 | DeZir | Renault | Negro | CCF202838123231 | YQR-12-56 | FWA-35-51 | 790356 |
| GAY-37-83 | S4 | Audi | Azul Rey | FZMC2783912384 | TOL-36-76 | GAA-54-61 | 120456 |
| JGL-82-95 | 370Z | Nissan | Blanco | LRLMC628469248 | ERT-25-38 | JSE-93-37 | 368923 |
| XFK-54-97 | Mustang 2015 | Ford | Gris | PAAN8444765483 | JKR-43-76 | YOU-23-53 |
630375 |
| GAK-67-01 | F430 | Ferrari | Rojo | CMJA8410399343 | YTL-75-23 | WEL-34-12 | 129349 |
| DZG-20-01 | R8 e-tron | Audi | Negro | JCE623823024823 | FGT-35-56 | YTZ-43-51 | 547804 |
| UUL-75-16 | SLS AMG Electric Drive |
Mercedes-Benz | Amarillo | CCRI62464624953 | FHS-24-35 | LKS-34-52 | 357486 |
| TKG-46-06 | Focus RS | Ford | Verde | HYMA4435352255 | GSW-35-73 | GAQ-35-76 | 467899 |
+---------------------+------------------------+-----------------+-----------------+-----------------+--------------------------+--------------------------+---------------+
10 rows in
set (0.00 sec)
mysql>
Cliente
mysql> create table Cliente(RFC_Cliente
varchar(30),Apellido_Paterno varchar(30),Apellido_Materno varchar(30),Nombre_es
varchar(50),Calle varchar(15),Numero integer,Colonia varchar(30),Municipio
varch
ar(15),Codigo_Postal integer,Telefono_Cliente
varchar(30));
Query OK,
0 rows affected (0.08 sec)
mysql>
show tables;
+-----------------------------------+
|
Tables_in_concesionariaautomotriz |
+-----------------------------------+
|
automovil |
|
cliente |
+-----------------------------------+
2 rows in
set (0.02 sec)
mysql>
insert into Cliente values('MMFR2920102238','Matamoros','Martinez','Flor de
Rosio','Fray',12,'Misioneros','Naucalpan',53100,'55-39-27-29-23');
Query OK,
1 row affected (0.01 sec)
mysql> insert into Cliente
values('AVRD7234799221','Aldana','Verduzco','Rodolfo Daniel','Jon de
Cuernavaca',20,'Colinas de San Mateo','Naucalpan',53218,'55-28-49-30-25');
Query OK,
1 row affected, 1 warning (0.00 sec)
mysql>
insert into Cliente values('CCF202838123231','Cortes','Camaño','Fidel','Jose de
San Martin',39,'Fracc.Las Americas','Ecatepec',55070,'55-27-19-30-23');
Query OK,
1 row affected, 2 warnings (0.00 sec)
mysql> insert into Cliente
values('FZMC2783912384','Farias','Zambrano','Maria de los
Angeles','Lago',50,'Morelos','Ecatepec',55070,'55-21-95-73-89');
Query OK, 1
row affected (0.00 sec)
mysql>
insert into Cliente values('LRLMC628469248','Lopez','Rangel','Luz Maria del
Carmen','Dominio',47,'Morelos','Ecatepec',55070,'55-20-13-45-67');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Cliente values('PAAN8444765483','Pinon','Aviles','Anayatzin','Arroyo',38,'Fracionaria','Izcalli',55030,'55-20-93-82-65');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Cliente values('CMJA8410399343','Cardenas','Martinez','Jose
Angel','Flamingo',56,'Colima','Atizapan',53972,'55-20-14-32-89');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Cliente
values('JCE623823024823','Jimenez','Cuevara','Eduardo','Matamoros',12,'San
Juan','Sevada',52874,'55-39-02-76-34');
Query OK,
1 row affected (0.02 sec)
mysql>
insert into Cliente
values('CCRI62464624953','Contreras','Castro','Ricardo','Vias',37,'Marianita','Libina',51923,'55-20-47-39-45');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Cliente values('HYMA4435352255','Hernandez','Yanez','Magdalena','Cobre',63,'Foranea','Tultitlan',54955,'55-29-30-23-44');
Query OK,
1 row affected (0.00 sec)
mysql>
describe Cliente;
+------------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+------------------+-------------+------+-----+---------+-------+
|
RFC_Cliente | varchar(30) | YES | |
NULL | |
| Apellido_Paterno | varchar(30) | YES | |
NULL | |
| Apellido_Materno | varchar(30) | YES | |
NULL | |
| Nombre_es | varchar(50) | YES | |
NULL | |
| Calle | varchar(15) | YES | |
NULL | |
| Numero | int(11) | YES
| | NULL |
|
| Colonia | varchar(30) | YES | |
NULL | |
| Municipio | varchar(15) | YES | |
NULL | |
| Codigo_Postal | int(11) | YES
| | NULL |
|
| Telefono_Cliente | varchar(30) | YES | |
NULL | |
+------------------+-------------+------+-----+---------+-------+
10 rows in
set (0.03 sec)
mysql>
select * from Cliente;
+-----------------+------------------+------------------+----------------------+-----------------+--------+----------------------+-----------+---------------+------------------+
| RFC_Cliente | Apellido_Paterno | Apellido_Materno |
Nombre_es | Calle | Numero | Colonia | Municipio | Codigo_Postal |
Telefono_Cliente |
+-----------------+------------------+------------------+----------------------+-----------------+--------+----------------------+-----------+---------------+------------------+
| MMFR2920102238 | Matamoros | Martinez | Flor de Rosio | Fray | 12 | Misioneros | Naucalpan | 53100 | 55-39-27-29-23 |
| AVRD7234799221 | Aldana | Verduzco | Rodolfo Daniel | Jon de Cuernava | 20 | Colinas de San Mateo | Naucalpan
| 53218 | 55-28-49-30-25 |
| CCF202838123231 | Cortes | Cama | Fidel | Jose de San Mar | 39 | Fracc.Las Americas | Ecatepec
| 55070 |
55-27-19-30-23 |
| FZMC2783912384 | Farias | Zambrano | Maria de los Angeles | Lago | 50 | Morelos | Ecatepec |
55070 | 55-21-95-73-89 |
| LRLMC628469248 | Lopez | Rangel | Luz Maria del Carmen |
Dominio | 47 | Morelos | Ecatepec |
55070 | 55-20-13-45-67 |
| PAAN8444765483 | Pinon | Aviles | Anayatzin | Arroyo |
38 | Fracionaria |
Izcalli | 55030 | 55-20-93-82-65 |
| CMJA8410399343 | Cardenas | Martinez | Jose Angel | Flamingo |
56 | Colima |
Atizapan | 53972 | 55-20-14-32-89 |
| JCE623823024823 | Jimenez | Cuevara | Eduardo | Matamoros |
12 | San Juan |
Sevada | 52874 | 55-39-02-76-34 |
| CCRI62464624953 | Contreras | Castro | Ricardo | Vias | 37 | Marianita | Libina |
51923 | 55-20-47-39-45 |
| HYMA4435352255 | Hernandez | Yanez | Magdalena | Cobre |
63 | Foranea |
Tultitlan | 54955 |
55-29-30-23-44 |
+-----------------+------------------+------------------+----------------------+-----------------+--------+----------------------+-----------+---------------+------------------+
10 rows in
set (0.00 sec)
mysql>
Automóvil
Nuevo
mysql> create table
AutomovilNuevo(Matricula_AutomovilNuevo varchar(30),Numero_AutomovilNuevo
integer,Modelo_AutomovilNuevo varchar(50),Marca_AutomovilNuevo varchar(35),Color_AutomovilNuevo
varchar(20
));
Query OK,
0 rows affected (0.08 sec)
mysql>
show tables;
+-----------------------------------+
|
Tables_in_concesionariaautomotriz |
+-----------------------------------+
|
automovil |
| automovilnuevo |
|
cliente |
+-----------------------------------+
3 rows in
set (0.02 sec)
mysql>
insert into AutomovilNuevo values('TSK-45-35',134476,'Coupé Final
Edition','Mercedes-Benz','Violeta');
Query OK,
1 row affected, 1 warning (0.00 sec)
mysql>
insert into AutomovilNuevo values('RTL-65-87',789345,'12C
Spider','McLaren','Azul');
Query OK,
1 row affected (0.02 sec)
mysql>
insert into AutomovilNuevo values('YQR-12-56',289403,'Zonda
R','Pagani','Rojo');
Query OK,
1 row affected (0.02 sec)
mysql>
insert into AutomovilNuevo
values('TOL-36-76',863027,'F12berlinetta','Ferrari','Rojo');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilNuevo values('ERT-25-38',309456,'Sesto
Elemento','Lamborghini','Negro');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilNuevo values('JKR-43-76',912048,'Roadyacht GTS','Savage
Rivale','Naranja');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilNuevo values('YTL-75-23',238208,'RT 12 S','RUF','Verde');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilNuevo values('FGT-35-56',201843,'L148','Lucra','Negro');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilNuevo values('FHS-24-35',934942,'FF','Ferrari','Rojo');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilNuevo
values('GSW-35-73',934724,'C-X75','Jaguar','Naranja');
Query OK,
1 row affected (0.00 sec)
mysql>
describe AutomovilNuevo;
+--------------------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+--------------------------+-------------+------+-----+---------+-------+
| Matricula_AutomovilNuevo | varchar(30) |
YES |
| NULL | |
| Numero_AutomovilNuevo | int(11) | YES
| | NULL |
|
| Modelo_AutomovilNuevo | varchar(50) | YES | |
NULL | |
| Marca_AutomovilNuevo | varchar(35) | YES | |
NULL | |
| Color_AutomovilNuevo | varchar(20) | YES | |
NULL | |
+--------------------------+-------------+------+-----+---------+-------+
5 rows in
set (0.05 sec)
mysql>
select * from AutomovilNuevo;
+--------------------------+-----------------------+-----------------------+----------------------+----------------------+
| Matricula_AutomovilNuevo |
Numero_AutomovilNuevo | Modelo_AutomovilNuevo | Marca_AutomovilNuevo |
Color_AutomovilNuevo |
+--------------------------+-----------------------+-----------------------+----------------------+----------------------+
| TSK-45-35 | 134476 | Coup | Mercedes-Benz | Violeta |
| RTL-65-87 | 789345 | 12C Spider | McLaren | Azul |
| YQR-12-56 | 289403 | Zonda R | Pagani | Rojo |
| TOL-36-76 | 863027 | F12berlinetta | Ferrari | Rojo |
| ERT-25-38 | 309456 | Sesto Elemento | Lamborghini | Negro |
| JKR-43-76 | 912048 | Roadyacht GTS | Savage Rivale | Naranja |
| YTL-75-23 | 238208 | RT 12 S | RUF | Verde |
| FGT-35-56 | 201843 | L148 | Lucra | Negro |
| FHS-24-35 | 934942 | FF | Ferrari | Rojo |
| GSW-35-73 | 934724 | C-X75 | Jaguar | Naranja |
+--------------------------+-----------------------+-----------------------+----------------------+----------------------+
10 rows in
set (0.01 sec)
mysql>
Automóvil Usado
mysql> create table
AutomovilUsado(Matricula_AutomovilUsado varchar(30),Numero_Kilometros
varchar(20),Modelo_AutomovilUsado varchar(50),Marca_AutomovilUsado
varchar(35),Color_AutomovilUsado varchar(20
));
Query OK,
0 rows affected (0.38 sec)
mysql> show
tables;
+-----------------------------------+
|
Tables_in_concesionariaautomotriz |
+-----------------------------------+
|
automovil |
|
automovilnuevo |
|
automovilusado |
| cliente |
+-----------------------------------+
4 rows in
set (0.00 sec)
mysql>
insert into AutomovilUsado values('HSG-32-42','34124333456','Dart
GT','Dodge','Amarillo');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilUsado values('YER-46-24','28937483945','R8
e-tron','Audi','Rojo');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilUsado values('FWA-35-51','63092345672','Modelo
S','Tesla','Negro');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilUsado
values('GAA-54-61','88391203745','ATS','Cadillac','Azul');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilUsado
values('JSE-93-37','19348324930','F-15','Ford','Negro');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilUsado values('YOU-23-53','28493874531','Cooper S
Roadster','Mini','Rojo');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilUsado
values('WEL-34-12','29487382910','FX50','Infiniti','Azul Rey');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilUsado values('YTZ-43-51','23892089434','Exige s
Roadster','Lotus','Naranja');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilUsado
values('LKS-34-52','46492089311','Veneno','Lamborghini','Rojo');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into AutomovilUsado
values('GAQ-35-76','72903872754','Spano','GTA','Blanco');
Query OK,
1 row affected (0.00 sec)
mysql>
describe AutomovilUsado;
+--------------------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+--------------------------+-------------+------+-----+---------+-------+
| Matricula_AutomovilUsado | varchar(30) |
YES |
| NULL | |
| Numero_Kilometros | varchar(20) | YES | |
NULL | |
| Modelo_AutomovilUsado | varchar(50) | YES | |
NULL | |
| Marca_AutomovilUsado | varchar(35) | YES | |
NULL | |
| Color_AutomovilUsado | varchar(20) | YES | |
NULL | |
+--------------------------+-------------+------+-----+---------+-------+
5 rows in
set (0.02 sec)
mysql>
select * from AutomovilUsado;
+--------------------------+-------------------+-----------------------+----------------------+----------------------+
| Matricula_AutomovilUsado |
Numero_Kilometros | Modelo_AutomovilUsado | Marca_AutomovilUsado |
Color_AutomovilUsado |
+--------------------------+-------------------+-----------------------+----------------------+----------------------+
| HSG-32-42 | 34124333456 | Dart GT | Dodge | Amarillo |
| YER-46-24 | 28937483945 | R8 e-tron | Audi | Rojo |
| FWA-35-51 | 63092345672 | Modelo S | Tesla | Negro |
| GAA-54-61 | 88391203745 | ATS
| Cadillac | Azul |
| JSE-93-37 | 19348324930 | F-15 | Ford | Negro |
|
YOU-23-53 |
28493874531 | Cooper S
Roadster | Mini | Rojo |
|
WEL-34-12 |
29487382910 | FX50 | Infiniti | Azul Rey |
|
YTZ-43-51 |
23892089434 | Exige s Roadster | Lotus | Naranja |
|
LKS-34-52 |
46492089311 | Veneno | Lamborghini | Rojo |
|
GAQ-35-76 |
72903872754 | Spano | GTA | Blanco |
+--------------------------+-------------------+-----------------------+----------------------+----------------------+
10 rows in
set (0.01 sec)
mysql>
Taller
mysql> create table Taller(Codigo_Taller integer,Fecha_Reparacion
date,Numero_Horas varchar(15),RFC_Mecanico varchar(50));
Query OK,
0 rows affected (0.09 sec)
mysql>
show tables;
+-----------------------------------+
|
Tables_in_concesionariaautomotriz |
+-----------------------------------+
| automovil |
| automovilnuevo |
| automovilusado |
| cliente |
| taller |
+-----------------------------------+
5 rows in
set (0.16 sec)
mysql>
insert into Taller values(262828,'2013/04/23','14Hrs.','BMJL637287249202');
Query OK,
1 row affected (0.02 sec)
mysql>
insert into Taller values(523653,'2012/01/14','10Hrs.','GRAL234846345723');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Taller values(790356,'2014/06/02','6Hrs','CFAN248243403456');
Query OK,
1 row affected (0.02 sec)
mysql>
insert into Taller values(120456,'2014/08/11','1 Dia','VADN423659652921');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Taller values(368923,'2013/07/20','2Hrs.','GFMR643946920342');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Taller values(630375,'2011/09/29','1Hrs.','JJFR3643452480241');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Taller values(129349,'2014/12/14','12Hrs.','HCJP896349237352');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Taller values(547804,'2015/02/19','2 Dias','LEYT7347752570243');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Taller values(357486,'2014/03/17','2Hrs.','BELR634973928576');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Taller values(467899,'2013/10/01','4Hrs.','HYMO783452463545');
Query OK,
1 row affected (0.00 sec)
mysql>
describe Taller;
+------------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+------------------+-------------+------+-----+---------+-------+
|
Codigo_Taller | int(11) | YES
| | NULL |
|
| Fecha_Reparacion | date | YES
| | NULL |
|
| Numero_Horas | varchar(15) | YES | |
NULL | |
| RFC_Mecanico | varchar(50) | YES | |
NULL | |
+------------------+-------------+------+-----+---------+-------+
4 rows in
set (0.03 sec)
mysql>
select * from Taller;
+---------------+------------------+--------------+-------------------+
| Codigo_Taller | Fecha_Reparacion |
Numero_Horas | RFC_Mecanico |
+---------------+------------------+--------------+-------------------+
|
262828 | 2013-04-23 |
14Hrs. | BMJL637287249202 |
|
523653 | 2012-01-14 |
10Hrs. | GRAL234846345723 |
|
790356 | 2014-06-02 |
6Hrs | CFAN248243403456 |
|
120456 | 2014-08-11 | 1
Dia | VADN423659652921 |
|
368923 | 2013-07-20 |
2Hrs. | GFMR643946920342 |
|
630375 | 2011-09-29 |
1Hrs. | JJFR3643452480241 |
|
129349 | 2014-12-14 | 12Hrs. | HCJP896349237352 |
|
547804 | 2015-02-19 | 2
Dias | LEYT7347752570243 |
| 357486 | 2014-03-17 | 2Hrs. | BELR634973928576 |
| 467899 | 2013-10-01 | 4Hrs. | HYMO783452463545 |
+---------------+------------------+--------------+-------------------+
10 rows in
set (0.00 sec)
mysql>
Mecánico
mysql> create table Mecanico(RFC_Mecanico
varchar(50),Apellido_Paterno varchar(30),Apellido_Materno varchar(30),Nombre_es
varchar(30),Salario varchar(30),Fecha_Contratacion date);
Query OK,
0 rows affected (0.08 sec)
mysql>
show tables;
+-----------------------------------+
|
Tables_in_concesionariaautomotriz |
+-----------------------------------+
| automovil |
| automovilnuevo |
| automovilusado |
| cliente |
| mecanico |
|
taller |
+-----------------------------------+
6 rows in
set (0.01 sec)
mysql>
insert into Mecanico
values('BMJL637287249202','Brecher','Martinez','Julieta','$2,647','1998/04/23');
Query OK,
1 row affected (0.02 sec)
mysql>
insert into Mecanico values('GRAL234846345723','Gonzalez','Reyes','Ana Laura','$4,894','1995/05/11');
Query OK,
1 row affected (0.02 sec)
mysql>
insert into Mecanico
values('CFAN248243403456','Camacho','Ferretis','Angel','$2,367','1976/01/03');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Mecanico values('VADN423659652921','Vazquez','Aran','Daniel','$1,256','1986/12/23');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Mecanico values('GFMR643946920342','Gomez','Fili','Maria
Rosa','$2,363','1993/02/20');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Mecanico
values('JJFR3643452480241','Jurado','Jimenez','Francisco','$1,063','1990/03/27');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Mecanico values('HCJP896349237352','Huerta','Cortez','Jose
Pedro','$1,234','1987/09/17');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Mecanico
values('LEYT7347752570243','Lopez','Escobado','Yarit','$2,345','1985/12/18');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Mecanico
values('BELR634973928576','Balchor','Escorpion','Lorena','$6,425','1990/10/05');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Mecanico
values('HYMO783452463545','Hernandez','Leyva','Monserrat','$3,455','2000/06/10');
Query OK,
1 row affected (0.00 sec)
mysql>
describe Mecanico;
+--------------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+--------------------+-------------+------+-----+---------+-------+
|
RFC_Mecanico | varchar(50) | YES | |
NULL | |
| Apellido_Paterno | varchar(30) | YES | |
NULL | |
| Apellido_Materno | varchar(30) | YES | |
NULL | |
| Nombre_es | varchar(30) | YES | |
NULL | |
| Salario | varchar(30) | YES | |
NULL | |
| Fecha_Contratacion | date | YES
| | NULL |
|
+--------------------+-------------+------+-----+---------+-------+
6 rows in
set (0.02 sec)
mysql>
select * from Mecanico;
+-------------------+------------------+------------------+------------+---------+--------------------+
| RFC_Mecanico | Apellido_Paterno | Apellido_Materno |
Nombre_es | Salario | Fecha_Contratacion
|
+-------------------+------------------+------------------+------------+---------+--------------------+
| BMJL637287249202 | Brecher | Martinez | Julieta | $2,647
| 1998-04-23 |
| GRAL234846345723 | Gonzalez | Reyes | Ana Laura | $4,894
| 1995-05-11 |
| CFAN248243403456 | Camacho | Ferretis | Angel | $2,367
| 1976-01-03 |
| VADN423659652921 | Vazquez | Aran | Daniel | $1,256
| 1986-12-23 |
| GFMR643946920342 | Gomez | Fili | Maria Rosa | $2,363 | 1993-02-20 |
| JJFR3643452480241 | Jurado | Jimenez | Francisco | $1,063
| 1990-03-27 |
| HCJP896349237352 | Huerta | Cortez | Jose Pedro | $1,234 | 1987-09-17 |
| LEYT7347752570243 | Lopez | Escobado | Yarit | $2,345
| 1985-12-18 |
| BELR634973928576 | Balchor | Escorpion | Lorena | $6,425
| 1990-10-05 |
|
HYMO783452463545 | Hernandez | Leyva | Monserrat | $3,455
| 2000-06-10 |
+-------------------+------------------+------------------+------------+---------+--------------------+
10 rows in
set (0.00 sec)
mysql>
Merco Sur
Centro de
Enseñanza
Alumnos
Equipo
de Futbol
Equipo
Merco Sur
País
Enter password: *************
Welcome to
the MySQL monitor. Commands end with ;
or \g.
Your MySQL
connection id is 9
Server
version: 6.0.4-alpha-community-log MySQL Community Server (GPL)
Type
'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
create database MercoSur;
Query OK,
1 row affected (0.00 sec)
mysql>
show databases;
+--------------------+
|
Database |
+--------------------+
|
information_schema |
|
mercosur |
|
ministeriopublico |
|
mysql |
|
phpmyadmin |
|
prueba1 |
|
test |
+--------------------+
7 rows in
set (0.02 sec)
mysql>
use MercoSur;
Database
changed
mysql>
create table Pais(Codigo_Pais integer,Nombre_Pais varchar(30),Codigo_Producto varchar(50));
Query OK,
0 rows affected (0.03 sec)
mysql>
show tables;
+--------------------+
|
Tables_in_mercosur |
+--------------------+
|
pais |
+--------------------+
1 row in
set (0.00 sec)
mysql>
insert into Pais values(52,'Mexico','127035240760');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Pais values(1,'Estados Unidos','012345678905');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Pais values(54,'Argentina','7501234512343');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Pais values(591,'Bolivia','5901234123457');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Pais values(57,'Colombia','4937900203229');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Pais values(55,'Brasil','9788492808274');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Pais values(595,'Paraguay','4796001100011');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Pais values(51,'Peru','8412345000001');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Pais values(598,'Uruguay','5012345678900');
Query OK,
1 row affected (0.00 sec)
mysql>
insert into Pais values(1,'Canada','138055651547');
Query OK,
1 row affected (0.00 sec)
mysql>
describe Pais;
+-----------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+-----------------+-------------+------+-----+---------+-------+
|
Codigo_Pais | int(11) | YES
| | NULL |
|
| Nombre_Pais | varchar(30) | YES | |
NULL | |
| Codigo_Producto | varchar(50) | YES | |
NULL | |
+-----------------+-------------+------+-----+---------+-------+
3 rows in
set (0.00 sec)
mysql>
select * from Pais;
+-------------+----------------+-----------------+
| Codigo_Pais | Nombre_Pais | Codigo_Producto |
+-------------+----------------+-----------------+
|
52 | Mexico |
127035240760 |
|
1 | Estados Unidos | 012345678905
|
| 54 | Argentina | 7501234512343 |
|
591 | Bolivia |
5901234123457 |
|
57 | Colombia |
4937900203229 |
|
55 | Brasil |
9788492808274 |
|
595 | Paraguay |
4796001100011 |
| 51 | Peru | 8412345000001 |
| 598 | Uruguay | 5012345678900 |
| 1 | Canada | 138055651547 |
+-------------+----------------+-----------------+
10 rows in
set (0.00 sec)
mysql>
Producto
mysql> create table
Producto(Codigo_Producto Varchar(30),Nombre_Producto varchar(70),Descripcion
varchar(70));
Query OK,
0 rows affected (0.03 sec)
mysql>
show tables;
+--------------------+
|
Tables_in_mercosur |
+--------------------+
|
pais |
| producto |
+--------------------+
2 rows in
set (0.00 sec)
mysql> insert into Producto
values('127035240760','Tequila,Petroleo, televisores a color, navajas y
maquinas de afeitar, vehiculos de transporte','Comercio Internacional, SA de
CV');
Query OK,
1 row affected, 1 warning (0.02 sec)
mysql> insert into Producto
values(54024,'Maracuya, pulpa','cual una vez seleccionada y lavada, se despulpa
y se envasa en bolsas');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Producto values(16032,'Televisores,
telefonos, equipos de musica ','comercial ViewSonic VT3200-L de 32" y
alta definicion Full HD ,Un puerto de control RS232 ');
Query OK,
1 row affected, 2 warnings (0.00 sec)
mysql> insert into Producto
values(45003,'Gas natural y petroleo','MANUFACTURADO 342 PROPANO Y BUTANO
LICUADOS 3421 Propano licuado 3425 Butanos licuado 343');
Query OK,
1 row affected, 1 warning (0.00 sec)
mysql> insert into Producto
values(21044,'Cafe , Carbon ,Banano , Flores','contienen un 20% de proteinas');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Producto
values(15150,'Mecanica, electricos y equipos de transporte','STEFOR VALOR:
$ Contactar via Email o Telefono. Alberto Cosignani Rowe Fono - Fax
6354480 Celular');
Query OK,
1 row affected, 2 warnings (0.00 sec)
mysql> insert into Producto
values(96105,'Agricola y Ganadero','Carne, leche, huevos y lana');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Producto
values(32239,'Aceitesnpetroleo,minerales,Redes confeccionadas para la pesca','metodos
de captura,En latados,lat30457');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Producto
values(45247,'La Plata,productos alimenticios ','Productos
Dieteticos,Aretes,Pulseras14,60,23');
Query OK,
1 row affected (0.00 sec)
mysql> insert into Producto
values(74376,'Transporte aereo,productos alimenticios de origen vegetal','PVR.
FOTO. XLR AERO.03.NC3FXX CONECTOR XLR 3 PIN HEMBRA AEREO NEUTRIK SERIE XX,Ricos
en minerales'
);
Query OK,
1 row affected, 1 warning (0.00 sec)
mysql>
describe Producto;
+-----------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+-----------------+-------------+------+-----+---------+-------+
| Codigo_Producto | varchar(30) | YES | |
NULL | |
| Nombre_Producto | varchar(70) | YES | |
NULL | |
|
Descripcion | varchar(70) | YES | |
NULL | |
+-----------------+-------------+------+-----+---------+-------+
3 rows in
set (0.00 sec)
mysql> select * from Producto;
+-----------------+------------------------------------------------------------------------+------------------------------------------------------------------------+
| Codigo_Producto | Nombre_Producto | Descripcion
|
+-----------------+------------------------------------------------------------------------+------------------------------------------------------------------------+
| 127035240760 | Tequila,Petroleo, televisores a color,
navajas y maquinas de afeitar, |
Comercio Internacional, SA de CV |
| 54024 | Maracuya, pulpa
| cual una vez seleccionada y lavada, se despulpa y se envasa en
bolsas |
| 16032 | Televisores, telefonos, equipos de
musica |
comercial ViewSonic VT3200-L de 32" y alta definicion Full HD ,Un puer |
| 45003 | Gas natural y petroleo
| MANUFACTURADO 342 PROPANO Y BUTANO LICUADOS 3421 Propano licuado
3425 |
| 21044 | Cafe , Carbon ,Banano ,
Flores
| contienen un 20% de proteinas |
| 15150 | Mecanica, electricos y equipos
de |
STEFOR VALOR: $ Contactar via Email o Telefono. Alberto Cosignani Rowe |
| 96105 | Agricola y Ganadero
| Carne, leche, huevos y lana |
| 32239 | Aceitesnpetroleo,minerales,Redes
confeccionadas para la pesca |
metodos de captura,En latados,lat30457 |
| 45247 | La Plata,productos
alimenticios |
Productos Dieteticos,Aretes,Pulseras14,60,23 |
| 74376 | Transporte aereo,productos
alimenticios de origen vegetal
| PVR. FOTO. XLR AERO.03.NC3FXX CONECTOR XLR 3 PIN HEMBRA AEREO
NEUTRIK |
+-----------------+------------------------------------------------------------------------+------------------------------------------------------------------------+
10 rows in set (0.00 sec)
mysql>
Centro de
Enseñanza
Alumnos
Enter password: ***
Welcome to the MySQL
monitor. Commands end with ; or \g.
Your MySQL
connection id is 5
Server version:
6.0.4-alpha-community-log MySQL Community Server (GPL)
Type 'help;' or '\h'
for help. Type '\c' to clear the buffer.
mysql> create
database Centro_de_Ensenanza;
Query OK, 1 row
affected (0.01 sec)
mysql> show
database;
ERROR 1064 (42000):
You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near 'database' at line 1
mysql> show
databases;
+---------------------+
| Database |
+---------------------+
|
information_schema |
|
centro_de_ensenanza |
| mysql |
| test |
+---------------------+
4 rows in set (0.00
sec)
mysql> use
Centro_de_Ensenanza;
Database changed
mysql> show
tables;
Empty set (0.00 sec)
mysql> create
table alumnos(rfc_alumno varchar(20) primary key,nombre_alumno
varchar(25),apellido_paterno varchar(15),apellido_materno varchar(15),fecha_nacimiento
date,municipio varchar(20),colonia varchar(25),calle varchar(25),numero
integer,lt integer,mz integer,codigo_postal integer,telefono_casa
varchar(10),telefono_celular varchar(25),indicencias varchar(10),rfc_profesor
varchar(15),codigo_asignatura varchar (10));
Query OK, 0 rows
affected (0.06 sec)
mysql> show
tables;
+-------------------------------+
|
Tables_in_centro_de_ensenanza |
+-------------------------------+
| alumnos |
+-------------------------------+
1 row in set (0.00
sec)
mysql> insert
into alumnos values('GAHD061221HJ2','Denisse','García','Hernández','2006/12/21','Tultitlán','Izcalli
del Valle','2da entrada de Colibri',33,2,35,54955,'5213-4456','55 2345
9031','ninguna','ARMF701202','000_001');
Query OK, 1 row
affected (0.01 sec)
mysql> insert
into alumnos values('GUVM060305FR3','Victor
Manuel','Gutíerrez','Vázquez','2006/03/05','Tultitlán','Izcalli del
Valle','Valle de los eucaliptos',40,5,10,54952,'5670-7010','55 8901
1133','ninguna','COMD803011','000_002');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into alumnos values('TACYK050512JD5','Yamile Karina','Tabuada','Cáseres','2005/05/12','Tultitlán','Izcalli
del Valle','Tenancingo',60,16,23,54957,'5363-5035','55 7890
3221','ninguna','CADL781107','000_003');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into alumnos values('GUSO070422OI4','Orlando','Guerrero','Sánchez','2007/04/22','Tultitlán','Valle
Verde','Hidalgo',12,18,51,54958,'4302-1389','55 3283
7890','2','ROVC821906','000_004');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into alumnos values('MEDY081216GF3','Yenifer','Mercado','Domínguez','2008/12/16','Tultitlán','Izcalli
del Valle','Camino Nacional Sur',14,22,28,54950,'2290-3485','55 2314
7102','1','PEPL752008','000_005');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into alumnos values('GOZC081022IB3','Cesar','González','Zamudio','2008/10/22','Tultitlán','Buena
Vista','Texcoco',70,50,32,54905,'4997-1212','55 6721
6545','2','MEHR732210','000_006');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into alumnos values('RAHX060613AX2','Xochitl','Ramírez','Hernández','2006/06/13','Tultitlán','Izcalli
del Valle','Av.de las Alamedas',5,15,40,54953,'9029-3748','55 1427
8833','1','GOCK812707','000_007');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into alumnos values('AODA070923VB2','Armando','Acosta','Dominguez','2007/09/23','Tultitlán','Valle
de Tules','Clavelina',8,17,12,54951,'8392-7701','55 3452
8923','1','FEMC742809','000_008');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into alumnos values('CARD061002QA2','Irvin Daniel','Cáseres','Rico','2006/10/02','Tultitlán','Izcalli
del Valle','Valle de las rosas',31,19,7,54959,'5380-8921','55 5621
9072','1','MESI751012','000_009');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into alumnos values('PECJ080730PL8','Jaqueline','Pérez','Cruz','2008/07/30','Tultitlán','Izcalli
del Valle','Benito',52,21,9,54956,'5380-2121','55 4232
7384','ninguna','AMALA690803','000_010');
Query OK, 1 row
affected (0.00 sec)
mysql> describe
alumnos;
+-------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+-------------+------+-----+---------+-------+
| rfc_alumno | varchar(20) | NO | PRI | NULL
| |
| nombre_alumno | varchar(25) | YES | |
NULL | |
|
apellido_paterno | varchar(15) |
YES |
| NULL | |
|
apellido_materno | varchar(15) |
YES |
| NULL | |
|
fecha_nacimiento | date | YES
| | NULL |
|
| municipio | varchar(20) | YES | |
NULL | |
| colonia | varchar(25) | YES | |
NULL | |
| calle | varchar(25) | YES | |
NULL | |
| número | int(11) |
YES |
| NULL | |
| lt | int(11) | YES
| | NULL |
|
| mz | int(11) | YES
| | NULL |
|
| código_postal | int(11) | YES
| | NULL |
|
| teléfono_casa |
varchar(10) | YES | | NULL
| |
| teléfono_celular | varchar(25) | YES | |
NULL | |
| indicencias | varchar(10) | YES | |
NULL | |
| rfc_profesor | varchar(15) | YES | |
NULL | |
| código_asignatura
| varchar(10) | YES | | NULL
| |
+-------------------+-------------+------+-----+---------+-------+
17 rows in set (0.01
sec)
mysql> select *
from alumnos;
+----------------+---------------+------------------+------------------+------------------+-----------+-------------------+-------------------------+--------+------+------+---------------+---------------+------------------+-------------+--------------+-------------------+
| rfc_alumno | nombre_alumno | apellido_paterno | apellido_materno
| fecha_nacimiento | municipio | colonia | calle | numero | lt | mz
| código_postal | teléfono_casa | teléfono_celular | indicencias |
rfc_profesor | código_asignatura |
+----------------+---------------+------------------+------------------+------------------+-----------+-------------------+-------------------------+--------+------+------+---------------+---------------+------------------+-------------+--------------+-------------------+
| GAHD061221HJ2 | Denisse | García | Hernández |
2006-12-21 | Tultitlán | Izcalli
del Valle | 2da entrada de Colibrí
| 33 | 2 |
35 | 54955 | 5213-4456 | 55 2345 9031 | ninguna | ARMF701202 | 000_001 |
| GUVM060305FR3 | Víctor Manuel | Gutiérrez | Vázquez | 2006-03-05 | Tultitlán | Izcalli del Valle | Valle
de los eucaliptos | 40 | 5 |
10 | 54952 | 5670-7010 | 55 8901 1133 | ninguna | COMD803011 | 000_002 |
| TACYK050512JD5 |
Yamile Karina | Tabuada | Cáceres | 2005-05-12 | Tultitlán | Izcalli del Valle |
Tenancingo | 60 |
16 | 23 | 54957 | 5363-5035 | 55 7890 3221 | ninguna | CADL781107 | 000_003 |
| GUSO070422OI4 | Orlando | Guerrero | Sánchez | 2007-04-22 | Tultitlán | Valle Verde | Hidalgo | 12 |
18 | 51 | 54958 | 4302-1389 | 55 3283 7890 |
2 | ROVC821906 | 000_004 |
| MEDY081216GF3 | Yenifer | Mercado | Domínguez |
2008-12-16 | Tultitlán | Izcalli
del Valle | Camino Nacional Sur
| 14 | 22 |
28 | 54950 |
2290-3485 | 55 2314 7102 | 1 | PEPL752008 | 000_005 |
| GOZC081022IB3 | Cesar | González | Zamudio | 2008-10-22 | Tultitlán | Buena Vista | Texcoco | 70 |
50 | 32 | 54905 | 4997-1212 | 55 6721 6545 | 2 | MEHR732210 | 000_006 |
| RAHX060613AX2 | Xochitl | Ramírez | Hernández |
2006-06-13 | Tultitlán | Izcalli
del Valle | Av. de las Alamedas
| 5 | 15 |
40 | 54953 |
9029-3748 | 55 1427 8833 | 1 | GOCK812707 | 000_007 |
| AODA070923VB2 | Armando | Acosta | Domínguez |
2007-09-23 | Tultitlán | Valle de
Tules | Clavelina | 8
| 17 |
12 | 54951 |
8392-7701 | 55 3452 8923 | 1 | FEMC742809 | 000_008 |
| CARD061002QA2 | Irvin Daniel | Cáceres | Rico | 2006-10-02 | Tultitlán | Izcalli del Valle | Valle
de las rosas | 31 |
19 | 7 | 54959 | 5380-8921 | 55 5621 9072 | 1 | MESI751012 | 000_009 |
| PECJ080730PL8 | Jaqueline | Pérez | Cruz | 2008-07-30 | Tultitlán | Izcalli del Valle |
Benito | 52 |
21 | 9 | 54956 | 5380-2121 | 55 4232 7384 | ninguna | AMALA690803 | 000_010 |
+----------------+---------------+------------------+------------------+------------------+-----------+-------------------+-------------------------+--------+------+------+---------------+---------------+------------------+-------------+--------------+-------------------+
10 rows in set (0.00
sec)
Profesor
mysql> create
table profesores(rfc_profesor varchar(25) primary key,nombre_profesor
varchar(30),apellido_paterno varchar(30),apellido_materno
varchar(30),fecha_nacimiento date,municipio varchar(40),colonia
varchar(40),calle varchar(40),numero integer,lt integer,mz
integer,codigo_postal integer,telefono_casa varchar(10),telefono_celular
varchar(20),indicencias varchar(20));
Query OK, 0 rows
affected (0.09 sec)
mysql> show
tables;
+-------------------------------+
|
Tables_in_centro_de_ensenanza |
+-------------------------------+
| alumnos |
| profesores |
+-------------------------------+
2 rows in set (0.05
sec)
mysql> insert
into profesores values('AEMM701202FT3','Maria
Felix','Arredonda','Molina','1970/02/12','Atizapan de Zaragoza','Fracc. Villa
de la Hacienda','Toril y Rodeo',4,12,32,52988,'5290-1890','55 6721
2780','ninguna');
Query OK, 1 row
affected (0.05 sec)
mysql> insert
into profesores
values('COMD803011NN8','Daniel','Corona','Macias','1980/11/30','Coacalco','Bosque
Central','Bosques del Valle',10,33,29,55701,'5389-0912','55 7283
8271','ninguna');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into profesores
values('CADL781107JK9','Lorena','Camacho','Dominguez','1978/07/11','Naucalpan
de Juarez','Fronera','Nueva San Rafael',21,54,16,53405,'5190-8272','55 7281
6921','2');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into profesores values('ROVM821906BV5','Maria
Carmen','Rodriguez','Vazquez','1982/06/19','Tultitlan','Unidad Morelos','Av.
Prados del Sur',5,43,2,54901,'5478-1212','55 5989 2598','5');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into profesores
values('PEPL752008GS7','Luis','Perez','Paredes','1975/08/20','Tlalnepantla','San
Juan Ixtacala','Av. Juárez y Venustiano_Carranza',8,8,10,54600,'7789-0203','55
3290 0495','2');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into profesores
values('MEHR732210VN5','Rodolfo','Mendoza','Hernandez','1973/10/22','Tlalnepantla','Lomas
de San Juan','Av. Pavon',19,7,8,54100,'1209-1819','55 3489 8493','1');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into profesores
values('GOCK812707KL3','Karla','Gonzalez','Cruz','1981/07/27','Coacalco','Bosques
de Coacalco','Av. Lomas de Murcia',23,9,19,55780,'2278-9090','55 0293
1909','ninguna');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into profesores
values('FEMC742809MF2','Claudia','Ferrera','Mendez','1974/09/28','Atizapan de
Zaragoza','Lomas de Atizapan','Av. Adolfo Ruiz',15,1,11,52670,'7782-1783','55
1012 9092','2');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into profesores
values('MESI751012FN0','Ivett','Medina','Sanchez','1975/12/10','Tultepec','Circuito
San Pablo','Barrio San Rafael',39,5,41,54981,'1289-8821','55 3289
2381','ninguna');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into profesores values('AMALA690803BS4','Adriana','Mateos','Lopez','1969/03/08','Atizapan
de Zaragoza','San Jose el Jaral','Primavera',56,18,30,52300,'5489-8100','55
6899 6690','2');
Query OK, 1 row
affected (0.00 sec)
mysql> describe
profesores;
+------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+-------------+------+-----+---------+-------+
| rfc_profesor | varchar(25) | NO | PRI | NULL |
|
|
nombre_profesor | varchar(30) | YES | |
NULL | |
| apellido_paterno |
varchar(30) | YES | | NULL
| |
| apellido_materno |
varchar(30) | YES | | NULL
| |
| fecha_nacimiento |
date | YES | |
NULL | |
| municipio | varchar(40) | YES | |
NULL | |
| colonia | varchar(40) | YES | |
NULL | |
| calle | varchar(40) | YES | |
NULL | |
| numero | int(11) | YES
| | NULL |
|
| lt | int(11) | YES
| | NULL |
|
| mz | int(11) | YES
| | NULL |
|
| codigo_postal | int(11) | YES
| | NULL |
|
| telefono_casa | varchar(10) | YES | |
NULL | |
| telefono_celular |
varchar(20) | YES | | NULL
| |
| indicencias | varchar(20) | YES | |
NULL | |
+------------------+-------------+------+-----+---------+-------+
15 rows in set (0.01
sec)
mysql> select *
from profesores;
+----------------+-----------------+------------------+------------------+------------------+----------------------+-----------------------------+----------------------------------+--------+------+------+---------------+---------------+------------------+-------------+
| rfc_profesor | nombre_profesor | apellido_paterno |
apellido_materno | fecha_nacimiento | municipio | colonia | calle | numero | lt | mz
| codigo_postal | telefono_casa | telefono_celular | indicencias |
+----------------+-----------------+------------------+------------------+------------------+----------------------+-----------------------------+----------------------------------+--------+------+------+---------------+---------------+------------------+-------------+
| AEMM701202FT3 | Maria Felix | Arredonda | Molina | 1970-02-12 | Atizapan de Zaragoza | Fracc. Villa de
la Hacienda | Toril y Rodeo
| 4 | 12 |
32 | 52988 |
5290-1890 | 55 6721 2780 | ninguna |
| COMD803011NN8 | Daniel | Corona | Macias | 1980-11-30 | Coacalco | Bosque Central | Bosques del Valle | 10 |
33 | 29 | 55701 | 5389-0912 | 55 7283 8271 | ninguna |
| CADL781107JK9 | Lorena | Camacho | Dominguez | 1978-07-11 | Naucalpan de Juarez | Fronera | Nueva San Rafael | 21 |
54 | 16 | 53405 | 5190-8272 | 55 7281 6921 | 2 |
| ROVM821906BV5 | Maria Carmen | Rodriguez | Vazquez | 1982-06-19 | Tultitlan | Unidad Morelos | Av. Prados del Sur |
5 | 43 | 2 |
54901 | 5478-1212 | 55 5989
2598 | 5 |
| PEPL752008GS7 | Luis | Pérez | Paredes | 1975-08-20 | Tlalnepantla | San Juan Ixtacala | Av. Juárez y Venustiano_Carranza
| 8 | 8 |
10 | 54600 |
7789-0203 | 55 3290 0495 | 2 |
| MEHR732210VN5 | Rodolfo | Mendoza | Hernandez | 1973-10-22 | Tlalnepantla | Lomas de San Juan | Av. Pavon | 19 |
7 | 8 | 54100 | 1209-1819 | 55 3489 8493 | 1 |
| GOCK812707KL3 | Karla | González | Cruz | 1981-07-27 | Coacalco | Bosques de Coacalco | Av. Lomas de Murcia | 23 |
9 | 19 | 55780 | 2278-9090 | 55 0293 1909 | ninguna |
| FEMC742809MF2 | Claudia | Ferrera | Mendez | 1974-09-28 | Atizapán de Zaragoza | Lomas de Atizapán | Av. Adolfo Ruiz | 15 |
1 | 11 | 52670 | 7782-1783 | 55 1012 9092 | 2 |
| MESI751012FN0 | Ivett | Medina | Sanchez | 1975-12-10 | Tultepec | Circuito San Pablo | Barrio San Rafael | 39 |
5 | 41 | 54981 | 1289-8821 | 55 3289 2381 | ninguna |
| AMALA690803BS4 |
Adriana | Mateos | Lopez | 1969-03-08 | Atizapán de Zaragoza | San Jose el
Jaral | Primavera | 56 |
18 | 30 | 52300 | 5489-8100 | 55 6899 6690 | 2 |
+----------------+-----------------+------------------+------------------+------------------+----------------------+-----------------------------+----------------------------------+--------+------+------+---------------+---------------+------------------+-------------+
10 rows in set (0.00
sec)
Asignatura
mysql> create
table asignaturas(codigo_asignatura integer primary key,nombre
varchar(25),horas varchar(10),codigo_curso varchar(20),codigo_aulas
varchar(20));
Query OK, 0 rows
affected (0.07 sec)
mysql> show
tables;
+-------------------------------+
|
Tables_in_centro_de_ensenanza |
+-------------------------------+
| alumnos |
| asignaturas |
| profesores |
+-------------------------------+
3 rows in set (0.06
sec)
mysql> insert
into asignaturas values(000001,'Español','5 hrs','10000_1415','10_
0001');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into asignaturas values(000002,'Matemáticas','5 hrs','10001_1516',
'10_0002');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into asignaturas values(000003,'Ciencias Naturales','4 hrs','10002
_1617','10_0003');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into asignaturas values(000004,'Geografía','4 hrs','10003_1718','1
0_0004');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into asignaturas values(000005,'Historia','4 hrs','10004_1819','10
_0005');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into asignaturas values(000006,'Formacion civica y Ética','4 hrs',
'10005_1920','10_0006');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into asignaturas values(000007,'Educación artisticas','2 hrs','100
06_2021','10_0007');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into asignaturas values(000008,'Educaciuón física','2 hrs','10006_
2122','10_0008') ;
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into asignaturas values(000009,'Inglés','2 hrs','10007_2223','10_0
009');
Query OK, 1 row
affected (0.00 sec)
mysql> insert
into asignaturas values(000010,'Comprensión lectora','4 hrs','1000
8_2324','10_0010');
Query OK, 1 row
affected (0.02 sec)
mysql> show
tables;
+----------------------+
|
Tables_in_asignatura |
+----------------------+
| asignaturas |
+----------------------+
1 row in set (0.00
sec)
mysql> describe
asignaturas;
+-------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+-------------+------+-----+---------+-------+
| codigo_asignatura
| int(11) | NO | PRI | NULL |
|
| nombre | varchar(25) | YES | |
NULL | |
| horas | varchar(10) | YES | |
NULL | |
| codigo_curso | varchar(20) | YES | |
NULL | |
| codigo_aulas | varchar(20) | YES | |
NULL | |
+-------------------+-------------+------+-----+---------+-------+
5 rows in set (0.02
sec)
mysql> select
*from asignaturas;
+-------------------+--------------------------+-------+--------------+--------------+
| codigo_asignatura
| nombre | horas |
codigo_curso | codigo_aulas |
+-------------------+--------------------------+-------+--------------+--------------+
| 000001 | Español | 5 hrs | 10000_1415 | 10_0001
|
| 000002 | Matemáticas | 5 hrs | 10001_1516 | 10_0002 |
| 000003 | Ciencias Naturales | 4 hrs | 10002_1617 | 10_0003 |
| 000004 | Geografía | 4 hrs | 10003_1718 | 10_0004 |
| 5 | Historia | 4 hrs | 10004_1819 | 10_0005 |
| 6 | Formacion civica y Ética |
4 hrs | 10005_1920 | 10_0006 |
| 7 | Educación artisticas | 2 hrs | 10006_2021 | 10_0007 |
| 8 | Educaciuón física | 2 hrs | 10006_2122 | 10_0008 |
| 9 | Inglés | 2 hrs | 10007_2223 | 10_0009 |
| 10 | Comprensión lectora | 4 hrs | 10008_2324 | 10_0010 |
+-------------------+--------------------------+-------+--------------+--------------+
10 rows in set (0.00
sec)
Curso
mysql> create table cursos(codigo_curso integer
primary key,nombre varchar(35),comienzo varchar(10),tiempo varchar(10),fin
varchar(10));
Query OK, 0
rows affected (0.17 sec)
mysql> show tables;
+-------------------------------+
| Tables_in_centro_de_ensenanza |
+-------------------------------+
| alumnos |
| asignaturas |
|
cursos |
|
profesores |
+-------------------------------+
4 rows in
set (0.07 sec)
mysql> insert into cursos
values(100001415,'Computacion','3 hrs','3 meses','36 hrs');
Query OK, 1 row affected (0.01 sec)
mysql> insert into cursos
values(100011516,'Ingles','3 hrs','3 meses','36 hrs');
Query OK, 1 row affected (0.00 sec)
mysql> insert into cursos
values(100021617,'Belleza','3 hrs','3 meses','36 hrs');
Query OK, 1 row affected (0.00 sec)
mysql> insert into cursos
values(100031718,'Idiomas','3 hrs','3 meses','36 hrs');
Query OK, 1 row affected (0.00 sec)
mysql> insert into cursos
values(100041819,'Matematicas','3 hrs','3 meses','36 hrs');
Query OK, 1 row affected (0.00 sec)
mysql> insert into cursos
values(100051920,'Ciencia','3 hrs','3 meses','36 hrs');
Query OK, 1 row affected (0.00 sec)
mysql> insert into cursos
values(100062021,'Comprension Lectora','3 hrs','3 meses','36 hrs');
Query OK, 1 row affected (0.00 sec)
mysql> insert into cursos
values(100062122,'Cocina','3 hrs','3 meses','36 hrs');
Query OK, 1 row affected (0.00 sec)
mysql> insert into cursos
values(100072223,'Pintura','3 hrs','3 meses','36 hrs');
Query OK, 1 row affected (0.00 sec)
mysql> insert into cursos values(100082324,'Manualidades','3
hrs','3 meses','36hrs');
Query OK, 1 row affected (0.00 sec)
mysql> describe cursos;
+--------------+-------------+------+-----+---------+-------+
| Field |
Type | Null | Key | Default |
Extra |
+--------------+-------------+------+-----+---------+-------+
| codigo_curso |
int(11) | NO | PRI | NULL |
|
| nombre | varchar(35) | YES | |
NULL | |
| comienzo | varchar(10) | YES | |
NULL | |
| tiempo | varchar(10) | YES | |
NULL | |
| fin | varchar(10) | YES | |
NULL | |
+--------------+-------------+------+-----+---------+-------+
5 rows in set (0.01 sec)
mysql> select * from cursos;
+--------------+-----------------------+----------+---------+--------+
| codigo_curso |
nombre |
comienzo | tiempo | fin |
+--------------+-----------------------+----------+---------+--------+
| 100001415 | Computación | 3 hrs
| 3 meses | 36 hrs |
| 100011516 | Ingles | 3 hrs | 3 meses | 36 hrs |
| 100021617 | Belleza | 3 hrs
| 3 meses | 36 hrs |
| 100031718 | Idiomas | 3 hrs
| 3 meses | 36 hrs |
| 100041819 | Matemáticas | 3 hrs
| 3 meses | 36 hrs |
| 100051920 | Ciencia | 3 hrs
| 3 meses | 36 hrs |
| 100062021 | Comprensión Lectora | 3 hrs
| 3 meses | 36 hrs |
| 100062122 | Cocina | 3
hrs | 3 meses | 36 hrs |
| 100072223 | Pintura | 3 hrs
| 3 meses | 36 hrs |
| 100082324 |
Manualidades | 3 hrs | 3 meses | 36hrs |
+--------------+---------------------+----------+---------+----------+
10 rows in set (0.00 sec)
Aulas
mysql> create table aulas(codigo_aulas integer
primary key,numero_aula varchar(10),edificio integer,numero_pupitres
integer,numero_pizarrones integer,numero_plumones integer,numero_loquers
integer,numero_basura integer);
Query OK, 0
rows affected (0.07 sec)
mysql> show tables;
+-------------------------------+
| Tables_in_centro_de_ensenanza |
+-------------------------------+
| alumnos |
|
asignaturas |
|
aulas |
|
cursos |
|
profesores |
+-------------------------------+
5 rows in
set (0.01 sec)
mysql> insert into aulas
values(100001,'A-1',1,30,2,4,2,1);
Query OK, 1 row affected (0.12 sec)
mysql> insert into aulas
values(100002,'B-2',2,30,2,4,2,1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into aulas
values(100003,'C-3',3,30,2,4,2,1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into aulas
values(100004,'D-4',4,30,2,4,2,1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into aulas values(100005,'E-5',5,30,2,4,2,1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into aulas
values(100006,'F-6',5,35,2,4,2,1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into aulas
values(100007,'G-7',4,30,2,4,2,1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into aulas
values(100008,'H-8',3,30,2,4,2,1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into aulas
values(100009,'I-9',2,35,2,4,2,1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into aulas
values(100010,'J-10',1,35,2,4,2,1);
Query OK, 1 row affected (0.00 sec)
mysql> show tables;
+----------------+
| Tables_in_aula |
+----------------+
| aulas
|
+----------------+
1 row in set (0.00 sec)
mysql> describe aulas;
+-------------------+-------------+------+-----+---------+-------+
| Field
| Type | Null | Key |
Default | Extra |
+-------------------+-------------+------+-----+---------+-------+
| codigo_aulas | int(11) | NO
| PRI | NULL |
|
| numero_aula | varchar(10) | YES | |
NULL | |
| edificio | int(11) | YES
| | NULL |
|
|
numero_pupitres | int(11) | YES
| | NULL |
|
| numero_pizarrones
| int(11) | YES | |
NULL | |
|
numero_plumones | int(11) | YES
| | NULL |
|
|
numero_loquers | int(11) | YES
| | NULL |
|
| numero_basura | int(11) | YES
| | NULL |
|
+-------------------+-------------+------+-----+---------+-------+
8 rows in set (0.13 sec)
mysql> select *
from aulas;
+--------------+-------------+----------+-----------------+-------------------+-----------------+----------------+---------------+
| codigo_aulas | numero_aula | edificio
| numero_pupitres | numero_pizarrones | numero_plumones | numero_loquers |
numero_basura |
+--------------+-------------+----------+-----------------+-------------------+-----------------+----------------+---------------+
| 100001 | A-1 |
1 | 30 | 2 | 4 | 2 | 1 |
| 100002 | B-2 | 2 | 30 | 2 | 4 | 2 | 1 |
| 100003 | C-3 | 3 | 30 | 2 | 4 | 2 | 1 |
| 100004 | D-4 | 4 | 30 | 2 | 4 | 2 | 1 |
| 100005 | E-5 | 5 | 30 | 2 | 4 | 2 | 1 |
| 100006 | F-6 | 5 | 35 | 2 | 4 | 2 | 1 |
| 100007 | G-7 | 4 | 30 | 2 | 4 | 2 | 1 |
| 100008 | H-8 | 3 | 30 | 2 | 4 | 2 | 1 |
| 100009 | I-9 | 2 | 35 | 2 | 4 | 2 | 1 |
| 100010 | J-10 |
1 | 35 | 2 | 4 | 2 | 1 |
+--------------+-------------+----------+-----------------+-------------------+-----------------+----------------+---------------+
10 rows in set (0.00 sec)
Equipo
de Futbol
Equipo
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 6.0.4-alpha-community-log MySQL
Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create
database Equipo_de_Futbol;
Query OK, 1 row affected (0.84 sec)
mysql> show databases;
+---------------------+
| Database
|
+---------------------+
| information_schema
|
|
centro_de_ensenanza |
|
equipo_de_futbol |
| mysql
|
| test
|
+---------------------+
5 rows in set (0.64 sec)
mysql> use
Equipo_de_Futbol;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> create
table equipos(codigo_equipo varchar(20) primary key,nombre_equipo
varchar(30),estadio_equipo varchar(40),ciudad_donde_se_ubica_el_equipo
varchar(35),fecha_de_fundacion_equipo date,aforo_equipo
varchar(25),codigo_partido varchar(25));
Query OK, 0 rows affected (0.31 sec)
mysql> show
tables;
+----------------------------+
|
Tables_in_equipo_de_futbol |
+----------------------------+
| equipos |
+----------------------------+
1 row in set (0.04 sec)
mysql> insert
into equipos values('A843329846761CA','Club America','Estadio Azteca','Ciudad
de Mexico','1916/10/12','105069 Espectadores','P00083848376');
Query OK, 1 row affected (0.01 sec)
mysql> insert
into equipos values('U483748735443NU','Club Universidad Nacional','Estadio
Olimpico Universitario','Ciudad de Mexico','1964/08/02','75371
Espectadores','P00018838723');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into equipos values('C837438274837AC','Club Cruz Azul','Estadio Azul','Cuidad
de Mexico','1927/03/22','32904 Espectadores','P00027737378');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into equipos values('G389398398274DC','Club Deportivo Guadalajara','Estadio
Omnilife','Ciudad de Mexico, Jalisco','1906/05/08','49850
Espectadores','P00083746625');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into equipos values('T238974326217CD','Club Deportivo Toluca','Nemesio
Diez','Ciudad de Mexico, Toluca','1917/02/12','27000
Espectadores','P00083654517');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into equipos values('B5473854811FC','Futbol Club Barcelona','Camp Nou','Barcelona-Espana','1899/11/29','99354
Espectadores','P000389329230');
Query OK, 1 row affected (0.00 sec)
mysql> insert into equipos
values('C3849849219FC','Chelsea Football Club','Stamford
Bridge','Londres-Inglaterra, Reino Unido','1905/03/10','41837
Espectadores','P00048839493');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into equipos values('R3248755689MC','Real Madrid Club de
Futbol','Madrid-Espana','Santiago Bernabeu','1902/03/06','81044
Espectadores','P00083288471');
Query OK, 1 row affected (0.00 sec)
mysql> insert into equipos
values('M4736745784FC','Manchester City Football Club','Etihad
Stadium','Manchester-Inglaterra','1894/04/16','47405
Espectadores','P00088438833');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into equipos values('M4854675465CA','Club Atlentico de Madrid','Vicente
calderon','Madrid-Espana','1903/04/26','54907 Espectadores','P00012882188');
Query OK, 1 row affected (0.00 sec)
mysql> describe equipos;
+---------------------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------------------------+-------------+------+-----+---------+-------+
| codigo_equipo | varchar(20) | NO | PRI | NULL | |
| nombre_equipo | varchar(30) | YES | |
NULL | |
|
estadio_equipo |
varchar(40) | YES | | NULL
| |
|
ciudad_donde_se_ubica_el_equipo | varchar(35) | YES | |
NULL | |
| fecha_de_fundacion_equipo | date | YES
| | NULL |
|
| aforo_equipo | varchar(25) | YES | |
NULL | |
|
codigo_partido |
varchar(25) | YES | | NULL
| |
+---------------------------------+-------------+------+-----+---------+-------+
7 rows in set (0.01 sec)
mysql> select * from equipos;
+-----------------+-------------------------------+--------------------------------+---------------------------------+---------------------------+---------------------+----------------+
| codigo_equipo | nombre_equipo | estadio_equipo |
ciudad_donde_se_ubica_el_equipo | fecha_de_fundacion_equipo | aforo_equipo | codigo_partido |
+-----------------+-------------------------------+--------------------------------+---------------------------------+---------------------------+---------------------+----------------+
| A843329846761CA | Club
America | Estadio
Azteca | Ciudad de Mexico | 1916-10-12 | 105069 Espectadores |
P00083848376 |
| U483748735443NU | Club
Universidad Nacional | Estadio
Olimpico Universitario | Ciudad de Mexico | 1964-08-02 | 75371 Espectadores | P00018838723 |
| C837438274837AC | Club Cruz
Azul | Estadio Azul | Cuidad de Mexico | 1927-03-22 | 32904 Espectadores | P00027737378 |
| G389398398274DC | Club Deportivo
Guadalajara | Estadio Omnilife | Ciudad de Mexico, Jalisco | 1906-05-08 | 49850 Espectadores | P00083746625 |
| T238974326217CD | Club Deportivo
Toluca | Nemesio Diez | Ciudad de Mexico,
Toluca | 1917-02-12 | 27000 Espectadores | P00083654517 |
| B5473854811FC | Futbol Club Barcelona | Camp Nou | Barcelona-Espana | 1899-11-29 | 99354 Espectadores | P000389329230 |
| C3849849219FC | Chelsea Football Club | Stamford Bridge | Londres-Inglaterra, Reino
Unido | 1905-03-10 | 41837
Espectadores | P00048839493 |
| R3248755689MC | Real Madrid Club de Futbol |
Madrid-Espana | Santiago
Bernabeu | 1902-03-06 | 81044 Espectadores | P00083288471 |
|
M4736745784FC | Manchester City
Football Club | Etihad Stadium
| Manchester-Inglaterra
| 1894-04-16 |
47405 Espectadores | P00088438833 |
| M4854675465CA | Club Atlentico de Madrid | Vicente calderon | Madrid-Espana | 1903-04-26 | 54907 Espectadores | P00012882188 |
+-----------------+-------------------------------+--------------------------------+---------------------------------+---------------------------+---------------------+----------------+
10 rows in set (0.01
sec)
Presidente
mysql> create table
presidentes(dn1_presidente varchar(20) primary key,nombre_presidente
varchar(25),apellido_paterno varchar(15),apellido_materno
varchar(15),fecha_nacimiento date,municipio varchar(20),colonia
varchar(25),calle varchar(20),numero integer,codigo_postal integer,telefono_casa
varchar(10),telefono_celular varchar(25),fecha_en_que_fue_presidente date);
Query OK, 0 rows affected (0.14 sec)
mysql> show
tables;
+----------------------------+
|
Tables_in_equipo_de_futbol |
+----------------------------+
| equipos |
| presidentes |
+----------------------------+
2 rows in set (0.01 sec)
mysql> insert
into presidentes
values('PEL82493849885RI','Ricardo','Pelaez','Linares','1963/03/14','Cuajimalpa','Las
Tinajas','Juarez',12,54356,'5678-9120','01 44 55 8988 7873','2015/02/04');
Query OK, 1 row affected (0.01 sec)
mysql> insert into presidentes values('BON92348647438JO','Jorge','Borja','Navarrete','1960/10/02','Benito
Juarez','Del Valle','Matias Romero',43,34212,'7438-9238','01 44 55 8989
8239','2007/08/17');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into presidentes values('ALC38927455387GU','Guillermo','Alvarez','Cuevas','1962/12/22','Coyoacan','Ajusco','Canal
Nacionales',65,32434,'8901-8738','01 44 55 7685 0912','1988/06/20');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into presidentes values('DTM82137215465JM','Jose Manuel','De la Torre','Menchaca','1965/11/13','Guadalaraja','Jalisco','Taxquena',7,23213,'4271-3847','01
44 55 0991 1200','2014/10/07');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into presidentes
values('VAC478375184378J','Jesus','Vallejo','Colina','1979/09/25','Contitucion','Unidad
Habitacional','Leyes',8,21367,'9877-1232','01 44 55 8393 9032','2013/08/01');
Query OK, 1 row affected (0.00 sec)
mysql> insert into presidentes
values('BAF84935485894JM','Josep
Maria','Bartomeu','Florenta','1963/02/06','Terrassa','Cornella de Llonregat','Muns',10,57841,'5038-8393','01
44 55 7783 2930','2014/01/23');
Query OK, 1 row affected (0.00 sec)
mysql> insert into presidentes
values('LOB39849374624BR','Bruce','Lopez','Buck','1946/10/05','Reus','Videcans','Rosell',07,75321,'2090-8398','01
44 55 8939 8399','1985/04/01');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into presidentes
values('PER28836544676FL','Florentino','Perez','Rodriguez','1947/03/08','Zaragoza','Santa
Bio de Llobregat','Pi-Margall',30,12459,'5893-8493','01 44 55 8398 1903','2009/06/01');
Query OK, 1 row affected (0.00 sec)
mysql> insert into presidentes
values('ALM84394843329KH','Khaldoon','Alonso','Muabarak','1975/07/02','Cambrills','Gaua','Clotet',05,44893,'2109-2901','01
44 55 7860 9273','2009/01/16');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into presidentes
values('CET82374347448EN','Enrique','Cerezo','Torres','1948/02/27','Mollerussa','Santa
Coloma de Cerevello','De la Union',20,22412,'6578-9023','01 44 55 8920
1221','2003/05/28');
Query OK, 1 row affected (0.00 sec)
mysql> describe presidentes;
+-----------------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------------+-------------+------+-----+---------+-------+
|
dn1_presidente | varchar(20)
| NO | PRI | NULL |
|
|
nombre_presidente | varchar(25)
| YES | | NULL
| |
|
apellido_paterno | varchar(15)
| YES | | NULL
| |
| apellido_materno | varchar(15) | YES | |
NULL | |
|
fecha_nacimiento | date | YES
| | NULL |
|
| municipio | varchar(20) | YES | |
NULL | |
| colonia | varchar(25) | YES | |
NULL | |
| calle | varchar(20) | YES | |
NULL | |
| numero | int(11) | YES
| | NULL |
|
| codigo_postal | int(11) | YES
| | NULL |
|
| telefono_casa | varchar(10) | YES | |
NULL | |
|
telefono_celular | varchar(25)
| YES | | NULL
| |
|
fecha_en_que_fue_presidente | date
| YES | | NULL
| |
+-----------------------------+-------------+------+-----+---------+-------+
13 rows in set (0.03 sec)
mysql> select * from presidentes;
+------------------+-------------------+------------------+------------------+------------------+---------------+---------------------------+------------------+--------+---------------+---------------+--------------------+-----------------------------+
|
dn1_presidente | nombre_presidente |
apellido_paterno | apellido_materno | fecha_nacimiento | municipio | colonia | calle | numero | codigo_postal |
telefono_casa | telefono_celular |
fecha_en_que_fue_presidente |
+------------------+-------------------+------------------+------------------+------------------+---------------+---------------------------+------------------+--------+---------------+---------------+--------------------+-----------------------------+
| PEL82493849885RI |
Ricardo | Pelaez | Linares | 1963-03-14 | Cuajimalpa | Las Tinajas | Juarez |
12 | 54356 |
5678-9120 | 01 44 55 8988 7873 |
2015-02-04 |
| BON92348647438JO |
Jorge | Borja | Navarrete | 1960-10-02 | Benito Juarez | Del Valle | Matias Romero |
43 | 34212 |
7438-9238 | 01 44 55 8989 8239 |
2007-08-17 |
| ALC38927455387GU |
Guillermo | Alvarez | Cuevas | 1962-12-22 | Coyoacan | Ajusco | Canal Nacionales | 65 | 32434 | 8901-8738 | 01 44 55 7685 0912 | 1988-06-20 |
| DTM82137215465JM |
Jose Manuel | De la Torre | Menchaca | 1965-11-13 | Guadalaraja | Jalisco | Taxquena |
7 | 23213 | 4271-3847 | 01 44 55 0991 1200 | 2014-10-07 |
| VAC478375184378J |
Jesus | Vallejo | Colina | 1979-09-25 | Contitucion | Unidad Habitacional | Leyes | 8 | 21367 | 9877-1232 | 01 44 55 8393 9032 | 2013-08-01 |
| BAF84935485894JM |
Josep Maria | Bartomeu | Florenta | 1963-02-06 | Terrassa | Cornella de Llonregat | Muns | 10 | 57841 | 5038-8393 | 01 44 55 7783 2930 | 2014-01-23 |
| LOB39849374624BR |
Bruce | Lopez | Buck | 1946-10-05 | Reus | Videcans | Rosell | 7 | 75321 | 2090-8398 | 01 44 55 8939 8399 | 1985-04-01 |
| PER28836544676FL |
Florentino | Perez | Rodriguez | 1947-03-08 | Zaragoza | Santa Bio de Llobregat | Pi-Margall |
30 | 12459 |
5893-8493 | 01 44 55 8398 1903 |
2009-06-01 |
| ALM84394843329KH |
Khaldoon | Alonso | Muabarak | 1975-07-02 | Cambrills | Gaua | Clotet |
5 | 44893 | 2109-2901 | 01 44 55 7860 9273 | 2009-01-16 |
| CET82374347448EN |
Enrique | Cerezo | Torres | 1948-02-27 | Mollerussa | Santa Coloma de Cerevello | De la
Union |
20 | 22412 |
6578-9023 | 01 44 55 8920 1221 |
2003-05-28 |
+------------------+-------------------+------------------+------------------+------------------+---------------+---------------------------+------------------+--------+---------------+---------------+--------------------+-----------------------------+
10 rows in set (0.00
sec)
Jugadores
mysql> create table jugadores(codigo_jugador
varchar(20) primary key,nombre_jugador varchar(25),apellido_paterno
varchar(15),apellido_materno varchar(15),fecha_nacimiento date,municipio
varchar(25),colonia varchar(25),calle varchar(15),numero integer,codigo_postal
integer,telefono_casa varchar(10),telefono_celular varchar(20),posicion
varchar(30),numero_de_camiseta integer,codigo_gol varchar(25),codigo_equipo
varchar(25));
Query OK, 0
rows affected (0.08 sec)
mysql> show tables;
+----------------------------+
| Tables_in_equipo_de_futbol |
+----------------------------+
| equipos |
|
jugadores |
|
presidentes |
+----------------------------+
3 rows in
set (0.01 sec)
mysql> insert
into jugadores
values('R14885OZ','Rubens','Oscar','Zambuesa','1984/01/01','Argentina','Nauquen','Zapala',32,43783,'5473-7438','01
44 55 3284 3248','Volante por Izquierda',14,'G34873289437832','A843329676CA');
Query OK, 1 row affected (0.31 sec)
mysql> insert into jugadores
values('G32883MP','Guillermo','Mena','Palmer','1984/05/09','Teckina','Dencel','Bendey',76,43521,'3267-7384','01
44 55 8329 8323','Defensa',32,'G34725365638748','U4837485443NU');
Query OK, 1 row affected (0.00 sec)
mysql> insert into jugadores
values('C10837EG','Christian','Eduardo','Gimenez','1981/02/01','Argentina','Chaco','Resistencia',18,37688,'5486-8347','01
44 55 3289 7349','Mediocampista',10,'G23452311909287','C8374382737AC');
Query OK, 1 row affected (0.00 sec)
mysql> insert into jugadores
values('O90437BT','Omar','Bravo','Tordecillas','1980/03/04','Sandoval','Elvis','Colina',54,86780,'3832-5895','01
44 55 3824 7328','Delantero',9,'G34125678390987','G3893988274DC');
Query OK, 1 row affected (0.00 sec)
mysql> insert into jugadores values('F83274GG','Francisco','Gamboa','Gomez','1985/07/20','Guadalajara','Jalisco','Leincero',21,46556,'4362-8329','01
44 55 3827 8390','Defensa',4,'G10129126523123','T2389743217CD');
Query OK, 1 row affected (0.00 sec)
mysql> insert into jugadores values('L10890MS','Lionel
Andres','Messi','Cuccitini','1987/06/24','Arguelles','Latina','Lopez
Silva',12,54893,'9218-3947','01 44 55 3781
9203','Delantero',10,'G03498393298103','B5473854811FC');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into jugadores values('O11345DE','Oscar','Dos Santos','Emboaba
Jr.','1991/09/09','Villa Verde','Orcasur','Olvido',23,25377,'4788-8439','01 44
55 3487 8219','Centro Delantero',11,'G38439847746114','C3849849219FC');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into jugadores values('C79309DA','Cristiano Ronaldo','Dos
Santos','Avero','1985/02/05','Usera','Moscardo','Velazquez',94,75894,'2309-0038','01
44 55 3287 8219','Delantero',7,'G39438412882274','R3248755689MC');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into jugadores values('S16903AC','Sergio Lionel','Aguero','Del
Castillo','1988/06/02','Alcoron','La
Fortuna','Morales',33,32344,'7647-7438','01 44 55 3298
7328','Delantero',16,'G83458969741165','M4736745784FC');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into jugadores
values('G734892GS','Antonie','Griezman','Sanchez','1991/03/21','Arganzuela','San
Benito','16 de Septiembre',49,71465,'7326-8347','01 44 55 8239
8001','Delantero',7,'G48754858982971','M4854675465CA');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> describe jugadores;
+--------------------+-------------+------+-----+---------+-------+
| Field
| Type | Null | Key |
Default | Extra |
+--------------------+-------------+------+-----+---------+-------+
|
codigo_jugador | varchar(20) |
NO | PRI | NULL |
|
|
nombre_jugador | varchar(25) |
YES |
| NULL | |
|
apellido_paterno | varchar(15) |
YES |
| NULL | |
|
apellido_materno | varchar(15) |
YES |
| NULL | |
| fecha_nacimiento | date
| YES | | NULL
| |
| municipio | varchar(25) | YES | |
NULL | |
| colonia | varchar(25) | YES | |
NULL | |
| calle | varchar(15) | YES | |
NULL |
|
| numero | int(11) | YES
| | NULL |
|
| codigo_postal | int(11) | YES
| | NULL |
|
| telefono_casa | varchar(10) | YES | |
NULL | |
|
telefono_celular | varchar(20) |
YES |
| NULL |
|
| posicion | varchar(30) | YES | |
NULL | |
| numero_de_camiseta
| int(11) | YES | |
NULL | |
| codigo_gol | varchar(25) | YES | |
NULL | |
| codigo_equipo | varchar(25) | YES | |
NULL | |
+--------------------+-------------+------+-----+---------+-------+
16 rows in set (0.05 sec)
mysql> select * form juadores;
ERROR 1064 (42000): You have an error in your SQL
syntax; check the manual that corresponds to your MySQL server version for the
right syntax to use near 'form juadores' at line 1
mysql> select *
from jugadores;
+----------------+-------------------+------------------+------------------+------------------+-------------+------------+-----------------+--------+---------------+---------------+--------------------+-----------------------+--------------------+-----------------+---------------+
| codigo_jugador |
nombre_jugador | apellido_paterno |
apellido_materno | fecha_nacimiento | municipio | colonia
| calle | numero |
codigo_postal | telefono_casa | telefono_celular | posicion | numero_de_camiseta |
codigo_gol | codigo_equipo |
+----------------+-------------------+------------------+------------------+------------------+-------------+------------+-----------------+--------+---------------+---------------+--------------------+-----------------------+--------------------+-----------------+---------------+
| R14885OZ | Rubens | Oscar | Zambuesa | 1984-01-01 | Argentina | Nauquen
| Zapala | 32 | 43783 | 5473-7438 | 01 44 55 3284 3248 | Volante por
Izquierda | 14 |
G34873289437832 | A843329676CA |
| G32883MP | Guillermo | Mena | Palmer | 1984-05-09 | Teckina | Dencel | Bendey |
76 | 43521 | 3267-7384 | 01 44 55 8329 8323 | Defensa | 32 | G34725365638748 |
U4837485443NU |
| C10837EG | Christian | Eduardo | Gimenez | 1981-02-01 | Argentina | Chaco
| Resistencia | 18 | 37688 | 5486-8347 | 01 44 55 3289 7349 | Mediocampista | 10 | G23452311909287 |
C8374382737AC |
| O90437BT | Omar | Bravo | Tordecillas | 1980-03-04 | Sandoval | Elvis
| Colina | 54 | 86780 | 3832-5895 | 01 44 55 3824 7328 | Delantero | 9 | G34125678390987 | G3893988274DC |
| F83274GG | Francisco | Gamboa | Gomez | 1985-07-20 | Guadalajara | Jalisco | Leincero |
21 | 46556 |
4362-8329 | 01 44 55 3827 8390 |
Defensa | 4 | G10129126523123 |
T2389743217CD |
| L10890MS | Lionel Andres | Messi | Cuccitini | 1987-06-24 | Arguelles | Latina
| Lopez Silva | 12 | 54893 | 9218-3947 | 01 44 55 3781 9203 | Delantero | 10 | G03498393298103 |
B5473854811FC |
| O11345DE | Oscar | Dos Santos | Emboaba Jr. | 1991-09-09 | Villa Verde | Orcasur | Olvido |
23 | 25377 |
4788-8439 | 01 44 55 3487 8219 |
Centro Delantero | 11 | G38439847746114 |
C3849849219FC |
| C79309DA | Cristiano Ronaldo | Dos Santos | Avero | 1985-02-05 | Usera | Moscardo | Velazquez |
94 | 75894 |
2309-0038 | 01 44 55 3287 8219 |
Delantero | 7 | G39438412882274 |
R3248755689MC |
| S16903AC | Sergio Lionel | Aguero | Del Castillo | 1988-06-02 | Alcoron | La
Fortuna | Morales | 33 | 32344 | 7647-7438 | 01 44 55 3298 7328 | Delantero | 16 | G83458969741165 |
M4736745784FC |
| G734892GS | Antonie | Griezman | Sanchez | 1991-03-21 | Arganzuela | San Benito | 16 de Septiembr | 49 | 71465 | 7326-8347 | 01 44 55 8239 8001 | Delantero | 7 | G48754858982971 |
M4854675465CA |
+----------------+-------------------+------------------+------------------+------------------+-------------+------------+-----------------+--------+---------------+---------------+--------------------+-----------------------+--------------------+-----------------+---------------+
10 rows in set (0.00
sec)
Partidos
mysql>
mysql> create table Partidos(codigo_partido varchar(20)
primary key,fecha_de_partido date,goles_fuera integer,goles_casa integer);
Query OK, 0
rows affected (0.09 sec)
mysql> show tables;
+----------------------------+
| Tables_in_equipo_de_futbol |
+----------------------------+
| equipos |
| jugadores |
| partidos |
| presidentes |
+----------------------------+
4 rows in set (0.01 sec)
mysql> insert into partidos
values('P00083848376','2015/01/24',4,1);
Query OK, 1 row affected (0.07 sec)
mysql> insert into partidos
values('P00018838723','2015/03/14',3,2);
Query OK, 1 row affected (0.01 sec)
mysql> insert into partidos
values('P00027737378','2015/03/14',2,2);
Query OK, 1 row affected (0.00 sec)
mysql> insert into partidos
values('P00083746625','2015/03/13',1,2);
Query OK, 1 row affected (0.00 sec)
mysql> insert into partidos
values('P00083654517','2015/03/14',4,1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into partidos
values('P00038932923','2015/03/01',6,3);
Query OK, 1 row affected (0.00 sec)
mysql> insert into partidos
values('P00048839493','2015/03/11',2,2);
Query OK, 1 row affected (0.00 sec)
mysql> insert into partidos
values('P00083288471','2015/01/22',4,1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into partidos
values('P00088438833','2015/02/05',1,4);
Query OK, 1 row affected (0.00 sec)
mysql> insert into partidos
values('P00012882188','2015/01/10',3,2);
Query OK, 1 row affected (0.00 sec)
mysql> describe partidos;
+------------------+-------------+------+-----+---------+-------+
| Field
| Type | Null | Key |
Default | Extra |
+------------------+-------------+------+-----+---------+-------+
|
codigo_partido | varchar(20) | NO | PRI | NULL |
|
| fecha_de_partido |
date | YES | |
NULL | |
| goles_fuera | int(11) | YES
| | NULL |
|
| goles_casa | int(11) | YES
| | NULL |
|
+------------------+-------------+------+-----+---------+-------+
4 rows in set (0.06 sec)
mysql> select * from partidos;
+----------------+------------------+-------------+------------+
| codigo_partido |
fecha_de_partido | goles_fuera | goles_casa |
+----------------+------------------+-------------+------------+
| P00083848376 | 2015-01-24 | 4 | 1 |
| P00018838723 | 2015-03-14 | 3 | 2 |
| P00027737378 | 2015-03-14 |
2 | 2 |
| P00083746625 | 2015-03-13 | 1 | 2 |
| P00083654517 | 2015-03-14 | 4 | 1 |
| P00038932923 | 2015-03-01 | 6 | 3 |
| P00048839493 | 2015-03-11 | 2 | 2 |
| P00083288471 | 2015-01-22 | 4 | 1 |
| P00088438833
| 2015-02-05 | 1 | 4 |
| P00012882188
| 2015-01-10 | 3 | 2 |
+----------------+------------------+-------------+------------+
10 rows in set (0.00 sec)
Goles
mysql> create table gol(codigo_gol varchar(20)
primary key,numero_de_camiseta_participante integer,Equipo_PArticipante
varchar(30),minuto_que_se_anoto_el_gol integer,codigo_partido varchar(20));
Query OK, 0
rows affected (0.07 sec)
mysql> show tables;
+----------------------------+
| Tables_in_equipo_de_futbol |
+----------------------------+
| equipos |
| gol |
| jugadores |
|
partidos |
|
presidentes |
+----------------------------+
5 rows in
set (0.01 sec)
mysql> insert into gol
values('G34873289437832',14,'Club America',60,'P00083848376');
Query OK, 1 row affected (0.00 sec)
mysql> insert into gol
values('G34725365638748',32,'club Univertsidad Nacional',30,'P00018838723');
Query OK, 1 row affected (0.00 sec)
mysql> insert into gol
values('G23452311909287',10,'Club Cruz Azul',15,'P00027737378');
Query OK, 1 row affected (0.00 sec)
mysql> insert into gol
values('G34125678390987',9,'Club Deportivo Guadalajara',60,'P000837466250');
Query OK, 1 row affected (0.01 sec)
mysql> insert into gol
values('G10129126523123',4,'Club Deportivo Toluca',50,'P00083654517');
Query OK, 1 row affected (0.00 sec)
mysql> insert into gol
values('G03498393298103',10,'Futbol Club Barcelona',10,'P00038932923');
Query OK, 1 row affected (0.00 sec)
mysql> insert into gol
values('G38439847746114',11,'Chelsea Football Club',25,'P000488394930');
Query OK, 1 row affected (0.00 sec)
mysql> insert into gol
values('G39438412882274',7,'Real Madrid Club de Futbol',30,'P00083288471');
Query OK, 1 row affected (0.00 sec)
mysql> insert into gol
values('G83458969741165',16,'Manchester City Football Club',40,'P00088438833');
Query OK, 1 row affected (0.00 sec)
mysql> insert into gol
values('G48754858982971',7,'Club Atlentico de Madrid',45,'P00012882188');
Query OK, 1 row affected (0.00 sec)
mysql> describe gol;
+---------------------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------------------------+-------------+------+-----+---------+-------+
| codigo_gol | varchar(20) | NO | PRI | NULL |
|
|
numero_de_camiseta_participante | int(11)
| YES | | NULL
| |
|
Equipo_PArticipante |
varchar(30) | YES | | NULL
| |
|
minuto_que_se_anoto_el_gol |
int(11) | YES | |
NULL | |
|
codigo_partido |
varchar(20) | YES | | NULL
| |
+---------------------------------+-------------+------+-----+---------+-------+
5 rows in set (0.01 sec)
mysql> select * from gol;
+-----------------+---------------------------------+-------------------------------+----------------------------+----------------+
| codigo_gol | numero_de_camiseta_participante |
Equipo_PArticipante |
minuto_que_se_anoto_el_gol | codigo_partido |
+-----------------+---------------------------------+-------------------------------+----------------------------+----------------+
| G34873289437832 | 14 | Club
America | 60 | P00083848376 |
| G34725365638748 | 32 | club Univertsidad
Nacional | 30 | P00018838723 |
| G23452311909287 | 10 | Club Cruz
Azul | 15 | P00027737378 |
| G34125678390987 | 9 | Club
Deportivo Guadalajara | 60 | P000837466250 |
| G10129126523123 | 4 | Club
Deportivo Toluca | 50 | P00083654517 |
| G03498393298103 | 10 | Futbol Club
Barcelona | 10 | P00038932923 |
|
G38439847746114 |
11 | Chelsea Football Club
| 25 |
P000488394930 |
| G39438412882274 | 7 | Real Madrid
Club de Futbol | 30 | P00083288471 |
|
G83458969741165 |
16 | Manchester City Football Club | 40 | P00088438833 |
| G48754858982971 | 7 | Club
Atlentico de Madrid | 45 | P00012882188 |
+-----------------+---------------------------------+-------------------------------+----------------------------+----------------+
10 rows in set (0.00
sec)
Empresa DPAC
(Departamentos de Comodidad)
Departamento
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 6.0.4-alpha-community-log MySQL
Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the
buffer.
mysql> create
database Empresa_DPAC;
Query OK, 1 row affected (0.00 sec)
mysql> show databases;
+---------------------+
| Database
|
+---------------------+
| information_schema
|
|
centro_de_ensenanza |
| empresa_dpac |
|
equipo_de_futbol |
| mysql |
| test |
+---------------------+
6 rows in set (0.00 sec)
mysql> use Empresa_DPAC;
Database changed
mysql> show tables;
Empty set (0.01 sec)
mysql> create
table departamentos(codigo_departamento varchar(30) primary
key,nombre_departamento varchar(40),presupuesto varchar(35),municipio
varchar(30),colonia varchar(40),calle varchar(40),numero integer,telefono
varchar(20),codigo_centro varchar(25),nif_empleado varchar(15));
Query OK, 0 rows affected (0.07 sec)
mysql> show tables;
+------------------------+
| Tables_in_empresa_dpac |
+------------------------+
| departamentos |
+------------------------+
1 row in set (0.00 sec)
mysql> insert
into departamentos values('DEPA_345690_DPTT','Malitzin','$39,500.00
mensuales','Alvaro Obregon','Jardines de Pedregal','Militzin 16B,Benito
Juarez',54673,'01 55 9183 5233','DC298878190CC920','D0100000E');
Query OK, 1 row affected (0.01 sec)
mysql> insert
into departamentos values('DEPA_356011_DPTT','Mercurio','$26,560.90
mensuales','Iztapalapa','Reforma','Juan Escutia',96400,'01 55 7889
9090','DC308980230CC100','D0200000E');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into departamentos values('DEPA_366120_DPTT','Renta de Departamentos Distrito
Federal','$20,990.90 mensuales','Cuauhtemoc','Condesa','Juan Escutia',11000,'01
55 9627 8989','DC039848488CC129','D0300000E');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into departamentos values('DEPA_376230_DPTT','Departamentos
Amueblados','$30,599.99 mensuales','San Antonio','Ampliacion
Napoles,Benito','Llinois',38400,'01 55 5598
1714','DC392084898CC210','D0400000E');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into departamentos values('DEPA_386340_DPTT','Jamex, Trasantlatic','$40,400.00
mensuales','Abelardo L. Rodriguez','Alvaro Obregon','Presidentes',12225,'01 55
5524 3622','DC392843488CC290','D0500000E');
Query OK, 1 row affected (0.00 sec)
mysql> insert into departamentos
values('DEPA_396450_DPTT','Ares Select Departamentos','$39,999.90
mensuales','Naucalpan, Juarez','Miguel Hidalgo','Leibnitz',11300,'01 55 5203
6403','DC839302098CC0211','D0600000E');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into departamentos values('DEPA_406560_DPTT','Cuartos y
Departamentos','$2,300.00 mensuales','Tlalnepantla','San
Javier','Cuitlahuac',54030,'01 55 5384 2701','DC328485909CC283','D0700000E');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into departamentos values('DEPA_416670_DPTT','Grupo Inmoviliario Fenix
Levali','$1660.00 mesuales','Cuautitlan Izacalli','Centro Urbano Conjunto
Sagitario','Jimenez Cantu',54730,'01 55 6277
4332','DC348938938CC239','D0800000E');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into departamentos values('DEPA_426780_DPTT','Sectores-Departament &
Self','$3,500.00 mensuales','Naucalapan Juarez','Satelite','Av. Cruz del
Cennturion',53119,'01 55 6935 2580','DC848934893CC832','D0900000E');
Query OK, 1 row affected (0.00 sec)
mysql> insert into departamentos values('DEPA_436890_DPTT','Residencial
Century Club','$10,000.00 mensuales','Corredores','Churrubusco Countury
Club','Coyoacan',42100,'01 55 5244 5669','DC328947384CC012','D100000E');
Query OK, 1 row affected (0.00 sec)
mysql> describe departamentos;
+---------------------+-------------+------+-----+---------+-------+
| Field
| Type | Null | Key |
Default | Extra |
+---------------------+-------------+------+-----+---------+-------+
|
codigo_departamento | varchar(30) | NO
| PRI | NULL | |
|
nombre_departamento | varchar(40) | YES
| | NULL |
|
| presupuesto | varchar(35) | YES | |
NULL | |
| municipio | varchar(30) | YES | |
NULL | |
| colonia | varchar(40) | YES | |
NULL | |
| calle | varchar(40) | YES | |
NULL | |
| numero | int(11) | YES
| | NULL |
|
| telefono | varchar(20) | YES | |
NULL | |
| codigo_centro | varchar(25) | YES | |
NULL | |
| nif_empleado | varchar(15) | YES | |
NULL | |
+---------------------+-------------+------+-----+---------+-------+
10 rows in set (0.01 sec)
mysql> select * from departamentos;
+---------------------+-----------------------------------------+----------------------+-----------------------+----------------------------------+----------------------------+--------+-----------------+-------------------+--------------+
| codigo_departamento |
nombre_departamento |
presupuesto | municipio | colonia | calle | numero | telefono | codigo_centro | nif_empleado |
+---------------------+-----------------------------------------+----------------------+-----------------------+----------------------------------+----------------------------+--------+-----------------+-------------------+--------------+
| DEPA_345690_DPTT | Malitzin | $39,500.00 mensuales | Alvaro
Obregon | Jardines de
Pedregal | Militzin
16B,Benito Juarez | 54673 | 01 55 9183
5233 | DC298878190CC920 | D0100000E |
| DEPA_356011_DPTT | Mercurio | $26,560.90
mensuales | Iztapalapa |
Reforma | Juan
Escutia | 96400 | 01 55 7889 9090 |
DC308980230CC100 | D0200000E |
| DEPA_366120_DPTT | Renta de Departamentos Distrito Federal |
$20,990.90 mensuales | Cuauhtemoc
| Condesa
| Juan Escutia
| 11000 | 01 55 9627 8989 |
DC039848488CC129 | D0300000E |
| DEPA_376230_DPTT | Departamentos Amueblados | $30,599.99 mensuales | San
Antonio | Ampliacion Napoles,Benito | Llinois | 38400 | 01 55 5598 1714 | DC392084898CC210 | D0400000E
|
| DEPA_386340_DPTT | Jamex, Trasantlatic | $40,400.00 mensuales |
Abelardo L. Rodriguez | Alvaro Obregon | Presidentes | 12225 | 01 55 5524 3622 |
DC392843488CC290 | D0500000E |
| DEPA_396450_DPTT | Ares Select Departamentos | $39,999.90 mensuales |
Naucalpan, Juarez | Miguel Hidalgo | Leibnitz | 11300 | 01 55 5203 6403 | DC839302098CC0211 |
D0600000E |
| DEPA_406560_DPTT | Cuartos y Departamentos | $2,300.00 mensuales | Tlalnepantla | San Javier | Cuitlahuac | 54030 | 01 55 5384 2701 |
DC328485909CC283 | D0700000E |
| DEPA_416670_DPTT | Grupo Inmoviliario Fenix Levali | $1660.00 mesuales | Cuautitlan Izacalli | Centro Urbano Conjunto Sagitario | Jimenez
Cantu |
54730 | 01 55 6277 4332 | DC348938938CC239 | D0800000E
|
| DEPA_426780_DPTT | Sectores-Departament & Self | $3,500.00 mensuales | Naucalapan Juarez | Satelite | Av. Cruz del
Cennturion | 53119 | 01 55 6935 2580 |
DC848934893CC832 | D0900000E |
| DEPA_436890_DPTT | Residencial Century Club | $10,000.00 mensuales |
Corredores | Churrubusco
Countury Club | Coyoacan | 42100 | 01 55 5244 5669 | DC328947384CC012 | D100000E
|
+---------------------+-----------------------------------------+----------------------+-----------------------+----------------------------------+----------------------------+--------+-----------------+-------------------+--------------+
10 rows in set (0.00
sec)
Empleado
mysql> create
table empleados(nif_empleado varchar(20) primary key,nombre_empleado
varchar(40),apellido_paterno varchar(20),apellido_materno varchar(20),edad
varchar(20),sexo varchar(20),municipio varchar(30),colonia varchar(40),calle
varchar(25),numero integer,lt integer,mz integer,codigo_postal
integer,telefono_casa varchar(15),telefono_celular varchar(15),numero_hijos
varchar(10),estado_civil varchar(30),fecha_contratacion date,codigo_habilidad
varchar(15),codigo_hijos varchar(20),codigo_centro varchar(20));
Query OK, 0 rows affected (0.09 sec)
mysql> show tables;
+------------------------+
| Tables_in_empresa_dpac |
+------------------------+
| departamentos |
| empleados |
+------------------------+
2 rows in set (0.00 sec)
mysql> insert into empleados
values('D0100000E','Adriana','Gutierrez','Camarillo','35','Femenino','Tlalpan','San
Pedro Martir','Cedral s/n esq. Xochitepetl',24,54,23,149023,'5412-9023','55
8392
1228','1','casada','2012/03/12','H00001000T','M00298389388329SG','DC298878190CC920');
Query OK, 1 row affected, 1 warning (0.01 sec)
mysql> insert
into empleados
values('D0200000E','Donnovan','Caseres','Rico','27','Masculino','Alvaro
Obregon','Belem de las Flores','Av. Constituyentes num.
813',19,32,67,01789,'5590-0312','55 8390
2923','2','casado','2013/10/20','H00002000T','A89213782378274CL','DC308980230CC100');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert
into empleados values('D0300000E','Guillermo','Dominguez','Sanchez','33','Masculino','Gustavo
A. Madero','Guadalupe Proletaria','Av. Rio de los Remedios num.
454',54,12,87,07320,'5213-2912','55 3849
2312','1','viudo','2012/11/19','H00003000T','U31829083902843DC','DC039848488CC129');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into empleados
values('D0400000E','Luis','Hernandez','Lopez','34','Masculino','Azcapozalco','Santa
Catarina','Cda. Cesali num. 13',56,65,56,234554,'5909-3021','55 1290
9021','3','casado','2011/04/26','H00004000T','D23899829082908HJ','DC392084898CC210');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into empleados
values('D0500000E','Diana','Morgado','Rodriguez','38','Femenino','Cuauhtemoc','Guerrero','Mina
num.1 esq. Riva Palacio',67,78,43,69192,'8390-9209','55 5362 2673','mas de
4','casada','2010/11/30','H00005000T','E28197392189389SM','DC392843488CC290');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert
into empleados
values('D0600000E','Sofia','Gonzalez','Cruz','29','Femenimo','Tlalpan','Ex.
Hacienda','Calz. del Hueso num.729',89,87,23,14309,'7928-3901','55 6623
3211','1','divorciada','2012/05/15','H00006000T','O21839028903893AG','DC839302098CC0211');
Query OK, 1 row affected (0.00 sec)
mysql> insert into empleados
values('D0700000E','Jesus','Aldana','Guerrero','40','Masculino','Azcapozalco','Jardin
Azpeitia','Av. De las Granjas
num. 283',12,67,21,02843,'5848-0323','55 7384
1233','2','casado','2011/06/20','H00007000T','B32787287832894AV','DC328485909CC283');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into empleados
values('D0800000E','Areli','Garcia','Alcocer','36','Femenino','Azcapozalco','Jardin
Azpeitia','Av. De las Granjas
num. 618',23,12,33,02549,'5909-0383','55 2718
2190','3','casada','2010/08/19','H00008000T','M23189218398283GG','DC348938938CC239');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> insert into empleados
values('D0900000E','Cesar','Gonzalez','Zamudio','30','Masculino','Tultitlan','Ampliacion
Buena Vista','Morelia s/n',45,69,12,54962,'1290-0292','55 3782
9210','2','casado','2010/10/27','H00009000T','E832647536546352GJ','DC848934893CC832');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into empleados
values('D1000000E','Luiza','Miranda','Corona','37','Femenino','Gustavo A.
Madero','Ejido de Aragon','Av.510 num.1000 esq. Av.Puerto de
Palos',23,89,21,078912,'2390-0912','55 7280 2133','3','casada','2011/10/27','H000010000T','K23172635456734MM','DC328947384CC012');
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> describe empleados;
+--------------------+-------------+------+-----+---------+-------+
| Field
| Type | Null | Key |
Default | Extra |
+--------------------+-------------+------+-----+---------+-------+
| nif_empleado | varchar(20) | NO | PRI | NULL |
|
|
nombre_empleado | varchar(40) |
YES |
| NULL | |
|
apellido_paterno | varchar(20) |
YES |
| NULL | |
|
apellido_materno | varchar(20) |
YES |
| NULL | |
| edad | varchar(20) | YES | |
NULL | |
| sexo | varchar(20) | YES | |
NULL | |
| municipio | varchar(30) | YES | |
NULL | |
| colonia | varchar(40) | YES | |
NULL | |
| calle | varchar(25) | YES | |
NULL | |
| numero | int(11) | YES
| | NULL |
|
| lt | int(11) | YES
| | NULL |
|
| mz | int(11) | YES
| | NULL |
|
| codigo_postal | int(11) | YES
| | NULL |
|
| telefono_casa | varchar(15) | YES | |
NULL | |
|
telefono_celular | varchar(15) |
YES |
| NULL | |
| numero_hijos | varchar(10) | YES | |
NULL | |
| estado_civil | varchar(30) | YES | |
NULL | |
| fecha_contratacion
| date | YES
| | NULL |
|
|
codigo_habilidad | varchar(15) |
YES |
| NULL | |
| codigo_hijos | varchar(20) | YES | |
NULL | |
| codigo_centro | varchar(20) | YES | |
NULL | |
+--------------------+-------------+------+-----+---------+-------+
21 rows in set (0.01 sec)
mysql> select * from empleados;
+--------------+-----------------+------------------+------------------+------+-----------+-------------------+------------------------+---------------------------+--------+------+------+---------------+---------------+------------------+--------------+--------------+--------------------+------------------+--------------------+-------------------+
| nif_empleado | nombre_empleado |
apellido_paterno | apellido_materno | edad | sexo | municipio | colonia | calle | numero | lt | mz
| codigo_postal | telefono_casa | telefono_celular | numero_hijos |
estado_civil | fecha_contratacion | codigo_habilidad | codigo_hijos | codigo_centro |
+--------------+-----------------+------------------+------------------+------+-----------+-------------------+------------------------+---------------------------+--------+------+------+---------------+---------------+------------------+--------------+--------------+--------------------+------------------+--------------------+-------------------+
| D0100000E | Adriana | Gutierrez | Camarillo | 35
| Femenino | Tlalpan | San Pedro Martir | Cedral s/n esq. Xochitepe | 24 |
54 | 23 | 149023 | 5412-9023 | 55 8392 1228 | 1 | casada | 2012-03-12 | H00001000T | M00298389388329SG | DC298878190CC920 |
| D0200000E | Donnovan | Caseres | Rico | 27 | Masculino | Alvaro Obregon | Belem de las Flores | Av. Constituyentes num. 8 | 19 |
32 | 67 | 1789 | 5590-0312 | 55 8390 2923 | 2 | casado |
2013-10-20 | H00002000T | A89213782378274CL | DC308980230CC100 |
| D0300000E | Guillermo | Dominguez | Sanchez | 33
| Masculino | Gustavo A. Madero | Guadalupe Proletaria | Av. Rio de los Remedios n | 54 |
12 | 87 | 7320 | 5213-2912 | 55 3849 2312 | 1 | viudo | 2012-11-19 | H00003000T | U31829083902843DC | DC039848488CC129 |
| D0400000E | Luis | Hernandez | Lopez | 34 | Masculino | Azcapozalco | Santa Catarina | Cda. Cesali num. 13 |
56 | 65 | 56 |
234554 | 5909-3021 | 55 1290
9021 | 3 | casado | 2011-04-26 | H00004000T | D23899829082908HJ | DC392084898CC210 |
| D0500000E | Diana | Morgado | Rodriguez | 38
| Femenino | Cuauhtemoc | Guerrero | Mina num.1 esq. Riva Pala | 67 |
78 | 43 | 69192 | 8390-9209 | 55 5362 2673 | mas de 4 | casada | 2010-11-30 | H00005000T | E28197392189389SM | DC392843488CC290 |
| D0600000E | Sofia | Gonzalez | Cruz | 29 | Femenimo
| Tlalpan | Ex.
Hacienda | Calz. del Hueso
num.729 | 89 |
87 | 23 | 14309 | 7928-3901 | 55 6623 3211 | 1 | divorciada | 2012-05-15 | H00006000T | O21839028903893AG | DC839302098CC0211 |
| D0700000E | Jesus | Aldana | Guerrero | 40
| Masculino | Azcapozalco |
Jardin Azpeitia | Av. De las
Granjas num. 2 | 12 | 67 |
21 | 2843 |
5848-0323 | 55 7384 1233 | 2 | casado | 2011-06-20 | H00007000T | B32787287832894AV | DC328485909CC283 |
| D0800000E | Areli | Garcia | Alcocer | 36
| Femenino | Azcapozalco | Jardin Azpeitia | Av. De las Granjas num. 6 | 23 |
12 | 33 | 2549 | 5909-0383 | 55 2718 2190 | 3 | casada | 2010-08-19 | H00008000T | M23189218398283GG | DC348938938CC239 |
| D0900000E | Cesar | Gonzalez | Zamudio | 30
| Masculino | Tultitlan |
Ampliacion Buena Vista | Morelia s/n | 45 |
69 | 12 | 54962 | 1290-0292 | 55 3782 9210 | 2 | casado | 2010-10-27 | H00009000T | E832647536546352GJ |
DC848934893CC832 |
| D1000000E | Luiza
| Miranda | Corona | 37 | Femenino
| Gustavo A. Madero | Ejido de Aragon | Av.510 num.1000 esq. Av.P | 23 |
89 | 21 | 78912 | 2390-0912 | 55 7280 2133 | 3 | casada | 2011-10-27 | H000010000T | K23172635456734MM | DC328947384CC012 |
+--------------+-----------------+------------------+------------------+------+-----------+-------------------+------------------------+---------------------------+--------+------+------+---------------+---------------+------------------+--------------+--------------+--------------------+------------------+--------------------+-------------------+
10 rows in set (0.00
sec)
Hijos
mysql> create table hijos(codigo_hijos varchar(20)
primary key,nombre_hijo varchar(25),apellido_paterno
varchar(15),apellido_materno varchar(15),fecha_nacimiento date,municipio
varchar(40),colonia varchar(40),calle varchar(45),numero integer,lt integer,mz
integer,codigo_postal integer,telefono_casa varchar(10),telefono_celular
varchar(20));
Query OK, 0
rows affected (0.07 sec)
mysql>
show tables;
+------------------------+
|
Tables_in_empresa_dpac |
+------------------------+
|
departamentos |
|
empleados |
|
hijos |
+------------------------+
3 rows in
set (0.00 sec)
mysql> insert into hijos
values('M00298389388329SG','Mariana','Solis','Gutierrez','1997/04/12','Tlalpan','San
Pedro Martir','Cedral s/n esq. Xochitepetl',24,54,23,14923,'5412-9023','55 8192
5258');
Query OK, 1 row affected (0.01 sec)
mysql> insert
into hijos
values('A89213782378274CL','Ana','Caseres','Lopez','1995/12/17','Alvaro
Obregon','Belem de las Flores','Av. Constituyentes num.
813',19,32,67,1789,'5590-0312','55 0290 1223');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into hijos
values('U31829083902843DC','Ulises','Dominguez','Cruz','2006/10/20','Gustavo A.
Madero','Guadalupe Proletaria','Av. Rio de los Remedios num.
454',54,12,87,17320,'5213-2912','55 3849 2312');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into hijos
values('D23899829082908HJ','Diego','Hernandez','Jaimes','2004/06/22','Azcapozalco','Santa
Catarina','Cda. Cesali num.13',56,65,56,123454,'5909-3021','55 1290 9021');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into hijos
values('E28197392189389SM','Edgar','Sanchez','Morgado','2000/03/30','Cuauhtemoc','Guerrero','Mina
num. 1 esq. Riva Palacio',67,78,43,169192,'8390-9209','55 5362
2673');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into hijos values('O21839028903893AG','Omar','Aguilar','Gonzalez','2002/01/24','Tlalpan','Ex.
Hacienda','Calz. Del Hueso num. 729',89,87,23,14309,'7928-3901','55 6623
3211');
Query OK, 1 row affected (0.00 sec)
mysql> insert into hijos
values('B32787287832894AV','Brayan','Aldana','Vazquez','1999/02/19','Azcapozalco','Jardin
Azpeitia','Av. De las Granjas num. 283',13,67,21,12843,'5848-0323','55 4554
3428');
Query OK, 1 row affected (0.00 sec)
mysql> insert into hijos
values('M23189218398283GG','Monserrat','Gutierrez','Garcia','1998/08/27','Azcapozalco','Jardin
Azpeitia','Av.De las Granjas num. 618',23,12,33,12549,'5909-0383','55 0958
2330');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into hijos
values('E32647536546352GJ','Erick','Gonzalez','Jimenez','2005/10/03','Tultitlan','Ampliacion
Buena Vista','Morelia s/n',45,69,12,54962,'1290-0292','55 7280 2133');
Query OK, 1 row affected (0.00 sec)
mysql> insert into hijos
values('K23172635456734MM','Karen','Mendez','Miranda','2003/11/09','Gustavo A.
Madero','Ejido de Aragon','Av. 510 num. 1000 esq. Av. Perto de
Palos',23,89,21,178912,'2390-0912','55 7280 2133');
Query OK, 1 row affected (0.00 sec)
mysql> describe hijos;
+------------------+-------------+------+-----+---------+-------+
| Field
| Type | Null | Key |
Default | Extra |
+------------------+-------------+------+-----+---------+-------+
| codigo_hijos | varchar(20) | NO | PRI | NULL |
|
| nombre_hijo | varchar(25) | YES | |
NULL | |
| apellido_paterno |
varchar(15) | YES | | NULL
| |
| apellido_materno |
varchar(15) | YES | | NULL
| |
| fecha_nacimiento |
date | YES | |
NULL | |
| municipio | varchar(40) | YES | |
NULL | |
| colonia | varchar(40) | YES | |
NULL | |
| calle | varchar(45) | YES | |
NULL | |
| numero | int(11) | YES
| | NULL |
|
| lt | int(11) | YES
| | NULL |
|
| mz | int(11) | YES
| | NULL |
|
| codigo_postal | int(11) | YES
| | NULL |
|
| telefono_casa | varchar(10) | YES | |
NULL | |
| telefono_celular |
varchar(20) | YES | | NULL
| |
+------------------+-------------+------+-----+---------+-------+
14 rows in set (0.01 sec)
mysql> select * from hijos;
+-------------------+-------------+------------------+------------------+------------------+-------------------+------------------------+-------------------------------------------+--------+------+------+---------------+---------------+------------------+
| codigo_hijos | nombre_hijo | apellido_paterno |
apellido_materno | fecha_nacimiento | municipio | colonia | calle | numero |
lt | mz | codigo_postal | telefono_casa | telefono_celular
|
+-------------------+-------------+------------------+------------------+------------------+-------------------+------------------------+-------------------------------------------+--------+------+------+---------------+---------------+------------------+
| M00298389388329SG | Mariana | Solis | Gutierrez | 1997-04-12 | Tlalpan | San Pedro Martir |
Cedral s/n esq. Xochitepetl
| 24 | 54 |
23 | 14923 |
5412-9023 | 55 8192 5258 |
| A89213782378274CL | Ana | Caseres | Lopez | 1995-12-17 | Alvaro Obregon | Belem de las Flores | Av. Constituyentes num. 813 | 19 |
32 | 67 | 1789 | 5590-0312 | 55 0290 1223 |
| U31829083902843DC | Ulises | Dominguez | Cruz | 2006-10-20 | Gustavo A. Madero | Guadalupe Proletaria | Av. Rio de los Remedios num. 454 |
54 | 12 | 87 |
17320 | 5213-2912 | 55 3849
2312 |
| D23899829082908HJ | Diego | Hernandez | Jaimes | 2004-06-22 | Azcapozalco | Santa Catarina | Cda. Cesali num.13 | 56 |
65 | 56 | 123454 | 5909-3021 | 55 1290 9021 |
| E28197392189389SM | Edgar | Sanchez | Morgado | 2000-03-30 | Cuauhtemoc | Guerrero | Mina num. 1 esq. Riva Palacio | 67 |
78 | 43 | 169192 | 8390-9209 | 55 5362 2673 |
| O21839028903893AG | Omar | Aguilar | Gonzalez | 2002-01-24 | Tlalpan | Ex. Hacienda | Calz. Del Hueso num. 729 | 89 |
87 | 23 | 14309 | 7928-3901 | 55 6623 3211 |
| B32787287832894AV | Brayan | Aldana | Vazquez | 1999-02-19 | Azcapozalco | Jardin Azpeitia | Av. De las Granjas num. 283 | 13 |
67 | 21 | 12843 | 5848-0323 | 55 4554 3428 |
| M23189218398283GG |
Monserrat | Gutierrez | Garcia | 1998-08-27 | Azcapozalco | Jardin Azpeitia | Av.De las Granjas num. 618 | 23 |
12 | 33 | 12549 | 5909-0383 | 55 0958 2330 |
| E32647536546352GJ | Erick | Gonzalez | Jimenez | 2005-10-03 | Tultitlan | Ampliacion Buena Vista | Morelia
s/n | 45 |
69 | 12 | 54962 | 1290-0292 | 55 7280 2133 |
| K23172635456734MM | Karen | Mendez | Miranda | 2003-11-09 | Gustavo A. Madero | Ejido de Aragon | Av. 510 num. 1000 esq. Av. Perto de
Palos | 23 | 89 |
21 | 178912 |
2390-0912 | 55 7280 2133 |
+-------------------+-------------+------------------+------------------+------------------+-------------------+------------------------+-------------------------------------------+--------+------+------+---------------+---------------+------------------+
10 rows in set (0.00
sec)
Centro
mysql> create table centros(codigo_centro
varchar(30) primary key,nombre_encargado varchar(30),apellido_paterno
varchar(30),apellido_materno varchar(30),numero_cuartos_en_total
integer,hora_entrada varchar(20),dias_asistentes varchar(40),hora_salida
varchar(20));
Query OK, 0
rows affected (1.45 sec)
mysql>
show tables;
+------------------------+
|
Tables_in_empresa_dpac |
+------------------------+
| centros |
| departamentos |
| empleados |
| hijos |
+------------------------+
4 rows in set (0.42 sec)
mysql> insert into centros
values('DC298878190CC920','Abigail','Gutierrez','Mendez',10,'7:30_a.m.','Lunes_a_Sabado','9:00_p.m.');
Query OK, 1
row affected (0.02 sec)
mysql>
insert into centros
values('DC308980230CC100','Maribel','Yanez','Martinez',12,'7:30_a.m','Lunes,Miercoles,Viernes_y_Domingo','9:00_p.m.');
Query OK, 1
row affected (0.00 sec)
mysql>
insert into centros
values('DC039848488CC129','Areli','Camarillo','Hernandez',14,'5:30_a.m','Martes_a_Sabado','6:30_p.m.');
Query OK, 1
row affected (0.00 sec)
mysql>
insert into centros
values('DC392084898CC210','Ericka','Gonzalez','Caseres',12,'6:00_a.m','Lunes_a_Viernes','9:15_p.m.');
Query OK, 1
row affected (0.00 sec)
mysql>
insert into centros
values('DC392843488CC290','Yanett','Hernandez','Alillo',15,'7:00_a.m','Lunes_a_Jueves','9:30_p.m.');
Query OK, 1
row affected (0.00 sec)
mysql> insert into centros
values('DC839302098CC0211','Alberto','Dominguez','Solis',10,'8:00_a.m','Lunes,Miercoles,Sabado_y_Domingo','9:30_p.m.');
Query OK, 1
row affected (0.00 sec)
mysql>
insert into centros
values('DC328485909CC283','Dariel','Sanchez','Uriarte',12,'8:30_a.m','Martes_a_Domingo','9:00_p.m.');
Query OK, 1
row affected (0.00 sec)
mysql>
insert into centros
values('DC348938938CC239','Sergio','Mercado','Tavarez',8,'9:00_a.m','Lunes_a_Jueves','9:00_p.m.');
Query OK, 1
row affected (0.00 sec)
mysql>
insert into centros
values('DC848934893CC832','Irvin','Lopez','Mendiola',20,'7:00_a.m','Martes_a_Sabado','8:00_p.m.');
Query OK, 1
row affected (0.00 sec)
mysql> insert into centros
values('DC328947384CC012','Aldo','Aguilar','Zamudio',20,'(8:30_a.m','Lunes,Martes,Jueves_y_Sabado','7:30_p.m.');
Query OK, 1
row affected (0.00 sec)
mysql>
describe centros;
+-------------------------+-------------+------+-----+---------+-------+
|
Field | Type | Null | Key | Default | Extra |
+-------------------------+-------------+------+-----+---------+-------+
| codigo_centro
| varchar(30) | NO | PRI |
NULL | |
| nombre_encargado
| varchar(30) | YES | | NULL
| |
| apellido_paterno
| varchar(30) | YES | | NULL
| |
| apellido_materno
| varchar(30) | YES | | NULL
| |
| numero_cuartos_en_total | int(11) | YES
| | NULL |
|
| hora_entrada
| varchar(20) | YES | | NULL
| |
| dias_asistentes
| varchar(40) | YES | | NULL
| |
| hora_salida
| varchar(20) | YES | | NULL
| |
+-------------------------+-------------+------+-----+---------+-------+
8 rows in
set (0.02 sec)
mysql>
select * from centros;
+-------------------+------------------+------------------+------------------+-------------------------+--------------+-----------------------------------+-------------+
| codigo_centro |
nombre_encargado | apellido_paterno | apellido_materno |
numero_cuartos_en_total | hora_entrada | dias_asistentes | hora_salida |
+-------------------+------------------+------------------+------------------+-------------------------+--------------+-----------------------------------+-------------+
| DC298878190CC920 |
Abigail | Gutierrez | Mendez | 10 | 7:30_a.m. | Lunes_a_Sabado | 9:00_p.m. |
| DC308980230CC100 |
Maribel | Yanez | Martinez | 12 | 7:30_a.m | Lunes,Miercoles,Viernes_y_Domingo |
9:00_p.m. |
| DC039848488CC129 |
Areli | Camarillo | Hernandez |
14 |
5:30_a.m | Martes_a_Sabado | 6:30_p.m. |
| DC392084898CC210 |
Ericka | Gonzalez | Caseres | 12 | 6:00_a.m | Lunes_a_Viernes | 9:15_p.m. |
| DC392843488CC290 |
Yanett | Hernandez | Alillo | 15 | 7:00_a.m | Lunes_a_Jueves | 9:30_p.m. |
| DC839302098CC0211 | Alberto | Dominguez | Solis | 10 | 8:00_a.m | Lunes,Miercoles,Sabado_y_Domingo | 9:30_p.m.
|
| DC328485909CC283 |
Dariel | Sanchez | Uriarte | 12 | 8:30_a.m | Martes_a_Domingo | 9:00_p.m.
|
| DC348938938CC239 |
Sergio | Mercado | Tavarez | 8 | 9:00_a.m | Lunes_a_Jueves | 9:00_p.m. |
| DC848934893CC832 |
Irvin | Lopez | Mendiola | 20 | 7:00_a.m | Martes_a_Sabado | 8:00_p.m. |
| DC328947384CC012 |
Aldo | Aguilar | Zamudio | 20 | (8:30_a.m | Lunes,Martes,Jueves_y_Sabado |
7:30_p.m. |
+-------------------+------------------+------------------+------------------+-------------------------+--------------+-----------------------------------+-------------+
10 rows in set (0.01 sec)
Habilidad
mysql> create table habilidades(codigo_habilidad
varchar(20) primary key,descripcion varchar(220));
Query OK, 0
rows affected (0.06 sec)
mysql>
show tables;
+------------------------+
|
Tables_in_empresa_dpac |
+------------------------+
| centros |
| departamentos
|
| empleados |
| habilidades |
| hijos |
+------------------------+
5 rows in set (0.00 sec)
mysql> insert
into habilidades values('H00001000T','Escribe muy rapido,sabe usar word,excel y
power point');
Query OK, 1 row affected (0.01 sec)
mysql> insert
into habilidades values('H00002000T','Sabe como administrar todos los datos en
un formato en excel');
Query OK, 1 row affected (0.01 sec)
mysql> insert
into habilidades values('H00003000T','Escribe muy rapido a computadora y sabe
seguir instrucciones');
Query OK, 1 row affected (0.01 sec)
mysql> insert
into habilidades values('H00004000T','Sabe usar toda la paqueteria de Office');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into habilidades values('H00005000T','Conoce sobre financieria y contaduria de
pagos');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into habilidades values('H00006000T','Sabe reparar todo tipo de aparatos e
instalar camaras de seguridad');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into habilidades values('H00007000T','Sabe programar una computadora y poner
candados de seguridad para ningun robo de informacion');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into habilidades values('H00008000T','Tiene como habilidad conservar limpio
tanto como elevadores y oficina del centro,tener limpieza total tanto como en
banos, escaleras y cuartos');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into habilidades values('H00009000T','Conoce sobre administrar datos e
informacion privada y contaduria');
Query OK, 1 row affected (0.00 sec)
mysql> insert
into habilidades values('H000010000T','Conoce como supervisar que este bien
todos los datos de informacion privada para asi poder entregar datos validos
sin equivocaciones');
Query OK, 1 row affected (0.00 sec)
mysql> describe habilidades;
+------------------+--------------+------+-----+---------+-------+
| Field
| Type | Null | Key |
Default | Extra |
+------------------+--------------+------+-----+---------+-------+
| codigo_habilidad |
varchar(20) | NO | PRI | NULL |
|
| descripcion
| varchar(220) | YES | | NULL
| |
+------------------+--------------+------+-----+---------+-------+
2 rows in set (0.01 sec)
mysql> select *
from habilidades;
+------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| codigo_habilidad |
descripcion |
+------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| H00001000T | Escribe muy rapido,sabe usar
word,excel y power point
|
| H00002000T | Sabe como administrar todos los datos
en un formato en excel |
| H00003000T | Escribe muy rapido a computadora y
sabe seguir instrucciones
|
| H00004000T |
Sabe usar toda la paqueteria de Office
|
| H00005000T | Conoce sobre financieria y contaduria
de pagos
|
| H00006000T | Sabe reparar todo tipo de aparatos e
instalar camaras de seguridad
|
| H00007000T | Sabe programar una computadora y poner
candados de seguridad para ningun robo de informacion
|
| H00008000T | Tiene como habilidad conservar limpio
tanto como elevadores y oficina del centro,tener limpieza total tanto como en
banos, escaleras y cuartos |
| H00009000T | Conoce sobre administrar datos e
informacion privada y contaduria
|
| H000010000T | Conoce como supervisar que este bien
todos los datos de informacion privada para asi poder entregar datos validos
sin equivocaciones |
+------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
10 rows in set (0.00
sec)
No hay comentarios:
Publicar un comentario