Questions
Metal Holdings Inc. You have been assigned the task of creating a simple relational database using...

Metal Holdings Inc.

You have been assigned the task of creating a simple relational database using SQLite database by the owner of “Metal Holdings” who is in the business of selling industrial metals to customers (mostly wholesale suppliers) who buy from the company.

Your goal is to design and build a database that would be responsible for:

  • Managing a product table containing all metals which at a minimum should provide information such as name, description and price of each metal sold by the company.
  • Manage a list of customers who would be purchasing metals from the company. The owner is interested in name, location, contact as well as whether the customer is a retail or wholesale buyer.
  • Manage and maintain a complete inventory of all orders shipped by the company to customers.
  • The owner wants to maintain the following information about each order at a minimum, but not limited to:
    • Date of the OrderShipping information such as date and status.
    • Product purchased and Quantity ordered.
    • Customer Information.
    • Each customer can purchase 1-to-many products (metals) in a single order.

The following is a list of metals sold by the company (these below metals should be available in your uploaded SQLite database):

  • Copper
  • Aluminium
  • Silver
  • Steel
  • Bronze
  • Brass
  • Lead
  • Nickel
  • Titanium
  • Magnesium

In: Computer Science

(C++) Write a program to read from a grade database (data.txt). The database (text file) has...

(C++) Write a program to read from a grade database (data.txt). The database (text file) has students names, and grades for 10 quizzes.Use the given function prototypes to write the functions. Have main call your functions. The arrays should be declared in main() and passed to the functions as parameters. This is an exercise in parallel arrays, int and char 2 dim arrays.

Function prototypes:

  1. int readData(ifstream &iFile, int scores[][10], char names[][30]);
    This functions takes the file stream parameter inFile by reference, after the file is open. It reads from the text file into the names array and the scores array. It essentially populates the array with data from the file and returns an int which is the count of the number of items in the array.

  2. void findLowestEach(int scores[][10], char names[][30], int size);

    This function takes the 2 parallel arrays and an int size and prints each students’ names

    and lowest score on separate lines.

  3. void findHighestEach(int scores[][10], char names[][30], int size);

    This function takes the 2 parallel arrays and an int size and prints each students’ names

    and highest score on separate lines.

  4. void calcAverage(int scores[][10], char names[][30], int size); This functions take the 2 parallel arrays and an int size, and calculates the average score of each students and puts it in a new array called average[]. The average array can be a local variable double average[CAP]; Print the students name and average at the end of this function.

  5. int main()​should declare two 2-dim arrays, one for students names, ​char names[CAP][30];​ and ​int scores[CAP][NUM_GRADES];​ ​CAP ​is an ​int constant = 100, and ​NUM_GRADES​ is an ​int ​constant = 10. You should also declare a file stream variable ​inFile ​and open the file. Then, main should call ​readData​, and load the data from the text file. Then main should call ​findLowestEach​(.....), and then

findHighestEach​(.........), and print the values. Then main should call calcAverage​(...) and print the students’ names and their average.

data.txt

Bob 56 67 83 76 84 94 68 86 78 56
John 76 89 95 64 78 34 99 89 104 98
Joe 65 68 89 78 45 69 98 101 99 89
Amy 86 77 89 76 94 54 78 89 78 66
Nick 76 69 95 94 78 64 99 89 110 88
Alex 95 88 89 78 95 69 88 101 99 89
Marga 96 67 89 76 64 94 98 83 78 56
Mike 76 89 95 64 78 34 99 89 104 98
Bella 85 68 89 78 45 69 98 101 99 89
Priya 86 77 89 76 94 94 78 89 78 96
Karen 78 69 95 94 78 94 99 89 110 88
Amit 95 88 79 78 95 89 88 101 99 89

Please see sample output on the next page. Sample Output:

Here is the grade database:
Name 1 2 3 4 5 6 7 8 9 10 Bob 56 67 83 76 84 94 68 86 78 56 John 76 89 95 64 78 34 99 89 104 98 Joe 65 68 89 78 45 69 98 101 99 89 ....
....
....
....
Bob’s highest grade is: 94
Bob’s lowest grade is: 56
John’s highest grade is: 104
....
....

The average of their grades is as below: Bob 74.8
John 82.6
....

....

Please help.

Thank you.

In: Computer Science

Database You have just started a new position on the database design staff at Gizmonic Consultants,...

Database

You have just started a new position on the database design staff at Gizmonic Consultants, Inc.

Your first project is to translate the database requirements for Continental Hotels into an ER representation. In the next project, you will derive a relational schema from an ER diagram and implement the schema, populate it, and query over it.

Requirements:

Develop an ERD to capture the entities and relationships specified in the requirements documentation below. Use only the conventions covered in class.

  1. Show keys [partial keys] for each entity [weak entity].
  2. Give cardinality (1:1, 1:m, m:n) and participation constraints (partial, total) for each binary relationship.
  3. Your whole ERD should not be more than one page in length, although you can show complete attributes in a separate diagram and just keys/partial keys on the main diagram.
  4. You should have at least 4 entities and you may have quite a few relationships between them.
  5. Keep a list of assumptions that represent any modeling decisions you have to make.
    • Your assumptions should not contradict any information given in the requirements, and you should strive to make as few additional assumptions as possible.
    • Anything you model that is not explicitly stated in the requirements should be stated in your assumptions.

Phase 2

  1. Submit one well-formed, consensus ER diagram using Dia with the ER sheet that satisfies the requirements
  2. A list of your design decisions (any additional assumptions beyond what is given explicitly in the problem). Organize your assumptions in 3 categories:
    1. related to primary keys,
    2. related to cardinality/participation constraints for relationships, and
    3. miscellaneous (anything else).
  3. Translation of the team ERD into RDB tables using the algorithm and conventions

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Continental Hotels Requirements

  • General Description

Continental Hotels is a chain of hotels that operates in several cities. There are currently 10 locations, and each hotel has about 100 guest rooms. The rooms are normally 80% occupied, with an average length of stay of three days. The hotels are frequented by both business travelers and vacationers. The chain is expanding to additional locations. The current guestroom reservation system is slow and unreliable and a new system is needed to handle reservations and associated guest billing.

  • Basic Operations

Guests normally use the chain’s website to make a room reservation, supplying the dates requested, the number of guests, the number of rooms needed, and the area desired. The site shows the locations that have availability for the dates requested that are in the desired area. The user then chooses a location and a summary of the available rooms for that site is displayed, showing a brief description of the room type and the standard rate for each available room. Locations have unique names like “Columbus Downtown” and “Cincinnati North.”

The user can see a more detailed description of each room by clicking on a button. The user has the option to request a special rate due to membership in a group, military status, or age. The list of available rooms and their cost is updated to reflect the discounted price, if any. The chain also offers a rewards program for frequent guests. The website allows the user to enter or retrieve his or her membership number and password, and the site displays the number of rewards points the user has accumulated.

Whether the user belongs to the rewards program or not, he or she can reserve up to three rooms, and must choose a room type and accept the cost for each one from the list displayed, as well as entering the number of the proposed occupants and any special requests for each room, from a menu of special requests. The customer provides a credit card number to guarantee the reservation, and may choose to use some or all of his or her rewards points, if any, towards the cost of the rooms.

At the conclusion of the process, a confirmation number is assigned for the reservation. If a customer prefers, this same process can be done by telephone or even by mail.

A customer can cancel a reservation up to the day before he or she is due to check in with no penalty. If the customer does not cancel and is a no-show, the room cost(s) for one day will be charged to the credit card account provided in the reservation. A fictitious room number (-1) is used for this purpose. In addition to reservations, the hotel can accommodate walk-in guests, provided there are rooms available. In that case the customer information is taken, and a reservation is made for the same day for the period desired. Guests can also extend their stays past the reserved date, provided there are rooms available. The ending date of the current reservation is updated accordingly.

When a guest checks in with or without a reservation, guest IDs are checked, rooms are assigned, and an imprint of the credit card that will be used for billing is taken. If separate bills are requested for rooms at check-in, additional credit card imprints are taken, and basic information about the credit card holder, who is now considered the customer holding a reservation for that room, is taken. Miscellaneous charges for such items as room service, meals in the hotel restaurants or coffee shop, movie rentals, and telephone calls, as well as the basic room charges, will be billed to the credit card account for each associated room. Guests can access their room account information to see a summary of the charges for each room each day. At the end of the stay, guests are requested to fill out an evaluation form for each room, either on paper or online.

  • Information Needs

Some of the reports that the system should be able to produce include the following, for each of the hotels in the chain:

Guest Bill – This should include, for each room:

Invoice number, room number, guest name, guest address, guest telephone, credit card number, number of persons. For each day of the stay, it should show the date, room charge, room tax, and a list of additional charges - room service charges (date, time, amount), hotel restaurant charges (restaurant name, date, time, amount), telephone charges (date, number called, length, cost) and any other items. At the end of the bill, the total charges, any discount for rewards points, and the total paid or charged to the credit card are given. If additional charges are found once the guest has checked out, a revised bill is prepared and sent to the guest.

Weekly Room Utilization Report – This report is normally produced at the end of each week, showing the utilization of rooms during the week. Note that some of the hotel’s guest rooms may not be available for rental because of damages, renovations, or other reasons. For each day, the report shows date, number of rooms available to be rented, number occupied, number unoccupied, number of rooms reserved, number of no-shows, number of walk-ins.

At the bottom of the report, the totals of each of these numbers for the week is shown.

Housekeeping Daily Room Requests Report – A report is created daily showing any special requests for guests who are checking in that day or who are already registered that must be filled by the housekeeping staff, such as extra pillows, rollaway beds, and so forth.

Daily Checkout Report - The report lists the rooms that will be vacated that day so that the housekeeping staff can prepare them for new guests after current guests depart.

  • Query Checklist

□ List all the hotels (names) in the Cincinnati area.

□ List all the areas that do not have a hotel with a room with the type “queen size, handicapped accessible.”

□   List names of guests who watched the movie “Buckaroo Banzai” at any hotel.

□   List names of guests who were charged for a no-show reservation and who have a rewards membership.

□   List the sum of all miscellaneous charges by guest name and room number at the “Downtown Columbus” hotel in June 2019.

In: Computer Science

[Q.4] Answer the following questions You are invited as a database architect to develop database schema...

[Q.4] Answer the following questions

You are invited as a database architect to develop database schema for maintaining patient information for the NYU medical group (make necessary assumptions for the data requirements if needed).

  • Each physician in the Lehman medical group is uniquely identified by physicianID o Each physician must have first name, and last name, and phone number

  • Each patient is identified by patientID
    o Each patient must have first name, and last name, phone number, and insurance card number (if the patient has)

  • Each patient gets a treatment from a physician.

    o Each treatment is identified by a unique treatementCode

    o Each treatment is described by a simple description

  • Patients, Physicians, and Treatments are associated by a patientTreatement relationship type. The relationship type has two attributes to record date and time of the patient visit and patient co-payment (or minimum payment if the patient does not have medical insurance)

  • (a) Design a conceptual schema using ER diagram for storing and managing the data as explained above.

  • (b) Derive the logical database schema from the conceptual schema you designed.

In: Computer Science

Explain the relationship between inflation and real income. (Use literature from journals, articles and textbooks for...

Explain the relationship between inflation and real income. (Use literature from journals, articles and textbooks for analysis on relationship between inflation and real income with APA style citation.im not able to find a proper reference and citations

In: Economics

How energy is transformed in animal and plant cells for use in cellular activities (use the...

How energy is transformed in animal and plant cells for use in cellular activities (use the following keywords, food, light, NADH, FADH2, NADPH, electron transport chain, ATP Synthase and ATP)

at least 2 citations

In: Biology

describe the characteristics of performance-driven team. Describe the difference between intrinsic and extrinsic motivation and explain...

describe the characteristics of performance-driven team. Describe the difference between intrinsic and extrinsic motivation and explain why it is important in unnderstanding the types of motivation when it comes to team performance.

please include citations and references used.

In: Nursing

Describe an issue a city would face (infrastructure, budgeting, self-driving cars). Discuss alternative solutions to that...

Describe an issue a city would face (infrastructure, budgeting, self-driving cars). Discuss alternative solutions to that issue. Discuss why you believe the alternatives would be best for the problem. Include citations for your solutions.

In: Economics

Please answer the question given below in 300 to 500 words and in paragraph form. In...

Please answer the question given below in 300 to 500 words and in paragraph form. In addition, please use citations from the eText and or from other credible sources and/or websites.

Discuss social identity as a threat to security.

In: Psychology

Using APA guidelines with in-text citations/references. Write an introduction paper one paragraph long with a minimum...

Using APA guidelines with in-text citations/references. Write an introduction paper one paragraph long with a minimum of 10 or more sentences. This is for an essay at the end of the class, of your choosing and i will pick up from here.

In: Accounting