Esta bien los tipos de datos para Mysql
Publicado por Mauricio (1 intervención) el 25/11/2019 00:56:54
hola pido su ayuda en esto esta bien los tipos de datos(integer,date,varchar) donde los puse. en mi país no hay clases por los bloqueos pero no quiero perder tiempo
muchas gracias

muchas gracias
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
create table Pedido(
numPedido integer(5) auto_increment,
fechaPedido date not null,
totalPedido integer(5),
entrega date not null,
Primary key(numPedido)
);
create table Consumible(
codigo integer(5) auto_increment,
Descripcion varchar (50),
precioUnitario float(7.2) not null,
Tipo integer(5),
Primary key(codigo)
);
create table cliente(
ci integer,
nomCliente varchar (20) default'sin nombre',
apPat varchar (20),
apMat varchar (20),
telCliente numeric (10,0) not null,
Primary key(ci)
);
create table Menu(
numero integer unsigned not null,
fecha date not null,
Primary key(numero)
);
create table MenuConsumible(
numero integer(3) unsigned,
codigoConsumible integer(5),
detallePlato varchar (50),
foreign key(numero) references Menu(numero)
on update cascade
on delete cascade,
foreign key(codigoConsumible) references Consumible(codigo)
on update cascade
on delete cascade
);
create table DetallePedido(
numPedido integer,
codigo integer,
cantidad integer unsigned default 1,
foreign key(numPedido) references Pedido(numPedido)
on update cascade
on delete cascade,
foreign key(codigo) references Consumible(codigo)
on update cascade
on delete cascade
);
create table Factura(
numFactura integer unsigned not null,
fechaEmision date not null,
totalFactura float (10,2) default 0.0,
Primary key(numFactura)
);
create table Cargo(
codigo integer(5) auto_increment,
descripcion varchar(50),
sueldo date not null,
Primary key(codigo)
);
create table Sucursal(
codigoSuc integer(5) auto_increment,
nombre varchar (20) default 'sin nombre',
telefono numeric (10,0)not null,
direccion varchar (20)null,
Primary key(codigoSuc)
);
create table empleados(
ci integer (8) unsigned not null,
nomEmpleado varchar (20) default 'sin nombre',
apPat varchar (20),
apMat varchar (20),
tel numeric (10,0)not null,
direccion varchar (20)null,
Primary key(ci)
);
create table PersonaAutorizada(
codigo integer(5) auto_increment,
password integer(4),
fechaActivacion date not null,
Primary key(codigo)
);
create table Egreso(
numeri integer unsigned not null,
descripcion varchar(50),
fecha date not null,
montoTotal integer(10),
Primary key(numeri)
);
create table DocdeRespaldo(
codigo integer(5) auto_increment,
numero integer(2),
descripcion varchar(50),
foto varchar(5),
Primary key(codigo)
);

Valora esta pregunta


0