Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
error_outline
This textbook solution is under construction.
Students have asked these similar questions
which object can be used to speed up searches and quires in general?
a) Index
b) Unique
c) Check
d) Cascade
2. load_friendsdb
This function does the reverse of save_friendsdb -- it takes a single argument, filename, and opens that specified file for
reading. Then it reads the file one line at a time and creates a new friends database to return. Like in the previous
function, each line will contain a friend's name followed by a tab, then the friend's height, and then a newline.
Sample calls should look like this:
>>> load friendsdb("friendsdb.tsv")
[{'name': ' bimmy', 'height': 600}, {'name': 'Ian Donald Calvin Euclid Zappa', height': 175}]
Create an application which can access a database.
Create a database with an application user, user specific for your application to use, and 1 table of a couple of fields properly indexed. Grant permissions for the user to access the table. (submit .SQL file)
Create a simple application, language of your choice, (BE languages only, no JS or Node) which can do the following operations: (submit source code file):
Connect using the application user created above.
Insert into the table, and select from the table using a WHERE clause, where all fields are parameterized.
Display results of the select.
Use a simple web server API interface for data input and output, which can be accessed via local browser or curl.
Knowledge Booster
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
- Create a user Nurse. (Screenshot 1) Create a database Hospital. (Screenshot 2) Grant Nurse privileges to Hospital (Screenshot 3) As Nurse, create a table Patients with the following structure. (Screenshot 4) PatientID RoomNo FirstName LastName Admission Temperature double(10,2) int(8) Primary Key and not null int(4) varchar(14) not null varchar(14) not null datetime Use a command to describe the table(Screenshot 5) Insert 2 patients randomly to the above table(Screenshot 6) Show all the contents of the table. (Screenshot 7)arrow_forward2. load_friendsdb This function does the reverse of save_friendsdb -- it takes a single argument, filename, and opens that specified file for reading. Then it reads the file one line at a time and creates a new friends database to return. Like in the previous function, each line will contain a friend's name followed by a tab, then the friend's height, and then a newline. Sample calls should look like this: >>> load_friendsdb("friendsdb.tsv") [{'name': ' bimmy', 'height': 600}, {'name': Ian Donald Calvin Euclid Zappa', height': 175}]arrow_forward#Fill in comments to spec. import sqlite3from contextlib import closing from Objects import Player, Lineup conn = None def connect():global connif not conn:DB_FILE = "player_db.sqlite"conn = sqlite3.connect(DB_FILE)conn.row_factory = sqlite3.Row def close():if conn:conn.close() def get_players():return None #remove this line when code is added.# SQL statement to select all 7 fields for all players # Use a with statement to execute the query # Create a lineup object# use a loop to populate the lineup object with player objects# return the lineup object def get_player(playerID):return None #remove this line when code is added.# SQL statement to select all 7 fields for a player # Use a with statement to execute the query & return a player object if the player exists def add_player(player):return None #remove this line when code is added.# SQL statement to insert 6 fields for a player added to the table # Use a with statement to execute the query def delete_player(player):return None…arrow_forward
- #DB File import sqlite3import sysimport osfrom contextlib import closing from Objects import Player, Lineup conn = None def connect():global connif not conn:if sys.platform =="win32":DB_FILE = "player_db.sqlite"else:HOME = os.environ["HOME"]DB_FILE = HOME + "player_db.sqlite"conn = sqlite3.connect(DB_FILE)conn.row_factory = sqlite3.Row def close():if conn:conn.close() def get_players():query = '''SELECT * FROM Player;'''with closing(conn.cursor()) as c:c.execute(query)results = c.fetchall()player = Player(playerID, batOrder, first, last, position, at_bats, hits)for row in results:for player in row:lineup = Lineup.add(Player(player)) return lineup# SQL statement to select all 7 fields for all players # Use a with statement to execute the query # Create a lineup object# use a loop to populate the lineup object with player objects# return the lineup object def get_player(playerID):query = '''SELECT * FROM PlayerWHERE playerID = ?;'''with closing(conn.cursor()) as c:c.execute(query,…arrow_forwarda. Load a database applicationb. Create a database labelled as MOVIE_LIBRARY in the created folder with the following fields:MovieID, Movie Name, Date Released, Movie Category, Quantity Delivered (table in image attachment) c. Save the table as tblMovies.d. Fill tblMovies with the given data as shown in 2 (b).e. Create a form for the records and name it frmMoviesf. Query the table to look out for movies released in the year 2014 and name it as qryMoviesarrow_forwardPart I Create an interface for a Store application. Provide at least 3 function. Part II Create a type of Store class. Implement the methods introduced in the interface. Note: Do not compress your files, submit only java files. Note: Do not forget to justify your answers with comments.arrow_forward
- Implement the following clauses on a database of your choice and produce results. (Writequery and add screen shot of your implementation)iv) Viewv) Group Byvi) Order Byvii) Like kindly answer the all parts i already posted 2 times this one question but there are are total 7 parts so kindly solve 4 prts.arrow_forwardQuestion 9 A use case description is generic with few details. For this reason it does not contain numbered steps and alternatives to those steps. That is the kind of information contained in a user story. True False Question 10 Which git command would you use to update a remote repository with the current changes made in a local repository? pull clone commit add None of the above Question 11 The UML symbol to show composition/aggregation is a diamond. The diamond should be attached to the containing class contained class fat headed arrow center of a dashed linearrow_forwardWhich of the following is an object privilege?a. DELETE ANYb. INSERT ANYc. UPDATE ANYd. REFERENCESarrow_forward
- If the current record is the ninth record in a dataset that contains 10 records, which of the following statements will position the record pointer on the tenth record?a. TblEmployBindingSource.Position = 9b. TblEmployBindingSource.Position += 1c. TblEmployBindingSource.MoveLast()d. all of the abovearrow_forwardISBN Title Author 12345678 The Hobbit J.R.R. Tolkien 45678912 DaVinci Code Dan Brown Your student ID DBS311 Your Name use the following statement to Write the MongoDB Shell code to modify the 3rd document above to add the ‘Professor’ to it with value ‘Your Professors Name’.arrow_forwardWhich of the following statements is correct about reference and object? O Date datel; creates a Date object. new Date (1, 1, 2000) ; declares a Date reference. O References and objects are the same thing. When a reference is declared, the creation of an object is not necessary. OThe new keyword creates objects during compile time.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
dml in sql with examples; Author: Education 4u;https://www.youtube.com/watch?v=WvOseanUdk4;License: Standard YouTube License, CC-BY