Concept explainers
Explanation of Solution
Name of spreadsheet: COMPANY
Column names:
Name | IndustryCode | Gross Sales | OfficerName | OfficerTitle |
The above spreadsheet contains Name, IndustryCode, Gross Sales, OfficerName, and OfficerTitle.
Divide the columns into tables with single theme:
Industry details:
Industry_id | Name | IndustryCode |
1 | SUN | 352-765 |
2 | Anime | 654-123 |
Officer details:
Officer_id | OfficerName | OfficerTitle |
1 | Ram Kumar | ceo |
2 | Rajesh | Project Head |
Sales details:
Industry_id | Officer_id | Gross Sales |
1 | 1 | 23000000 |
2 | 2 | 45000000 |
1 | 2 | 50000000 |
- Number of themes: Three
- Name of the theme: Industry details, officer details, and Sales
Assumptions:
In the above spreadsheet, there are three themes. One of the themes is about industry which is specified through the heading of Name and IndustryCode. The other theme is about officer who is specified through the heading of OfficerName and OfficerTitle. The final theme is about sales which are specified through the heading of Gross Sales.
- Industry – It contains Industry_id, Name and IndustryCode attributes. The Industry_id is the primary key of the Industry table.
- Officer – It contains Officer_id, OfficerName, and OfficerTitle attributes. The Officer_id is the primary key of the Officer table.
- Sales – It contains Industry_id, Officer_id, and Gross Sales attributes.
Name of spreadsheet: COMPANY
Column names:
Name | IndustryCode | Gross Sales | NameOfOwner |
The above spreadsheet contains Name, IndustryCode, Gross Sales and NameOfOwner.
Divide the columns into tables with single theme:
Industry details:
Industry_id | Name | IndustryCode | NameOfOwner |
1 | SUN | 352-765 | XXX |
2 | Anime | 654-123 | YYY |
Sales:
Industry_id | Gross Sales |
1 | 23000000 |
2 | 45000000 |
1 | 50000000 |
- Number of themes: Three
- Name of the theme: Industry details and Sales
Assumptions:
In the above spreadsheet, there are three themes. One theme is about industry which is specified through the heading of Name and IndustryCode. The other theme is about president which is specified through the heading of NameOfPresident. The final theme is about a sale which is specified with the heading of Gross Sales.
- Industry – It contains Industry_id, Name, IndustryCode, and NameOfOwner attributes. The Industry_id is the primary key of the Industry table.
- Sales – It contains Industry_id, and Gross Sales attributes.
Name of spreadsheet: COMPUTER
Column names:
SerialNumber | Make | Model | DiskType | DiskCapacity |
The above spreadsheet contains SerialNumber, Make, Model, DiskType and DiskCapacity...
Want to see the full answer?
Check out a sample textbook solutionChapter 1 Solutions
Database Concepts (8th Edition)
- Using the getFirst() function as a template for reference, code the saveProduct() function that will be called when the save button of the depicted screen is clicked. The text from the JTextFields will be used as parameters.The database schema for the SQL tables are also depicted. The number of the product is the primary key and is set to auto-increment. public Product getFirst() { if (openConnection()) { try{ Product temp = null; String query = "SELECT * FROM products order by number asc limit 1"; // our SQL SELECT query. Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY); // create the java statement ResultSet rs = st.executeQuery(query);// execute the query, and get a java resultset while (rs.next()) // iterate through the java resultset { temp = new…arrow_forwardCreate an MVC web application having the index view given below. The given view will be populated from the model book having data members (Id, Title). Write only the code for the model class with the action SubmitImg() to submit the data in the database table book(id, title). Use suitable data annotations attributes to perform empty field validation also. No need to write view code.arrow_forwardWhen working with a relational database, a select operation may be used to reduce the amount of space used by a table by removing columns that meet certain requirements.Is this the right answer or the wrong answer?arrow_forward
- Computer Science At UFL, each class is a specific offering of a course (subject). Each row in the Courses table contains information on a single course or subject taught a UFL and each row in the Classes table contains information on a single offering of a course during a specific term. Investigate the two tables, and then write a query that returns the CourseTitle, ClassID, Term, SectionID and FacultyID for classes taught by FacultyID 5000009. SOLUTION:arrow_forwardUsing the Henry Books database, add the new title from Stephen King to the wrote table: Book code = 3578 Author number = 6 Edition = 1 You will insert 2 snips for this question. What construct did you use to add a row to the wrote table. Insert the snip of the construct used: Insert the snip of the wrote table. Be sure the new row is displayed:arrow_forwardMySQL CREATE TABLE students ( id INT PRIMARY KEY, first_name VARCHAR(50), last_name VARCHAR(50), age INT, major VARCHAR(50), faculty VARCHAR(50)); CREATE TABLE location ( id INT PRIMARY KEY, name VARCHAR(50), rooms INT); CREATE TABLE faculty ( id INT PRIMARY KEY, name VARCHAR(50), department_id INT); 4. Find the number of employees in each department who get no commission or have salary less than5000.5. Find the maximum salary of employees in each department that the employee was hired 15 yearsbefore now. *hint: user TIMESTAMPDIFF(<unit type>,<Date_value 1>,<Date_value 2>), the unitcan be YEAR, MONTH, DAY, HOUR, etc...6. Find the last name of all employees that were not hired on Tuesday *hint: (UseDATE_FORMAT() function amd the format you need is %W, also use UPPER()7. Find the number of employees in each department who have a manager.8. Find the number of employees for each manager whose employees' minimum salary is greaterthan 5000.9. Find the number of…arrow_forward
- Given the tables create table T (A int primary key, B int); create table U (C int primary key, A int, foreign key(A) references T(A) ); Table T contains 100 rows and table U contains 200 rows. A common mistake made by students is to do a join and assuming the database will supply the join predicate. A student does the query SELECT T.A, T.B, U.C FROM T, U; The student does not get an error message but gets a large result set. How many rows are in the result set?arrow_forwardCreate an MVC web application having the index view given below. Given view will be populated from the model book having data members (Id, Title). Write only the code for the model class with the action Submitlmg() to submit the data in database table book(id, title). Use suitable data annotations attributes to perform empty field validation also. No need to write view code. Book Form Book Id Book Title Savearrow_forwardExplain Non-Equi Join with an example?arrow_forward
- vvnbarrow_forwardThere are three tables in this database (see image). Write MYSQL code for: (1) Create a trigger “insert_inventory” on table “Inventory”. The trigger is fired after a row is inserted in table “Inventory”. After a row is inserted in table “inventory”, the “itemid”, the insertion time, and the action is inserted in table “Inventory_history”. The action is set to ‘add an item’. The oldprice is set to null. Test your trigger by inserting a row into Inventory and displaying the contents of Inventory_history. (2) Create a trigger “change_quantity” on table “Transaction”. The trigger is fired after a row is inserted in table “Transaction”. After a row is inserted in table “Transaction”, update the “quantity” in table “Inventory”. For example, if 3 iWatch are sold, then the quantity of iWatch in table “Inventory” is decreased by 3. Test your trigger by inserting a row into Transaction and displaying the contents of the relevant row in Inventory. (3) Create a trigger “change_price” on table…arrow_forwardGenerate the table creation DDL for the schema. Consider the keysprimary and foreign.arrow_forward
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage