Category : database

i have created a database and table with these fields: 1) Id [int autoincrement] 2) Name [varchar(30)] 3) Lastname [varchar(30)] 4) Age [int] 5) Date [data] 6) Reg_Date [data] 7) Password [varchar(50)] 8) Gender [varchar(20)] now my task is to insert 5 000 000 rows of random data. trying to generate random names, ages, etc. ..

Read more

I’m trying to insert some variables into my database, but I’m getting this error, I don’t know what I’m doing wrong, could you help me? Thanks in advance import mysql.connector as co import time as tm dbConnect = { ‘host’:’mx102.hostgator.mx’, ‘port’:’3306′, ‘user’:’meandmic_root’, ‘password’:’abcde’, ‘database’:’meandmic_analizador’ } felicidad = 0 enojo = 0 sorpresa = 0 tristeza ..

Read more

I have this database schema in SQLite CREATE TABLE cliente( id INTEGER PRIMARY KEY AUTOINCREMENT, primeiro_nome TEXT, ultimo_nome TEXT, email TEXT ); CREATE TABLE pedido( id INTEGER PRIMARY KEY AUTOINCREMENT, data TEXT, status TEXT, id_cliente INTEGER, valor REAL, FOREIGN KEY(id_cliente) REFERENCES cliente(id) ); As it’s above, there is a key constrain between pedido.id and cliente.id. ..

Read more