A(n) __________________ is a logical connection between rows in two tables where data in one table references data in another table. |
The SQL ________________ statement removes a table from a database. |
The relational algebra "restrict" operator selects only the rows from the input table(s) that satisfy a condition expressed in the _________________ clause. |
The SQL/PL ______________ command is used to re-direct the output of a script file to a text file. |
The ________________________ join creates a result set that includes the matching (related) rows of the input tables as well asthe non-matching rows from both input tables in the result table. |
The _________________ set operator combines all rows from two SELECT queries but requires that the queries be "compatible". |
The SQL _________________ statement deletes rows of data from a table. |
Count, min, max, average and sum are examples of ___________________ functions that can be used to summarize the data of an SQL statement. |
Answers :
1) A Join is a logical connection between rows in two tables where data in one table references data in another table.
2) The SQL DROP statement removes a table from a database.
3) The relational algebra "restrict" operator selects only the rows from the input table(s) that satisfy a condition expressed in the where clause.
4) The SQL/PL SPOOL command is used to re-direct the output of a script file to a text file.
5) The Full Outer join creates a result set that includes the matching (related) rows of the input tables as well asthe non-matching rows from both input tables in the result table.
6) The UNION set operator combines all rows from two SELECT queries but requires that the queries be "compatible".
7) The SQL DELETE statement deletes rows of data from a table.
8) Count, min, max, average and sum are examples of Aggregate functions that can be used to summarize the data of an SQL statement.
A(n) __________________ is a logical connection between rows in two tables where data in one table...
QUESTION 21 Complete the table below by matching each definition with the appropriate SQL clause. -A.B.C.D.E.F.G.H.I.J.K.L.M.N. A mandatory clause that is at the start of all SQL retrieval queries -A.B.C.D.E.F.G.H.I.J.K.L.M.N. A clause used to return only the values in a result table that are unique -A.B.C.D.E.F.G.H.I.J.K.L.M.N. A clause used to filter tuples according to some condition or predicate, like selection in relational algebra -A.B.C.D.E.F.G.H.I.J.K.L.M.N. A clause that is used to list the tables and any joins required in a query...
Tables: Create table Item( ItemId char(5) constraint itmid_unique primary key, Decription varchar2(30), Unitcost number(7,2)); Create table Customer( custID char(5) constraint cid.unique primary key, custName varchar2(20), address varchar2(50)); Create table Orderdata( orderID char(5) constraint oid_uniq primary key, orderdate date, shipdate date, ItemId char(5) references Item.ItemId, No_of_items number(4), Unitcost number(7,2), Order_total number(7,2), custID char(5) references customer.custID); Insert Into Item values(‘A123’,’Pencil’,2.5); Insert Into Item values(‘B123’,’Pen’,15); Insert Into...
17. The select operation: A) combines relational tables to provide the user with more information than is otherwise available. B) creates a subset consisting of columns in a table. C) identifies the table from which the columns will be selected. D) creates a subset consisting of all records in the file that meet stated criteria. 18. The join operation: A) combines relational tables to provide the user with more information than is otherwise available. B) creates a subset consisting of...
Topic: Inventory Manangement Part A. Database Creation Your database should have a minimum of 4 tables and include both one-to-many and many-to-many relationships. Be sure to include some numeric and/or date fields. Define all appropriate constraints, using the proper naming conventions (see Structure Notes below). Populate your database with at least 30 records in the main table(s), and whatever is needed in related tables. Submit the following: • a short description of the purpose of the database and what the...
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...
The lab for this week addresses taking a logical database design (data model) and transforming it into a physical model (tables, constraints, and relationships). As part of the lab, you will need to download the zip file titled CIS336Lab3Files from Doc Sharing. This zip file contains the ERD, Data Dictionary, and test data for the tables you create as you complete this exercise. Your job will be to use the ERD Diagram found below as a guide to define the...
SQL Homework exercises: 1. Write INSERT statements that add two rows to the Members table for member IDs 1 and 2, two rows to the Groups table for group IDs 1 and 2, and three rows to the Group_Membership table: one row for member 1 and group 2; one for member 2 and group 1; and one for member 2 and group 2. Then, write a SELECT statement that joins the three tables and retrieves the group name, member last...
2. Part 2 Given a set of tables with their content (tuples/rows), show what would be retrieved if the given SQL queries were issued Consider tables, of a Supplier-Parts DB, shown in Figure 2. Names of tables, columns and identification of primary foreign keys are shown. Questions in this part ask you to show what would be displayed by the following SQL queries should they be executed against the tables having content (tuples/rows) shown in Figure 2. In each answer...
SQL QUERIES
1) Using the Product and PC relations, create both tables in
your database and insert all the data. Show the SQL statements to
create each table and show a representative SQL insert statement
for the data in each table (i.e. you do not need to show insert
statements for all the data).
– For the remaining questions, assume that your SQL is part of
a program function and the function provides the input needed for
your SQL query....
Question 5: Sevens Let's take a look at data from both of our tables, students and checkboxes, to find out if students that got the number 7 assigned to them also chose '7' for the obedience question. Specifically, we want to look at the students that fulfill the below conditions and see if they also chose '7' in the question that asked students to choose the number 7 (column seven in students). reported that their favorite number (column number in...