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
ask the user for the number of students they want to enter. Each student will have a different number of courses. So, for each student, you must ask how many courses they have. Next, for each course, you will ask for the course credit/weight and the grade that students have received in that course. You must store all this information in one file named “records.txt”.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 steps with 2 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
- I am really struggling with this in SQL. I keep getting errors. Would it be possible to also attach a spool file for this? I would like to see a spool file for this exercise. I'm very confused. Print a single formatted record Set echo on Set up a spool file. I would suggest c:\Folder\WA4spool.txt SET SERVEROUTPUT ON DECLARE a record variable (Emp_rec) using %ROWTYPE In the BEGIN block use INTO to load a record into the declared variables for HR.EMPLOYEES for Employee_ID = 114 Use a CASE statement to print the associated Department Name for Department_ID Add DBMS_OUTPUT lines to print each variable for the selected record Use TO_CHAR to format Salary as 999,999.00 Add an EXCEPTION block to report when no data is found Compile and run the procedure Close the spool filearrow_forwardWhat do you call a collection of records that have been arranged in a certain order?arrow_forwardEach entry in the system-wide open file table can have more than one file descriptor associated with it. True Falsearrow_forward
- What do you call a group of records that go together?arrow_forwardWhich of the following is a correct statement?a. A commit is issued implicitly when a user exits SQL Developer or SQL*Plus.b. A commit is issued implicitly when a DDL command is executed.c. A commit is issued automatically when a DML command is executed.d. All of the above are correct.e. Both a and b are correct.f. Both a and c are correctarrow_forwardUse My Guitar Shop Database Use Microsoft SQL Server Write a script that includes these statements coded as a transaction: INSERT Orders VALUES (3, GETDATE(), '10.00', '0.00', NULL, 4, 'American Express', '378282246310005', '04/2019', 4); SET @OrderID = @@IDENTITY; INSERT OrderItems VALUES (@OrderID, 6, '415.00', '161.85', 1); INSERT OrderItems VALUES (@OrderID, 1, '699.00', '209.70', 1); Here, the @@IDENTITY variable is used to get the order ID value that’s automatically generated when the first INSERT statement inserts an order. If these statements execute successfully, commit the changes. Otherwise, roll back the changes.arrow_forward
- The Finance team wants to calculate a VAT (8%) on the amount of the stay reservations in the database. However, the team wants to calculate the VAT after the discounts are applied on the prices. In addition, it is important to remember if there is no discount/offers, then the value is NULL in the TRAVELS table. Create a procedure called VATCalculator to calculate the VAT amount and return with the corresponding travel ID. In addition, execute the procedure to account for NULL values and send the respective result to the team. The VAT value should be rounded to 2 decimals.arrow_forwardCreate 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.arrow_forwardThe Sqlite.py file contains several very specific queries: select_Query = "select sqlite_version()" delete_query = "DELETE from Database where id = "+str(id) sel = 'SELECT id FROM Database WHERE name == "{0}"'.format(value) insert_query = """INSERT INTO Database (id, name, photo, html) VALUES (?, ?, ?, ?)""" sqlite_select_query = """SELECT * from Database""" table_query = '''CREATE TABLE Database ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, photo text NOT NULL UNIQUE, html text NOT NULL UNIQUE)''' Write a QueryBuilder function. The QueryBuilder builds a generic Query to build ANY Query type (i.e. version, delete, select, insert, select, table). The QueryBuilder parameters require: The type of Query, the input tuple data and then constructs a query string based on the parameters.…arrow_forward
- Ask the user to enter the name of a fruit. Your program should search the provided ”fruits-database.txt” for the fruit. If the fruit is available, print the price per pound of the fruit. If it's not in the database, print “The fruit does not exist”.arrow_forwardawk is similar to the SQL language in that you can query certain records. What command below will search the the file /etc/passwd file by locating all users that have a default shell '/bin/bash' and print the first column (which is the user name). awk -D: '$7 == "/bin/bash" {print $3}' /etc/passwd Give this to your new intern to figure out. awk -F: '$4 == "/bin/bash" {print $10}' /etc/passwd awk -F: '$7 == "/bin/bash" {print $1}' /etc/passwd awk -F: '$1 == "/bin/bash" {print $7}' /etc/passwd.arrow_forwardIf you are unsure of the location of the update.txt file on your computer, print a copy.arrow_forward
arrow_back_ios
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