I have to create a database using python to show geographical points. Create a program the will create your database and insert at least five points. Use your own data, something like: 100, 200, 123, Main Campus 120, 133, 142, Montoya 153, 123, 322, Rio Rancho 133, 123, 143, STEMULUS Center 153, 142, 122, ATC   Run your initialization code to create the database.

Fundamentals of Information Systems
8th Edition
ISBN:9781305082168
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter3: Database Systems And Applications
Section: Chapter Questions
Problem 9SAT: _______________ is a special purpose programming language for accessing and manipulating data stored...
icon
Related questions
Question

I have to create a database using python to show geographical points.

  1. Create a program the will create your database and insert at least five points. Use your own data, something like:

100, 200, 123, Main Campus

120, 133, 142, Montoya

153, 123, 322, Rio Rancho

133, 123, 143, STEMULUS Center

153, 142, 122, ATC

 

  1. Run your initialization code to create the database.
IDLE File Edit Format Run Options
D2L Python-Ch13...
<
Central New...
Table of Contents > Module 9 > Pyt
Python-Ch13
Update
O
Window Help
Fil
*YazzieTP9.py - /Users/tishenayazzie/Documents/YazzieTP9.py
import sqlite3
conn = sqlite3.connect( 'demoDB]. db')
curs
conn.cursor()
sqlCmd = 'SELECT ROWID, * FROM tblDemo'
curs.execute(sqlCmd)
Num1Field INT,
Num2Field FLOAT,
String Field TEXT
)
Q↑↓ 25 of 27')
data = curs.fetchall()
curs.execute('''
CREATE TABLE tblDemo (
startingData = (
(100, 200, 123, 'Main Campus'),
(120,133,142, 'Montoya'),
(153, 123,322, 'Rio Rancho'),
(133, 123, 143, 'STEMULUS Center'),
(153, 142, 122, 'ATC')
)
for row in startingData:
sqlCmd=
INSERT INTO tblDemo (Num1Field, Num2 Field, String Field)
VALUES (?, ?, ?)
III
curs.execute(sqlCmd, row)
conn.commit()
conn.close()
print (data)
10
11
12
13
14
15 for x in myresults:
16
print (x)
17
18 conn.commit()
19 conn.close()
20
mycourses.cnm.edu
NOV 1
22
اله
TXT
(3.7.9)*
Ln: 2
Python 3.7.9 Shell
Python 3.7.9 (v3.7.9:13c94747c7, Aug 15 2020, 01:31:08)
(clang-600.0.57)] on darwin
[C
tv ♫
Col: 30
2
"copyright", "credits" or "license()" for more information.
RESTART: /Users/tishenayazzie/Documents/YazzieTP9.py
=== RESTART: /Users/tishenayazzie/Documents/YazzieTP9.py
most recent call last):
sers/tishenayazzie/Documents/Yazzie TP9.py", line 11, in <module>
rationalError: table tblDemo already exists
=== RESTART: /Users/tishenayazzie/Documents/YazzieTP9.py
most recent call last):
sers/tishenayazzie/Documents/YazzieTP9.py", line 13, in <module>
rationalError: table tblDemo already exists
A
W
Tue Nov 22 6:48 PM
DOCX
Ln: 18
Col: 4
TE
Points
Transcribed Image Text:IDLE File Edit Format Run Options D2L Python-Ch13... < Central New... Table of Contents > Module 9 > Pyt Python-Ch13 Update O Window Help Fil *YazzieTP9.py - /Users/tishenayazzie/Documents/YazzieTP9.py import sqlite3 conn = sqlite3.connect( 'demoDB]. db') curs conn.cursor() sqlCmd = 'SELECT ROWID, * FROM tblDemo' curs.execute(sqlCmd) Num1Field INT, Num2Field FLOAT, String Field TEXT ) Q↑↓ 25 of 27') data = curs.fetchall() curs.execute(''' CREATE TABLE tblDemo ( startingData = ( (100, 200, 123, 'Main Campus'), (120,133,142, 'Montoya'), (153, 123,322, 'Rio Rancho'), (133, 123, 143, 'STEMULUS Center'), (153, 142, 122, 'ATC') ) for row in startingData: sqlCmd= INSERT INTO tblDemo (Num1Field, Num2 Field, String Field) VALUES (?, ?, ?) III curs.execute(sqlCmd, row) conn.commit() conn.close() print (data) 10 11 12 13 14 15 for x in myresults: 16 print (x) 17 18 conn.commit() 19 conn.close() 20 mycourses.cnm.edu NOV 1 22 اله TXT (3.7.9)* Ln: 2 Python 3.7.9 Shell Python 3.7.9 (v3.7.9:13c94747c7, Aug 15 2020, 01:31:08) (clang-600.0.57)] on darwin [C tv ♫ Col: 30 2 "copyright", "credits" or "license()" for more information. RESTART: /Users/tishenayazzie/Documents/YazzieTP9.py === RESTART: /Users/tishenayazzie/Documents/YazzieTP9.py most recent call last): sers/tishenayazzie/Documents/Yazzie TP9.py", line 11, in <module> rationalError: table tblDemo already exists === RESTART: /Users/tishenayazzie/Documents/YazzieTP9.py most recent call last): sers/tishenayazzie/Documents/YazzieTP9.py", line 13, in <module> rationalError: table tblDemo already exists A W Tue Nov 22 6:48 PM DOCX Ln: 18 Col: 4 TE Points
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781305082168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning