Suppose you are a manufacturer of product ABCD, which is composed of parts AAAA, BBBB, CCCC and DDDD. Each time a new product is created, it must be added to the product inventory, using the PROD_QOH in a table named PRODUCT. And each time the product ABCD is created, the parts inventory, using PART_QOH in a table named PART, must be reduced by one each for parts AAAA, BBBB, CCCC and DDDD. The sample database contents are shown below for these items: Tablename: PRODUCT Tablename: PART| PROD_QOH 1,214 PROD CODE PART_CODE AAAA PART_QOH АВCD 547 ВВBB 108 СССС 249 DDDD 89
Q: Write a relational mode for each of the case below. You can create our own attributes and provide…
A: The given are the requirements of how and what data is stored for a clinic which includes the…
Q: A software developer suggested to create (among others) a Product table for the second normal form…
A: -A table that has no transitive dependencies and is in the second normal form is said to be in the…
Q: Write a program that will accept a sequence of `insert’ and `delete’ operations in dynamic table and…
A: Write a program that will accept a sequence of "insert" and "delete" operations in dynamic table and…
Q: Implement the following ER model and sample data using Oracle SQL Developer and your CDM Oracle…
A: Below is the implementaiton of given ER model with CREATE statemetns: CREATE TABLE…
Q: This is a simple list table of a company trying to keep track of employee assignment to company…
A: Actually, database is a used to stores the data.
Q: Normalize the following table to 3NF. 4 PK StudentNo CourseID StudName | GradeReceived StudCity…
A: Dear Student, In 3NF form the table must not have any transitive dependency , all dependency must be…
Q: Print all the students by the name order desc by the gpa. Print all the computer sciences courses,…
A: As per our company guidelines, we are supposed to answer three subparts of a post and kindly…
Q: Print all the computer sciences courses, these courses with code start with ‘CS’ sorted…
A: As per our company guidelines, we are supposed to answer only three subparts of question and kindly…
Q: PART B Consider the college database you implemented in the image provided and answer the following…
A: Solution: 1.SQL statement that displays the data of the STUDENTS table SQL Query to create table1 :…
Q: Q1/ 1- Find the name and the department of employees who has salary between 22000 and 32000 and work…
A: Answer: we have given table and we need to write the SQL command to find their given some task. we…
Q: PLZ help with the following: IN SQL Let R (A, B, C) be a relation schema. What happens if we…
A: Relational schema refers to the meta-data that describes the structure of data within a…
Q: Write a PL/SQL Function that accepts 4 integers, 2 representing the homeTeamID and visitorTeamID,…
A: Required: Write a PL/SQL Function that accepts 4 integers, 2 representing the homeTeamID and…
Q: Consider the following structure of an inventory Oracle database. HUMERC (B) WOWR) VIMOHAR ( S DECL…
A: Neither not we have to select customers not from new york or grade value greater than 100 i.e less…
Q: The following three tables make up a simple reservation system for a small campground. The database…
A: ER Diagram: ER diagram is defined as the interconnection of entities and attributes how they are…
Q: What are aggregates?
A: GIVEN: What are aggregates?
Q: You are working with a database table that contains customer data. The table includes columns about…
A: SQL's LENGTH FunctionStructured Query Language's LENGTH string function returns the number of…
Q: Create a list that shows each department name, # of employees, maximum salary, minimum salary, total…
A: First EMP and DEPT tables have to join basing deptno in both. Then group them by using dname. Then…
Q: Consider the following sales relational database schema for sales. Item (ItemNo: integer,…
A: SELECT i.itemName, i.type FROM item i INNER JOIN Sales s ON…
Q: Below is a sample data for Parts and for Vendors who supply those parts. In discussing these data…
A: Actually, given information is: uniquely identify parts and that vendor names uniquely identify…
Q: In the spreadsheet model shown below, an analyst makes the following data entries. Cell B3 84 B5 B6…
A: Given: Required: Output in cell c3,c4,c5
Q: You are given the following database schema: Sailors(sid, sname, rating, age) Boats(bid, bname,…
A: Given Data : Number of pages in main memory = 9 Sailors : Tuples = 100000 pages = 1000 Sailors…
Q: In the picture is what the output is supposed to look like. I copied the dataset below. pls help…
A: I attached your answer below.
Q: For the following database scheme Employee(empNo fName,.IName.address.DOB.sex.position.deptNo)…
A: An SQL statement to list the project number, project name and the number of employees in the project…
Q: Your task for this assignment is to use SQL to implement the basic relational operations of…
A: 1. Answer: CREATE TABLE orders (orderID int, orderName varchar(255), status varchar(255));INSERT…
Q: 51. The given SQL statement is intended to either (1) list the customer numbers, customers names,…
A: Given SQL query: SELECT CUSTNUM, CUSTNAME, HQCITY FROM CUSTOMER WHERE HQCITY= 'Los Angeles' Given 2…
Q: Database name: Ch03_VendingCo Table name: BOOTH Table name: MACHINE BOOTH PRODUCT Chips BOOTH PRICE…
A: Operators in Relational Databases: The UNION operator is applied when all the rows of results of…
Q: Find one type-2 functional dependency in the grade table Table GRADE Student ID Student Name…
A: Functional DependencyA functional dependence occurs when two attributes have a relationship. Inside…
Q: Differentiate between functions that return a scalar, an aggregate, and a table
A: Programmers use the domain-specific language SQL to handle data stored in relational databases or…
Q: Given R ( A int, B int, C int ). Consider this select statement: Select R1.A, R1.B, R1.C from R R1…
A: The question is to find the values of A and B.
Q: Choose all of the correct superkeys.) Find all superkeys of the DEPARTMENT relation. Its primary key…
A: Super key means a set of one or more attributes which uniquely represents a tuple. Given primary key…
Q: Write a T-SQL query to select the store code, employee last name, and the computed age of the…
A: Given: Four relations like Employee, Job, Region, and Store including specific attributes Objective:…
Q: The Driver Relationship team wants to analyze drivers and their car usages in InstantRide for the…
A: Actally, database is used to stores the data.
Q: Input: The issuer table, with respective columns: Issuer Parent ESGRating, separated by Output: • If…
A: According to the information given:- We have to create to read the issuer table with respect to…
Q: You are working with a database table that contains customer data. The table includes columns about…
A: Introduction You are working with a database table that contains customer data. The table includes…
Q: The table below contains training data from an employee database. The data have been generalized.…
A: The answer is given below:-
Q: 1st Normal Form (1NF) Consider the Students table, with the primary key underlined, and the…
A: First Normal Form (1NF): => If a table includes a composite or multi-valued attribute, it…
Q: One of the junior database developers has encountered some errors in a query they are working on.…
A: For printing the information in the console for the given PL/SQL code we need to set the server…
Q: The aim of assignment 1 is to implement a database schema and execute different types of SQL queries…
A: Note: In your schema, many table contain multiple primary key which is not possible in SQL database…
Q: A table called "game1" contains three columns and twenty rows, but "game2 has the same column as…
A: Tip It is a list of data linked together and stored in a database in the form of a table.As in…
Q: Consider an employee database with two relationsemployee (employee_name, street, city)works…
A: “avg_salary()” function: A company name is passed as an argument to the function “avg_salary()”.…
Q: Consider an employee database with two relationsemployee (employee name, street, city)works…
A: A single value is returned by an aggregate function, which executes a calculation on a collection of…
Q: ou are working with a database table that contains customer data. The table includes columns about…
A: We need to write a SQL query for the given scenario.
Q: The following three tables make up a simple reservation system for a small campground. The database…
A: A primary key is a key whichever uniquely identifies. Foreign key is column or group of columns that…
Q: Consider the following Grades table and express in Relational Algebra each of the questions below:…
A: Required:
Q: Question 3 refers to two data tables giving the details of a company's employees and company's job…
A: Required:
Q: A table called "game1" contains three columns and twenty rows, but "game2" has the same column as…
A: A table is a collection of related data recorded in a table format in a database. In relational and…
Q: Consider the tables given below and write the relational Algebra for the following tasks Table Name:…
A: As perpolicy only first three parts are answered. Repost question if you need help with other parts…
Q: Given the following relation: Student (StudentID, studentName, StudentAddress, MobileNumber) Write a…
A: The %ROWTYPE attribute provides a record type,which can hold a list of the table(or view) of same…
Q: 5. Now compute Average GPA in each class. Display class_code, Class_GPA. Assume all courses are 3…
A: Now compute Average GPA in each class. Display class_code, Class_GPA. Assume all courses are 3…
Write the complete transaction(s) in SQL (this is different from #1 how?)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
- calculate_new_balance Given a starting balance (a number), and a list of transaction tuples, calculate the final balance for an account. Transaction tuples are of the shape ("description", amount, "withdrawal") , or ("description", amount, "deposit"). The last entry in the tuple will be either "withdrawal" or "deposit". Every withdrawal decreases the balance of the account by the specified amount, and every deposit increases the balance. The return value is the new account balance, as a number. (which could be negative) Sample calls should look like: >>> calculate_new_balance(100, [("payday", 20, "deposit"), ("new shoes", 50, "withdrawal"), ("illicit winnings", 200, "deposit")])270>>> calculate_new_balance(100, [])100A real Estate Company has in its poššession a long list of landlords and the rent cost of their two bedroom apartments, as shown on table 1. There is the need for an Application program that will allow a user at the company to load the said list into a computer program, i.e. the list of landlords and the cost of rent. The app must also allow users to search for apartments they can afford. Apart from the list in the table, the App should be able to take as input the maximum amount a tenant is willing to spend on a two-bedroom apartment and then display a list of landlords whose apartments can be rented with that amount. Table 1: Landlords and Cost of rent Landlord Ama Dua Ali Dulon John Togbe Abena Nyame Kofi Duku Cost of rent (GHC) 800.00 950.00 2,500.00 600.00 2,300.00Assume that a database has a table named Stock, with the following columns:Column Name TypeTrading_Symbol nchar(10)Company_Name nchar(25)Num_Shares intPurchase_Price moneySelling_Price money Write a Select statement that returns the Trading_Symbol column and the Num_Shares column only from the rows where Selling_Price is greater than Purchase_Price and Num_Shares is greater than 100. The results should be sorted by the Num_Shares column in ascending order.
- DataBase; You are required to develop a simple database application for a small recruiting firm that wishes to keep track of all the employees at the firm; storing details about their name, phone numbers, hiredate, Gender, Date of Birth, Salary, and Commission. The firm has many departments and there are 5 to 20 employees in each department. The department information includes department name, description and total number of employees in that department. The company also provides vehicles for some of its employees. An employee maybe allocated one car. To ensure timely maintenance of vehicle, the company would like to store the following details of the vehicle: make, model, next_maintenance_date. Each employee has a position (manager, accountant, administrator, clerk, HR employee, etc.). Various allowances are allocated to each position. For example, the managers have fuel allowance, house allowance, social allowance and managers allowance. On the other hand, the administrators have…In Senior Project Website, the user requests the website to search for previous senior projects, the website displays the search web form, the user inputs the keywords to be used for the search process, the user submits the search criteria to the website, and the website requests a remote database to search for senior projects that fulfill the requested criteria (keywords). The remote database returns back a Boolean value (indicating if the search is successful or not) and a list of found senior projects (the list is empty if not successful), If the search is successful, the website displays the list of received senior projects, else, the website displays error dialog box indicating that no projects were found. Q2. For Senior Project Website System described above, students are required to conduct the following task: a) Design the Sequence Diagram of Senior Project Website System described above.Holiday Travel Vehicles sells new recreational vehicles and travel trailers. When new vehicles arrive at Holiday Travel Vehicles, a new vehicle record is created. Included in the new vehicle record are a vehicle serial number, name, model, year, manufacturer, and base cost. When a customer arrives at Holiday Travel Vehicles, he or she works with a salesperson to negotiate a vehicle purchase. When a purchase has been agreed upon, a sales invoice is completed by the salesperson. The invoice summarizes the purchase, including full customer information, information on the trade-in vehicle (if any), the trade-in allowance, and information on the purchased vehicle. If the customer requests dealer-installed options, they are listed on the invoice as well. Th e invoice also summarizes the final negotiated price, plus any applicable taxes and license fees. The transaction concludes with a customer signature on the sales invoice. Identify the classes described in the preceding scenario (you…
- Access Assignment Problem: JMS TechWizards is a local company that provides technical services to several small businesses in the area. The company currently keeps its technicians and clients’ records on papers. The manager requests you to create a database to store the technician and clients’ information. The following table contains the clients’ information. Client Number Client Name Street City State Postal Code Telephone Number Billed Paid Technician Number AM53 Ashton-Mills 216 Rivard Anderson TX 78077 512-555-4070 $315.50 $255.00 22 AR76 The Artshop 722 Fisher Liberty Corner TX 78080 254-555-0200 $535.00 $565.00 23 BE29 Bert's Supply 5752 Maumee Liberty Corner TX 78080 254-555-2024 $229.50 $0.00 23 DE76 D & E Grocery 464 Linnell Anderson TX 78077 512-555-6050 $485.70…Computer engineering question Write in APEX - Anonymous window Please design an Aggregate query over the Opportunity Records by grouping the Compaign Id and the avg amount. Loop over the fetched records and display the recordsEXPERIMENTAL PROCEDURE Patients visit the hospital and their visit history is maintained by the hospital staff. Different physicians may be available on different dates. They diagnose and treat the patients of all categories. Some of treatments are free while others are to be paid by the patients. Sample data of the case is shown in the following chart. Patient History Report PatientID Name Address Visit Date Physician Diagnosis Treatment P-100809 A City: X 12-02-2007 20-02-2007 29-02-2007 15-03-2007 Dr. Z Dr. F Dr. R Dr. L Chest Infection Cold Hepatitis-A Eyes Infection Free Free Paid Paid P-200145 N City: Y 10-01-2007 15-02-2007 25-03-2007 Dr. L Dr. K Dr. A Bone Fracture Cough Flu Paid Free Free Task 1 Draw a dependency diagram and transform the above data to first normal form by eliminating repeating groups such that each row in the relation is atomic. Be sure to create an appropriate name for the…
- The database has three tables for tracking horse-riding lessons: Horse with columns: ID - primary key RegisteredName Breed Height BirthDate Student with columns: ID - primary key FirstName LastName Street City State Zip Phone EmailAddress LessonSchedule with columns: HorseID - partial primary key, foreign key references Horse(ID) StudentID - foreign key references Student(ID) LessonDateTime - partial primary key Write a SELECT statement to create a lesson schedule with the lesson date/time, horse ID, and the student's first and last names. Order the results in ascending order by lesson date/time, then by horse ID. Unassigned lesson times (student ID is NULL) should not appear in the schedule. Hint: Perform a join on the Student and LessonSchedule tables, matching the student IDsThe database has three tables for tracking horse-riding lessons: Horse with columns: ID - primary key RegisteredName Breed Height BirthDate Student with columns: ID - primary key FirstName LastName Street City State Zip Phone EmailAddress LessonSchedule with columns: HorseID - partial primary key, foreign key references Horse(ID) StudentID - foreign key references Student(ID) LessonDateTime - partial primary key Write a SELECT statement to create a lesson schedule with the lesson date/time, horse ID, and the student's first and last names. Order the results in ascending order by lesson date/time, then by horse ID. Unassigned lesson times (student ID is NULL) should not appear in the schedule.The Music Database The music database stores details of a personal music library, and could be used to manage your MP3, CD, or vinyl collection. Because this database is for a personal collection, it’s relatively simple and stores only the relationships between artists, albums, and tracks. The following is a list of requirements: i) The collection consists of albums; ii) An album is made by exactly one artist. There must be an artist and album; iii) An artist makes one or more albums (identifying relations); iv) An album contains one or more tracks; v) Artists, albums, and tracks each have a name; vi) Each track is on exactly one album. Vii) Each track has a time length, measured in seconds. The track may or may not be played and can be played as many times as required (non-identifying relations). When a track is played, the date and time the playback began (to the nearest second) should be recorded; this is used for reporting when a track was last played, as well as the number of…