Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Binary file added areopets_dani.db
Binary file not shown.
File renamed without changes.
31 changes: 31 additions & 0 deletions exercicios/para-casa/aeroporto_dani.py
Original file line number Diff line number Diff line change
@@ -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()
33 changes: 33 additions & 0 deletions exercicios/para-casa/avengers_dani.py
Original file line number Diff line number Diff line change
@@ -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()
29 changes: 29 additions & 0 deletions exercicios/para-casa/nitendo_dani
Original file line number Diff line number Diff line change
@@ -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()
18 changes: 18 additions & 0 deletions exercicios/para-sala/aula.py
Original file line number Diff line number Diff line change
@@ -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())
15 changes: 15 additions & 0 deletions exercicios/para-sala/aula1.py
Original file line number Diff line number Diff line change
@@ -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())
32 changes: 32 additions & 0 deletions exercicios/para-sala/titanic_dani.py
Original file line number Diff line number Diff line change
@@ -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()
Binary file added jogos.db
Binary file not shown.
Binary file added marvel_dani.db
Binary file not shown.
47 changes: 47 additions & 0 deletions nitendo_64.csv
Original file line number Diff line number Diff line change
@@ -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
Binary file added primeiroBanco.db
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added titanic.db
Binary file not shown.