diff --git a/material/Airport-Pets.csv b/Airport-Pets.csv similarity index 100% rename from material/Airport-Pets.csv rename to Airport-Pets.csv diff --git a/areopets_dani.db b/areopets_dani.db new file mode 100644 index 0000000..22077b0 Binary files /dev/null and b/areopets_dani.db differ diff --git a/material/avengers.csv b/avengers.csv similarity index 100% rename from material/avengers.csv rename to avengers.csv diff --git a/exercicios/para-casa/aeroporto_dani.py b/exercicios/para-casa/aeroporto_dani.py new file mode 100644 index 0000000..490ce29 --- /dev/null +++ b/exercicios/para-casa/aeroporto_dani.py @@ -0,0 +1,31 @@ +import sqlite3 +import csv + +banco = sqlite3.connect('areopets_dani.db') +cursor = banco.cursor() + +cursor.execute('''CREATE TABLE IF NOT EXISTS aero_pets(id INTEGER PRIMARY KEY AUTOINCREMENT,\ + Zip INT,\ + City TEXT ,\ + State TEXT,\ + Division TEXT,\ + Parking TEXT,\ + Pets TEXT, \ + Food TEXT,\ + Lounge TEXT)''') + + +file = open("Airport-Pets.csv") + +conteudo = csv.reader(file) + +inserir_conteudo = "INSERT INTO aero_pets\ +(Zip, City, State, Division, Parking, Pets, Food, Lounge) VALUES (?, ?, ?, ?, ?, ?, ?, ?)" + +cursor.executemany(inserir_conteudo, conteudo) + +selecionar_tudo = "SELECT * FROM aero_pets" +entradas = cursor.execute(selecionar_tudo).fetchall() + +banco.commit() +banco.close() \ No newline at end of file diff --git a/exercicios/para-casa/avengers_dani.py b/exercicios/para-casa/avengers_dani.py new file mode 100644 index 0000000..55c2a0b --- /dev/null +++ b/exercicios/para-casa/avengers_dani.py @@ -0,0 +1,33 @@ +import sqlite3 +import csv + +banco = sqlite3.connect('marvel_dani.db') +cursor = banco.cursor() + +cursor.execute('''CREATE TABLE IF NOT EXISTS marvel_av(id INTEGER PRIMARY KEY AUTOINCREMENT,\ + URL TEXT,\ + Name TEXT ,\ + Appearances INT,\ + Current TEXT,\ + Gender TEXT,\ + "Full Intro" TEXT, \ + Year INT,\ + "Years since joining" INT,\ + Notes TEXT)''') + + +file = open("avengers.csv") + +conteudo = csv.reader(file) + +inserir_conteudo = "INSERT INTO marvel_av\ +(URL,Name,Appearances,Current,Gender,'Full Intro',\ +Year,'Years since joining',Notes) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)" + +cursor.executemany(inserir_conteudo, conteudo) + +selecionar_tudo = "SELECT * FROM marvel_av" +entradas = cursor.execute(selecionar_tudo).fetchall() + +banco.commit() +banco.close() \ No newline at end of file diff --git a/exercicios/para-casa/nitendo_dani b/exercicios/para-casa/nitendo_dani new file mode 100644 index 0000000..d9ad69d --- /dev/null +++ b/exercicios/para-casa/nitendo_dani @@ -0,0 +1,29 @@ +import sqlite3 +import csv + +banco = sqlite3.connect('jogos.db') +cursor = banco.cursor() + +cursor.execute("CREATE TABLE IF NOT EXISTS jogos(id INTEGER PRIMARY KEY AUTOINCREMENT,\ + GameId INTEGER NOT NULL,\ + Developer TEXT,\ + Publisher TEXT NOT NULL,\ + Release_date FLOAT,\ + Sales FLOAT)") + + +file = open("nitendo_64.csv") + +conteudo = csv.reader(file) + +inserir_conteudo = "INSERT INTO jogos\ +(GameId, Developer, Publisher, Release_date , Sales)\ +VALUES(?, ?, ?, ?, ?)" + +cursor.executemany(inserir_conteudo, conteudo) + +selecionar_tudo = "SELECT * FROM jogos" +entradas = cursor.execute(selecionar_tudo).fetchall() + +banco.commit() +banco.close() \ No newline at end of file diff --git a/exercicios/para-sala/aula.py b/exercicios/para-sala/aula.py new file mode 100644 index 0000000..4683452 --- /dev/null +++ b/exercicios/para-sala/aula.py @@ -0,0 +1,18 @@ +import sqlite3 + +banco = sqlite3.connect("primeiroBanco.db") + +cursor = banco.cursor() + +#cursor.execute("CREATE TABLE pessoas (nome text, idade interger, email text)") + +cursor.execute("INSERT INTO pessoas VALUES ('Dani Negrão', 38, 'danisnegrao@gmail.com')") +cursor.execute("INSERT INTO pessoas VALUES ('Gabii Negrão', 17, 'gabiisnegrao@gmail.com')") +cursor.execute("INSERT INTO pessoas VALUES ('Lady Negrão', 39, 'leidisnegrao@gmail.com')") +cursor.execute("INSERT INTO pessoas VALUES ('Paula Negrão', 29, 'paulasnegrao@gmail.com')") + +banco.commit() + +cursor.execute("SELECT * FROM pessoas") + +print(cursor.fetchall()) \ No newline at end of file diff --git a/exercicios/para-sala/aula1.py b/exercicios/para-sala/aula1.py new file mode 100644 index 0000000..ec2567e --- /dev/null +++ b/exercicios/para-sala/aula1.py @@ -0,0 +1,15 @@ +import sqlite3 + +banco = sqlite3.connect("primeiroBanco.db") + +cursor = banco.cursor() + +#cursor.execute("CREATE TABLE pessoas (nome text, idade integer, email text)") + +cursor.execute("INSERT INTO pessoas VALUES ('Dani' , 38, 'danis@gmail.com')") + +banco.commit() + +cursor.execute("SELECT * FROM pessoas") + +print(cursor.fetchall()) \ No newline at end of file diff --git a/exercicios/para-sala/titanic_dani.py b/exercicios/para-sala/titanic_dani.py new file mode 100644 index 0000000..b62c2cb --- /dev/null +++ b/exercicios/para-sala/titanic_dani.py @@ -0,0 +1,32 @@ +import sqlite3 +import csv + +banco = sqlite3.connect('titanic.db') +cursor = banco.cursor() + +cursor.execute("CREATE TABLE IF NOT EXISTS passageiros(\ + id INTEGER PRIMARY KEY AUTOINCREMENT,\ + PassengerId INTEGER NOT NULL,\ + Name TEXT NOT NULL,\ + Age FLOAT,\ + Ticket FLOAT,\ + Fare FLOAT,\ + Cabin TEXT,\ + Embarked TEXT)") + + +file = open("titanic.csv") + +conteudo = csv.reader(file) + +inserir_conteudo = "INSERT INTO passageiros\ +(PassengerId, Name, Age, Ticket, Fare, Cabin, Embarked)\ +VALUES(?, ?, ?, ?, ?, ?, ?)" + +cursor.executemany(inserir_conteudo, conteudo) + +selecionar_tudo = "SELECT * FROM passageiros" +entradas = cursor.execute(selecionar_tudo).fetchall(); + +banco.commit() +banco.close() \ No newline at end of file diff --git a/jogos.db b/jogos.db new file mode 100644 index 0000000..c5656dd Binary files /dev/null and b/jogos.db differ diff --git a/marvel_dani.db b/marvel_dani.db new file mode 100644 index 0000000..a6d2782 Binary files /dev/null and b/marvel_dani.db differ diff --git a/nitendo_64.csv b/nitendo_64.csv new file mode 100644 index 0000000..b09435f --- /dev/null +++ b/nitendo_64.csv @@ -0,0 +1,47 @@ +Game,Developer(s),Publisher(s),Release date,Sales +Super Mario 64,Nintendo EAD,Nintendo,1996-06-23,11910000 +Mario Kart 64,Nintendo EAD,Nintendo,1996-12-14,9870000 +GoldenEye 007,Rare,Nintendo,1997-08-25,8090000 +The Legend of Zelda: Ocarina of Time,Nintendo EAD,Nintendo,1998-11-21,7600000 +Super Smash Bros.,HAL Laboratory,Nintendo,1999-01-21,5550000 +Pokémon Stadium,Nintendo EAD,Nintendo,1999-04-30,5460000 +Donkey Kong 64,Rare,Nintendo,1999-11-22,5270000 +Diddy Kong Racing,Rare,Rare,1997-11-14,4880000 +Star Fox 64,Nintendo EAD,Nintendo,1997-04-27,4000000 +Banjo-Kazooie,Rare,Nintendo,1998-06-29,3650000 +Pokémon Snap,HAL Laboratory and Pax Softonica,Nintendo,1999-03-21,3630000 +The Legend of Zelda: Majora's Mask,Nintendo EAD,Nintendo,2000-04-27,3360000 +Star Wars Episode I: Racer,LucasArts,LucasArts,1999-04-30,3100000 +Banjo-Tooie,Rare,Nintendo,2000-11-20,3000000 +Wave Race 64,Nintendo EAD,Nintendo,1996-09-27,2940000 +Yoshi's Story,Nintendo EAD,Nintendo,1997-12-21,2850000 +Mario Party,Hudson Soft,Nintendo,1998-12-18,2700000 +Star Wars: Shadows of the Empire,LucasArts,Nintendo,1996-12-03,2600000 +Pokémon Stadium 2,Nintendo EAD,Nintendo,2000-12-14,2540000 +Perfect Dark,Rare,Rare,2000-05-22,2520000 +Mario Party 2,Hudson Soft,Nintendo,1999-12-17,2480000 +Mario Tennis,Camelot Software Planning,Nintendo,2000-07-21,2320000 +Star Wars: Rogue Squadron,Factor 5 and LucasArts,Nintendo,1998-12-07,2170000 +1080° Snowboarding,Nintendo EAD,Nintendo,1998-02-28,2030000 +Excitebike 64,Left Field Productions,Nintendo,2000-04-30,2000000 +Mario Party 3,Hudson Soft,Nintendo,2000-12-07,1910000 +WCW/nWo Revenge,AKI Corporation and Asmik Ace Entertainment,THQ,1998-10-26,1880000 +"Hey You, Pikachu!",Ambrella,Nintendo,1998-12-12,1830000 +Kirby 64: The Crystal Shards,HAL Laboratory,Nintendo,2000-03-24,1770000 +Cruis'n USA,Williams,Nintendo,1996-12-03,1720000 +Tony Hawk's Pro Skater,Edge of Reality,Activision,2000-02-29,1610000 +F-1 World Grand Prix,Paradigm Entertainment,Nintendo,1998-07-31,1600000 +Turok: Dinosaur Hunter,Iguana Entertainment,Acclaim Entertainment,1997-03-04,1500000 +Mario Golf,Camelot Software Planning,Nintendo,1999-06-11,1470000 +Turok 2: Seeds of Evil,Iguana Entertainment,Acclaim Entertainment,1998-10-21,1400000 +Paper Mario,Intelligent Systems,Nintendo,2000-08-11,1370000 +WCW vs. nWo: World Tour,AKI Corporation and Asmik Ace Entertainment,THQ,1997-11-30,1300000 +Kobe Bryant in NBA Courtside,Left Field Productions,Nintendo,1998-04-27,1190000 +WWF No Mercy,AKI Corporation and Asmik Ace Entertainment,THQ,2000-11-17,1190000 +Jet Force Gemini,Rare,Rare,1999-10-11,1160000 +WWF WrestleMania 2000,AKI Corporation and Asmik Ace Entertainment,THQ,1999-10-12,1140000 +Pilotwings 64,Nintendo EAD / Nintendo R&D3 / Paradigm Entertainment,Nintendo,1996-06-23,1120000 +F-Zero X,Nintendo EAD,Nintendo,1998-07-14,1100000 +Pocket Monsters' Stadium,Nintendo EAD and HAL Laboratory,Nintendo,1998-08-01,1094765 +007: The World Is Not Enough,Eurocom,Electronic Arts,2000-10-17,1080000 +Namco Museum 64,Mass Media Games,Namco,1999-10-31,1040000 diff --git a/primeiroBanco.db b/primeiroBanco.db new file mode 100644 index 0000000..09f206e Binary files /dev/null and b/primeiroBanco.db differ diff --git a/material/sales.csv b/sales.csv similarity index 100% rename from material/sales.csv rename to sales.csv diff --git a/material/songs.csv b/songs.csv similarity index 100% rename from material/songs.csv rename to songs.csv diff --git a/material/titanic.csv b/titanic.csv similarity index 100% rename from material/titanic.csv rename to titanic.csv diff --git a/titanic.db b/titanic.db new file mode 100644 index 0000000..06e274a Binary files /dev/null and b/titanic.db differ