Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
-
Given the 5 records below stored in a file, write a code snippet that will extract two elements (fields) from a single record into two separate variables. Use string functions to identify the delimeter and extract the sub strings. Show the declaration of variables.
Mohammed Farook;56
Asiphe Ndokani;75
David Johns;62
Craig Smith;81
Katlhego Ntshidi;45
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
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
- Q1: Write a Python program that prompt user to enter at least five entries: 1. Each entry requires two entities: Name (first, last) and Final Score (between 0 and 100) 2. saves the values in a text file 3. calculates the average for Final Score for all the entries written into the file 4. reads that text file and displays its contents on the command prompt including the score average. Write a Python program that prompts the user to search for a string( first and last name) from the file created in Q1. The program displays the name and the final score for that entry if that name was in the file.arrow_forwardCreate a brief code segment that moves the file pointer 50 bytes from the file's start. Assume the file is already open and BX holds the file handle.arrow_forwardTraceback (most recent call last): File "C:/app.py", line 20, in main() File "C:/app.py", line 17, in main print_report() File "C:/app.py", line 12, in print_report print_id() File "C:/app.py", line 6, in print_id message = "Your id is:" + id num TypeError: must be str, not int Process finished with exit code 1 Given this stack trace above, on what line was the exception raised? O Line 17 O Line 12 O Line 6 O Line 20arrow_forward
- In C++ Create a program that outputs 10 strings (that the user inputs) to a file.arrow_forwardUsing Payton (write it as simple as possible)arrow_forwardThe following is a sample of the order data (Customer#, Order#, OrderQty, UnitPrice) to be processed. Store the data in a text file named Order.txt. You may use Notepad to enter the data. 0155, 76533, 3, 10.950140, 75446, 12, 8.500150, 75550, 1, 89.950145, 75648, 25, 2.500130, 76360, 5, 17.90Create a form, ProcessOrder, that reads each order record, computes the extended cost, and displays Cust#, Order#, OrderQty, UnitPrice and ExtendedCost in a ListBox, with the columns aligned.arrow_forward
- Code in C language. Please provide code for 3 different files. One header file and two .C files. I need the code for each file. Please provide photos of the output and source code for each file (3). Please follow All instructions in the photo provided. Use the provided input.txt file provided below. A1, A2 20294 Lorenzana Dr Woodland Hills, CA 91364 B1, B2 19831 Henshaw St Culver City, CA 94023 C1, C2 5142 Dumont Pl Azusa, CA 91112 D1, D2 20636 De Forest St Woodland Hills, CA 91364 A1, A2 20294 Lorenzana Dr Woodland Hills, CA 91364 E1, E2 4851 Poe Ave Woodland Hills, CA 91364 F1, F2 20225 Lorenzana Dr Los Angeles, CA 91111 G1, G2 20253 Lorenzana Dr Los Angeles, CA 90005 H1, H2 5241 Del Moreno Dr Los Angeles, CA 91110 I1, I2 5332 Felice Pl Stevenson Ranch, CA 94135 J1, J2 5135 Quakertown Ave Thousand Oaks, CA 91362 K1, K2 720 Eucalyptus Ave 105 Inglewood, CA 89030 L1, L2 5021 Dumont Pl Woodland Hills, CA 91364 M1, M2 4819 Quedo Pl Westlake Village, CA 91362 I1, I2 5332 Felice Pl…arrow_forwardGiven: string s; int first, last; Write code to repeatedly validate that first is less than last and both first and last are valid indexes of the string s. Then print all characters of the string s from index first to last inclusive. Example Output 1 Enter a string and two indexes: Queensborough 25 eens Example Output 2 Enter a string and two indexes: Science 2 10 Enter a string and two indexes: Science -15 Enter a string and two indexes: Science 2 4 ienarrow_forwardThe data in the left column is the data in a file. Write a Python program to read that data and print the data to the console in the format as shown in the second column. Use the first 2 records to test your code.arrow_forward
- Codearrow_forwardI want to read the numbers from random_number.txt and then display the number and display total of the number and the number of random number read from the file and the average of this numberarrow_forwardCreate a datafile that contains the first name, last name, gender, age, height, smoking preference, eye color and phone number. Add a variety of records to the file. A sample file looks like:  Write a program that opens the file and reads the records one by one. The program will skip any records where the gender preference is not a match. Of those records that match the gender preference, check to see if the age and height are between the maximum and minum preferences. Then check to see if the smoking preference and eye color are also a match. If at least 3 of the remaining fields match, consider the record a partial match, and print it in the report. If all 4 of the remaining fields match, the record is a perfect match and print it in the report with an asterisk next to it. At the end of the program, close the file and report how many total records there were of the specified gender, how many were a partial match, and how many were a perfect match.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education