By using python I am downloading the data into a MySQL database, but I want to change it Oracle.
Can anyone help with this> For the Oracle database I have username, password, hostname, port, and SID. Are these details are enough to change the database?
<` db = MySQLdb.connect("127.0.0.1", "root", "1234")
cursor = db.cursor()
try:
cursor.execute('create database nasa')
except:
None
cursor.execute('use nasa')
cursor.execute(
"CREATE TABLE IF NOT EXISTS temperatureTable(date VARCHAR(30) NOT NULL, time VARCHAR(30) NOT NULL, longitude VARCHAR(30) NOT NULL, latitude VARCHAR(30) NOT NULL, temperature VARCHAR(30) NOT NULL, PRIMARY KEY (date, longitude, latitude))")
lineToBeStored = 0
for lat in numpy.nditer(latitude):
for lon in numpy.nditer(longitude):
cursor.execute(
"INSERT INTO temperatureTable VALUES('%s', '%s', '%s', '%s', '%s')" % (
today, dateTime, lat, lon, temperatureData[lineToBeStored]))`>