Last active
August 29, 2015 14:10
-
-
Save johannfjs/0d797671af992776b17a to your computer and use it in GitHub Desktop.
Constant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Constant { | |
public static String DBname = "ExampleSQLite.db"; | |
public static int DBversion = 1; | |
// Tables | |
public static String TBusuario = "TBusuario"; | |
public static String TBpersona = "TBpersona"; | |
// Columns | |
public static String Cidusuario = "idusuario"; | |
public static String Cusuario = "usuario"; | |
public static String Ccontrasenia = "contrasenia"; | |
public static String Cestado = "estado"; | |
public static String Cidpersona = "idpersona"; | |
public static String Cnombre = "nombre"; | |
public static String Capellidos = "apellidos"; | |
public static String Cfechanacimiento = "fechanacimiento"; | |
public static String Csexo = "sexo"; | |
// Create Tables | |
public static String CREATE_TABLE_PERSONA = "CREATE TABLE " + TBpersona | |
+ "(" + Cidusuario + " INTEGER PRIMARY KEY AUTOINCREMENT," | |
+ Cusuario + " TEXT," + Ccontrasenia + " TEXT," + Cestado | |
+ " TEXT)"; | |
public static String CREATE_TABLE_USUARIO = "CREATE TABLE " + TBusuario | |
+ "(" + Cidpersona + " INTEGER PRIMARY KEY AUTOINCREMENT," | |
+ Cnombre + " TEXT," + Capellidos + " TEXT," + Cfechanacimiento | |
+ " TEXT," + Csexo + " TEXT," + Cestado + " TEXT," + Cidusuario | |
+ "TEXT, FOREIGN KEY(" + Cidusuario + ") REFERENCES " + TBusuario | |
+ "(" + Cidusuario + "))"; | |
// Drop Tables | |
public static String DROP_TABLE_PERSONA = "DROP TABLE " + TBpersona; | |
public static String DROP_TABLE_USUARIO = "DROP TABLE " + TBusuario; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment