//Creando tablas
BaseDatos.execSQL("create table usuarios(cedula integer primary key, nombre text, apellidos text,fecha_nacimiento text, contrasenia text)");
BaseDatos.execSQL("create table lugares_atencion(id integer PRIMARY KEY AUTOINCREMENT, nombre text,direccion text)");
BaseDatos.execSQL("create table especialidades(id integer primary key, nombre text, idLugar integer, foreign key (idLugar) references lugares_atencion(id))");
BaseDatos.execSQL("create table medicos(cedula integer primary key, nombre text, apellidos text,idEspecialidad int, idLugar_atencion int, foreign key (idEspecialidad) references especialidades(id),foreign key (idLugar_atencion) references lugares_atencion(id))");
BaseDatos.execSQL("create table citas(id integer primary key autoincrement,cedula_usuario int, cedula_medico int, fecha text, hora text, foreign key (cedula_usuario) references usuarios(cedula), foreign key (cedula_medico) references medicos(cedula) )");
Comentarios
Publicar un comentario