Write a Java program (use JDBC to connect to the database) that implements the following function (written in pseudo code): (20 points) CALL RECURSION ( GIVENP# ) ; RECURSION: PROC ( UPPER_P# ) RECURSIVE ; DCL UPPER_P# ... ; DCL LOWER_P# ... INITIAL ( ' ' ) ; EXEC SQL DECLARE C CURSOR FOR SELECT MINOR_P# FROM PART_STRUCTURE WHERE MAJOR_P# = :UPPER_P# AND MINOR_P# > :LOWER_P# ORDER BY MINOR_P# ; print UPPER_P# ; DO "forever" ; EXEC SQL OPEN C ; EXEC SQL FETCH C INTO :LOWER_P# ; EXEC SQL CLOSE C ; IF no "lower P#" retrieved THEN RETURN ; END IF ; IF "lower P#" retrieved THEN CALL RECURSION ( LOWER_P# ) ; END IF ; END DO ; END PROC ; Given the value of the input parameter ‘P1’, it should print out the following sequence (in the exact same order) for the table in Q1: P1 P2 P3 P5 P6 P4 P5 P6 P3 P5 P6
In: Computer Science
Case Study 4
A relational database is to be designed for a medium sized Company dealing with industrial applications of computers. The Company delivers various products to its customers ranging from a single application program through to complete installation of hardware with customized software. The Company employs various experts, consultants and supporting staff. All personnel are employed on long‐ term basis, i.e. there is no short‐term or temporary staff. Although the Company is somehow structured for administrative purposes (that is, it is divided into departments headed by department managers) all projects are carried out in an inter‐disciplinary way. For each project a project team is selected, grouping employees from different departments, and a Project Manager (also an employee of the Company) is appointed who is entirely and exclusively responsible for the control of the project, quite independently of the Company's hierarchy.
Description: The following is a brief statement of some facts and policies adopted by the Company.
• Each employee works in some department.
• An employee may possess several skills
• Every manager (including the MD) is an employee
• A department may participate in none/one/many projects.
• At least one department participates in a project.
• An employee may be engaged in none/one/many projects
• Project teams consist of at least one member.
In: Computer Science
A publisher needs to create a database based on the following requirements:
The publisher publishes different books. Each book has an ISBN, name, author(s) name, edition number, category, and price. Each book has a unique ISBN.
The publisher deal with many authors, each has a name, unique number.
For every book, each author will have different percentage of revenue.
They also hire editors, who edit books before publishing. Each has name, unique number, SSN, salary, book category and list of books they edited.
Draw a complete ER diagram. Write the (min,max), total/partial and the cardinality ratio.
In: Computer Science
Here is listing of the tables for the database for this assignment.
SELLERS(SellerNum, SellerLastName, SellerFirstName, SellerStreet, SellerCity, SellerState, SellerZip, CRate)
BUYERS(BuyerNum, BuyerLastName, BuyerFirstName, BuyerStreet, BuyerCity, BuyerState, BuyerZip, BonusLevel, SellerNum)
PRODUCTS(ProductNum, Description, NumberInStock)
STATEMENT(StatementNum, StatementDate, BuyerNum)
STATEMENTLINE(StatementNum, ProductNum, Quantity, ItemPrice)
Using the above database’s tables, respond to the following questions:
Note: The id numbers for each table should be a numeric (integer) value, the commission rate (Crate) and the ItemPer (individual quoted price per item) should be numeric with 2 decimal places, and the quantity (quantity of the products ordered) and NumberInStock (number of items in stock) should be numeric (integer) values. Additionally, the states should use the common 2 character state abbreviation and the statement date should be a date value. All other values are character values.
In: Computer Science
In: Computer Science
1. For each of the following, write a single SELECT query against the TSQLV4 database that returns the result set described. Each of these queries involves two tables and can be written using a join operation.
a. One row for each order shipped to France or Germany, showing the order ID, the last name of the employee for the order, and the customer ID for the order.
b. One row for each employee who handled orders to Belgium, showing the employee’s initials (for example, for an employee named Yael Peled, this would be YP) and the number of orders that employee handled that were shipped to Belgium.
c. Same as part b., but include a row for every employee in the HR.Employees table, even if they did not handle any orders shipped to Belgium. (The number of orders for such an employee should be 0.)
In: Computer Science
You are to design a database for the upcoming Greater Wisconsin River Fishing Contest. Consider the following functional dependencies;
Please note the following;
Create an ERD in 3NF for these relations. Create appropriate table names for the ERD. Include all applicable fields based on information you have been given and underline the Primary or Composite Primary Key fields. Make sure to include the correct ERD diagram symbols between tables to show the proper relationship type (e.g. 1:1, 1:M, etc.)
In: Computer Science
Web Programming Task + Database sql
In: Computer Science
JAVA FILE PROGRAM
Write a contacts database program that presents the user with a menu that allows the user to select between the following options:
If the user selects the first option, the user is prompted to
enter a person's name and phone number which will get saved at the
end of a file named contacts.txt.
If the user selects the second option, the program prompts the user
asking for the name of the contact. It then searches the
contacts.txt for a matching name. If found, it displays the phone
number on the screen. If not found, it will display an appropriate
error message.
If the user selects the third option, the program displays all
contacts stored in contacts.txt in a neat table.
The program is menu driven and will repeat presenting the menu and
processing choices until the user selects the fourth option to
quit.
If the user selects an invalid option, an appropriate error message
should be displayed.
If the user selects to print all contacts to the screen with no
stored contacts, an appropriate error message should be
displayed.
You may use message dialogs or make it a purely console-based application
In: Computer Science
Question #1
Data Modelling is the primary step in the process of database design. Compare and contrast Conceptual data model versus Physical data model. Illustrates with help of example to list down data (entities), relationship among data and constraints on data.
Question #2
What strategic competitive benefits do you see in a company’s use of extranets?
Question #3
Explain how Internet technologies are involved in developing a process in one of the functions of the business? Give an example and evaluate its business value.
Question #4
What are the basic differences between HRM, Intranet and Internet in terms of Domain and Network Communication Scope?
All information are written. there is no more information.
In: Computer Science