Question

Please access to TUN SQL/Assistant using the default database = db_pvfc12_std 1.- Run a query to...

Please access to TUN SQL/Assistant using the default database = db_pvfc12_std

1.- Run a query to retrieve all the data field from db_pvfc12_std in table CUSTOMER_T

2.- Run a query to retrieve record --> CustomerID = 11, How many records did you get and why?

3.- Run a query to retrieve all the data field from table Order_T

              Once retrieved:

                             3.1.- Please name the fields showing: Primary Key, Foreign Key and other fields

                             3.2.- What type of relation between ORDER_T and CUSTOMER_T exist? (hint: 1 to 1 / 1 to M / M to M?

4.- Create a table under your Database using Database "db_pvfc12_std" and table Territory_T name it yourdabasename.Vendor_T

5.- Add a new record in yourdabasename.Vendor_T and put under TerritoryName = "Hawaii" (hint: take a look for code Insert INTO --> QueryBuilder)

Extra Point

Run a query using tables Customer_t & Order_T where Customer_t.CustomerID = 1 and just bring the following fields = Customer_t.OrderID & Customer_t.OrderDate

(Hint = you should only get two rows after run the query)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.- Run a query to retrieve all the data field from db_pvfc12_std( I got dn_pvfc9) in table CUSTOMER_T

  • select * from CUSTOMER_T

Ans: 15 records found

2.- Run a query to retrieve record --> CustomerID = 11, How many records did you get and why?

  • select * from CUSTOMER_T where customer_ID=11

Ans: 1 record found because customer_ID is primary key

3.- Run a query to retrieve all the data field from table Order_T

Ans: 12 records found

                             3.1.- Please name the fields showing: Primary Key, Foreign Key and other fields

3.2.- What type of relation between ORDER_T and CUSTOMER_T exist? (hint: 1 to 1 / 1 to M / M to M?

Ans: Relationship is 1 to M

4.- Create a table under your Database using Database "db_pvfc12_std" and table Territory_T name it yourdabasename.Vendor_T

5. InsertOrder ID Order Date 1003 10/22/2008 12:00:00 AM 1005 10/24/2008 12:00:00 AM 1006 10/24/2008 12:00:00 AM 1004 10/22/2008 12:00Customer ID Customer Name Customer_Address Customer City Customer State Postal Code 11 American Euro Lifestyles 2424 MissouriOrder ID Order Date Customer ID 15 1003 10/22/2008 12:00:00 AM 1005 10/24/2008 12:00:00 AM 1006 10/24/2008 12:00:00 AM 1004 1Ans: insert into Territory_T TerritoryName values("Hawaii")

6. Run a query using tables Customer_t & Order_T where Customer_t.CustomerID = 1 and just bring the following fields = Customer_t.OrderID & Customer_t.OrderDate

Ans : select Order_T.Order_ID,Order_T.Order_Date from Customer_t,Order_T where Customer_t.Customer_ID = 1

10 recodrs found

Add a comment
Know the answer?
Add Answer to:
Please access to TUN SQL/Assistant using the default database = db_pvfc12_std 1.- Run a query to...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • USING SQL TO RETRIEVE DATA FROM DATABASE AND GENERATE REPORTS BASED ON REQUIREMENTS. This is using...

    USING SQL TO RETRIEVE DATA FROM DATABASE AND GENERATE REPORTS BASED ON REQUIREMENTS. This is using SQL Server Management Studio (SSMS). Task: Important: Use one and only one SQL Statement to get results for each of the following items. Query #                                                                Description 1. List the ID and name of the product(s) that didn’t get ordered by any customer. Use a subquery Here is an example of the database schema: Here are the tables created: ESELECT TOP (1000) [CustomerID] [CustomerNamel [Street]...

  • Write an SQL query against the Chinook Database v1.4. Each query must run successfully using DB...

    Write an SQL query against the Chinook Database v1.4. Each query must run successfully using DB Browser for SQLite. Create the exact query below. Must use sub query. I saw that a similar solution for this question used IF and CONCAT functions which do not work and return errors. If it is possible to use the CASE function in place of IF that would be greatly appreciated. Also I really hate to ask but if it could be organized neatly...

  • For each question, write a SQL query and save it as a "sql" file using a...

    For each question, write a SQL query and save it as a "sql" file using a different query 2, etc. Please execute these queries sequentially name, for example, query1.query product id (PK) category brand production_cost (Not Null) (FK) name (Not Null) Toothpaste Supermarket 1 Multivitami Supermarket 2 Shampoo acket T-shirt Supplements Supermarket Department4 Department5 Pharmacy Pharmacy 6 6 10 Query1. Update the Product table by adding another column as shown above ucts (name) with uery2. Retrieve all the uction cost...

  • Microsoft Access 0 database name should be the broad name of what will be inside it....

    Microsoft Access 0 database name should be the broad name of what will be inside it. If I were creating a database on the history of the Pittsburgh Steeler Coaches I would call mine SteelerCoaches.accdb, for example. A. Design one table with at least a. 6 Fields (can have more, but not more than 10) b. Correct datatypes for your fields c. Property changes appropriate to the fields. Have all Field names with more than one word have no spaces...

  • DATABASE SYSTEMS PLEASE HELP ME FOR QUESTIONS 1 THRU 2 SHOW THE QUERY AND THE RESULTS...

    DATABASE SYSTEMS PLEASE HELP ME FOR QUESTIONS 1 THRU 2 SHOW THE QUERY AND THE RESULTS OF THE QUERY (OUTPUT IN TABLE). ALSO, SHOW THE COMMANDS TO CREATE EACH TABLE (DDL COMMANDS) AND THE INSERTION OF THE DATA FOR EACH TABLE (DML COMMANDS). Question 2: SQL (40 points) Use the following database to answer all parts of this question: Table: EMP Primary Key: E NO E NO E NAME E DEPT E RATHE $400.00 $200.00 $150.00 $150.00 S120.00 $100.00 $100.00...

  • Please write SQL Query for following questions using Northwind Database: 1. Create a procedure to add...

    Please write SQL Query for following questions using Northwind Database: 1. Create a procedure to add a new record to Territories table. Call it NewTerr. Add the following records using the procedure. TerritoryID        TerritoryDescription     Region 88888 Brooklyn 1 99999 Waco 4 77777 Long Beach 2 2. Create an Update Procedure that will change the Region from 1 to 3 for record with TerritoryID 88888. Call it Update88. 3. Create a Delete Procedure that will delete the one record from...

  • This is questions of Accounting Information Systems 1) Fo a database. Each row in this spreadsheet...

    This is questions of Accounting Information Systems 1) Fo a database. Each row in this spreadsheet represents a: ur Tet Industries tracks customer information using various Microsoft Excel spreadsheets stored in a. Field b. Record c. File d. Database 2) A d tables is a. What is the correct term for the database field in Table 1? latabase field in Table 1 that serves as a unique identifier in Table 2 and is used to link both of the a....

  • Create the database and tables for the database. Show all SQL statements. Include primary and foreign...

    Create the database and tables for the database. Show all SQL statements. Include primary and foreign keys. Insert data into each table. Show select statements and display the output of each table. Note:Student’s name must be inserted into table as part of the data! Perform the SQL below: Query one table and use WHERE to filter the results. The SELECT clause should have a column list, not an asterisk (*). State the purpose of the query; show the query and...

  • Using the MySQL Workbench create a new database using your design specifications Add at least 10...

    Using the MySQL Workbench create a new database using your design specifications Add at least 10 records to your tables. Note: Certain tables may not require 10 records and that is ok as long as your main tables have 10 or more Create MySQL statements that will retrieve all records or rows from the tables in your database Create 10 MySQL statements that will retrieve specified records or rows from one table in your database Create 10 MySQL statements that...

  • Database For this lab you will be using SQL SELECT statements to query your database tables....

    Database For this lab you will be using SQL SELECT statements to query your database tables. You will be turning in the results of the following queries: 1. List all Patients and what Bed they are assigned to 2. List all patients who had Treatments and what Treatment they received 3. List all patients who had tests and what Test they had 4. List the employees (doctors, nurses, etc.) who assisted each patient. 5. List all patients in alphabetical order...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT