Question

Given tables math_majors create a view called math_view consisting of all of the data in math_majors...

  1. Given tables math_majors create a view called math_view consisting of all of the data in math_majors PLUS a column called sci_ratio which is computed as sci credits/math credits.
  2. Given table sci_majors create a view called sci_view consisting of all of the data in sci_majors PLUS a column called math_ratio which is computed as math credits/sci credits.

Homework Answers

Answer #1

Making the following assumptions, since schema is not provided:

- math_majors table has columns named math_credits and sci_credits

- sci_majors has columns named math_credits and sci_credits

If these assumptions are not valid, please share further details via comments so answers can be fine-tuned if necessary. Here are the views:

CREATE VIEW math_view AS

SELECT *, sci_credits / math_credits AS sci_ratio FROM math_majors

CREATE VIEW sci_view AS

SELECT *, math_credits / sci_credits AS math_ratio FROM sci_majors

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
3. Create a view named NumberOfBedrooms using the Bdrms column and a count of all condos...
3. Create a view named NumberOfBedrooms using the Bdrms column and a count of all condos of each bedroom size. Display the data in the view.
Create a database and design an ER diagram. Link the related tables then implement the design...
Create a database and design an ER diagram. Link the related tables then implement the design using MySQL. Insert at least 5 records. Ensure that the data to be added are related to other tables. Follow this format in creating the database and table: Database format: databasename_yourname Table format: tablename_yourname Post the screenshot of the following: ER Diagram with attributes, PK, and FK. "describe" command to view the structure of the tables. "select" command to view the contents of the...
Created the database and all the tables in phpMyadmin. In addition, write all the sql statements...
Created the database and all the tables in phpMyadmin. In addition, write all the sql statements used in perforing the tasks in a word document and submit that for grading. Lab 1: CREATE STATEMENT This statement is used to create a database or a table. CREATE DATABASE This statement is used to create a database Syntax: CREATE DATABASE database_name; OR CREATE SCHEMA database_name; Example: CREATE DATABASE Nyumbani; OR CREATE SCHEMA Nyumbani ; CREATE TABLE This SQL statement is used to...
1. What are three uses for a view? 2. Create a table named COPY_customers from the...
1. What are three uses for a view? 2. Create a table named COPY_customers from the customers table. 3. Use the CREATE or REPLACE option to create a view of all the columns in the COPY_customers table called view_ customers. 4. Use view_ customers to INSERT a row of data into the underlying COPY_customers table. Execute a SELECT * from COPY_customers to verify your DML command. 5. Show the contents of the view_ customers view. 6. Write the statement to...
Which of the following is NOT a Data-oriented view in Access? Datasheet View Form View Report...
Which of the following is NOT a Data-oriented view in Access? Datasheet View Form View Report View Ocean View What is the current file extension for Access database files? .accdb .docx .access .pptx Which tab in the ribbon is where we make new objects in the database? File tab Home tab Create tab External Data In the navigation pane, which of the following is NOT an object type? Tables Home Queries Forms
create an excel macro to combine at least 16 tables in the same workbook with the...
create an excel macro to combine at least 16 tables in the same workbook with the same column headings to form one master table. There are other worksheets in the workbook, but not all of the sheets will be copied to the master.
Which of the following is true about Excel tables? They are created from rectangular data ranges....
Which of the following is true about Excel tables? They are created from rectangular data ranges. The user can add a totals row. The header includes filter buttons. The table is automatically formatted. All of the choices are true. Which of the following is a characteristic of a pivot table? It summarizes data in a range, table, or external data source. It can include multidimensional summaries by designating row and column categories. Users can format the numbers in the Values...
Create Function in (PL/SQL) called lookup_user (v_email) Return the user number of the given user or...
Create Function in (PL/SQL) called lookup_user (v_email) Return the user number of the given user or -1 if the user is not found. Table Account (this is the table I need to add data using Function) Account_no (PK) Email (VARCHAR2) first (VARCHAR2) last (VARCHAR2)
CS 203 Discrete Structure 2 Create a Microsoft Access Database consisting of the following two tables:...
CS 203 Discrete Structure 2 Create a Microsoft Access Database consisting of the following two tables: Part_needs and Parts_Inventory Can you provide the database and query on Microsoft access? Part_needs Supplier Part_number Project 23 1092 1 23 1101 3 23 9048 4 31 4975 3 31 3477 2 32 6984 4 32 9191 2 33 1001 1 Parts_Inventory Part_number Project Quantity Color_code 1001 1 14 8 1092 1 2 2 1101 3 1 1 3477 2 25 2 4975 3...
Having below tables: create table Student(sid char(10) primary key, sname varchar(20) not null, gpa float, major...
Having below tables: create table Student(sid char(10) primary key, sname varchar(20) not null, gpa float, major char(10), dob DATE); create table Course(cno char(10) primary key, cname varchar(20) not null, credits int, dept char(10)); create table Reg( sid references Student(sid) on delete cascade, cno references Course(cno) on delete cascade, grade char(2), primary key (sid, cno)); questions For each course, display the number of students who got each grade, ordered by the course and the letter grade. List the current age in...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT