ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

CONTRUIR LA BASE DE DATOS


Enviado por   •  13 de Mayo de 2019  •  Tareas  •  1.199 Palabras (5 Páginas)  •  96 Visitas

Página 1 de 5

Construir la base de datos para su proyecto de formación

REALIZADO POR:

MAIRA ALEJANDRA AVILA MENDOZA

CRITIAN LEONARDO ACOSTA  

DOCENTE:

JAMIR ANTONIO BERRIO MARTINEZ

        

2018

        

ANALISIS Y DESARROLLO DE SISTEMAS DE INFORMACION

SQL del proyecto Proy_ macts  

Proy_ macts  

Tipo

longitud

Cod_ entidad(pk)

int

Regi_entidad  

varchar

20

Nom_entidad

Varchar

100

Área_entidad

varchar

50

[pic 2]

        Crear la base de datos

        Descripción  Proy_ macts  [pic 3]

Cod_entidad 

Reg_entidad

Nom_entidad

Área_entidad

28357100

U14od-cd001

policlinica

Salud

46952317

Cm853-up20

prodental

ortodoncia

12458769

DM002-u754

claro

telefonia

[pic 4]

[pic 5]

[pic 6]

[pic 7]

        

Microsoft Windows [Versión 10.0.16299.248]

(c) 2017 Microsoft Corporation. Todos los derechos reservados.

C:\Users\Acer>cd..

C:\Users>cd..

C:\>cd xampp/mysql/bin

C:\xampp\mysql\bin>mysql -u root -p

Enter password:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

C:\xampp\mysql\bin>mysql -u root -p

Enter password: **********

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MySQL connection id is 7

Server version: 5.7.21-log MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [(none)]> create 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 '' at line 1

MySQL [(none)]> create database proyecto_macts;

Query OK, 1 row affected (0.00 sec)

MySQL [(none)]> 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 [(none)]> show database proyecto_macts;

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 proyecto_macts' at line 1

MySQL [(none)]> show databases;

+----------------------+

| Database             |

+----------------------+

| information_schema   |

| estidiantexcurso     |

| laboratorio          |

| laboratoriosql       |

| mysql                |

| nombre_base_de_datos |

| performance_schema   |

| profesor             |

| proyecto_macts       |

| sakila               |

| sys                  |

| world                |

+----------------------+

12 rows in set (0.00 sec)

MySQL [(none)]> proyecto_macts;

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 'proyecto_macts' at line 1

MySQL [(none)]> use proyecto_macts;

Database changed

MySQL [proyecto_macts]> create table proy_macts(cod_entidad int primary key,reg_entidad varchar(20),nom_entidad varchar(100),area_entidad varchar(50));

Query OK, 0 rows affected (0.30 sec)

MySQL [proyecto_macts]> describe proyecto_macts;

ERROR 1146 (42S02): Table 'proyecto_macts.proyecto_macts' doesn't exist

MySQL [proyecto_macts]> describe proyecto_macts;

ERROR 1146 (42S02): Table 'proyecto_macts.proyecto_macts' doesn't exist

MySQL [proyecto_macts]> show tables;

+--------------------------+

| Tables_in_proyecto_macts |

+--------------------------+

| proy_macts               |

+--------------------------+

1 row in set (0.00 sec)

MySQL [proyecto_macts]> describe proy_macts;

+--------------+--------------+------+-----+---------+-------+

| Field        | Type         | Null | Key | Default | Extra |

+--------------+--------------+------+-----+---------+-------+

| cod_entidad  | int(11)      | NO   | PRI | NULL    |       |

| reg_entidad  | varchar(20)  | YES  |     | NULL    |       |

...

Descargar como (para miembros actualizados)  txt (8.6 Kb)   pdf (856.2 Kb)   docx (608.2 Kb)  
Leer 4 páginas más »
Disponible sólo en Clubensayos.com