Question

In: Computer Science

Create a query in Access that uses two tables, the Patient table and the Session table. Add

Create a query in Access that uses two tables, the Patient table and the Session table. Add the LastName, FirstName, and SessionDate fields to the query grid. Run the query. How many records are displayed? Delete the join line between the field lists in Query Design View. Rerun the query. How many records are now displayed? Why are the results different? You do not need to save the queries. 

Solutions

Expert Solution

When the tables are joined, there are 12 records in the output. When the tables are not joined, 144 records are displayed in the output. When two tables are in a query without any instructions as to how to join the tables together, each record in one table joins with each record in the other table (a Cartesian join). This is a mistake in this case. The tables should be joined to obtain the correct output to the query.


Joining tables correctly yields 12 records, avoiding Cartesian join's 144-record output. Proper joining ensures accurate query results.

Related Solutions

Tables: Create table Item(    &nbs... Bookmark Tables: Create table Item(                 ItemId           &nb
Tables: Create table Item(    &nbs... Bookmark 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);...
From the following mySql query create a function that returns a nth value of a table:...
From the following mySql query create a function that returns a nth value of a table: SELECT name, (SUM(price * quantity)) AS TotalPrice FROM Items NATURAL JOIN Inventory GROUP BY name ORDER BY (TotalPrice) DESC LIMIT 1, OFFSET 1; Shema: Inventory(name: String,item:String,quantity:integer) Items(item: String, brand: String, price:double)
Create tables according to the mapping. Add 2 records to each. Create 5 queries for database...
Create tables according to the mapping. Add 2 records to each. Create 5 queries for database of 3 table joins to use most of the tables or group of tables in database. You should not have tables that are of no use. Student(ssn, name, major) Class(classID, name, f_ssn) Faculty(ssn, name, office_num, dept_id) Department(Dept_id, office_num, f_ssn) Enroll(s_ssn, classID, grade) Professor(f_ssn, alma-mater, tenured) Instructor(f_ssn, term_degree, type) Lecture(classID, method) Lab(classID, location) Person(ssn, dob, gender)
Create a ‘Student’ table using SQL query. The table must have at least five attributes from...
Create a ‘Student’ table using SQL query. The table must have at least five attributes from your choice with different data types.
Table Rock Tables, manufactures two popular tables, a country style table and a contemporary style table....
Table Rock Tables, manufactures two popular tables, a country style table and a contemporary style table. The manufacturing process for both tables requires the use of three types of machines. The time to produce the tables on each machine given in the following table: Machine   Country Table Contemporary Table Total Time Available Router 1.5 2 1000 Sander 3.0 4.5 2000 Polisher 2.5 1.5 1500 The earns a profit of $350 on the Country table, and $450 on the Contemporary table....
Write CREATE TABLE and INSERT INTO statements in order to create and populate five tables in...
Write CREATE TABLE and INSERT INTO statements in order to create and populate five tables in Oracle’s SQL*Plus.The information you need about the database ARE IN THE CHARTS BELOW. Each worksheet includes the following information about its associated table: ➢ Column names (for example, the jr_order table contains the orderID, customerID, orderDate, orderStatus, and orderShippedDate columns); ➢ Column data types (for example, orderID is INT, orderStatus is VARCHAR2(2), etc.); ➢ Column constraints, if any (for example, orderID in the jr_order...
The ProjectsAndLineItems query currently uses the ProjectID field from the Projects table. Explain why that field cannot be edited in Query Datasheet View.
The ProjectsAndLineItems query currently uses the ProjectID field from the Projects table. Explain why that field cannot be edited in Query Datasheet View. 
Write create table statements to create tables for the Exoproduct employees computers database depicted by the...
Write create table statements to create tables for the Exoproduct employees computers database depicted by the relational schema created in a mini case MC5 in chapter 3. Use insert into statements to insert no fewer than 2 and no more than 10 records per table.
For this assignment you have to create tables as reviewed in class Manufacturer table, Product table...
For this assignment you have to create tables as reviewed in class Manufacturer table, Product table and Stock table. The code is in Week 7 PPT lecture. You are to add update as needed to make the tables the same as below and match Product, Manufacturer and Stock as below. For this assignment you will be working with these same tables.   Please complete the following tasks and submit in word file or notepad. 1. First insert tuples into two of...
For this assignment you have to create tables as reviewed in class Manufacturer table, Product table...
For this assignment you have to create tables as reviewed in class Manufacturer table, Product table and Stock table. The code is in Week 7 PPT lecture. You are to add update as needed to make the tables the same as below and match Product, Manufacturer and Stock as below. For this assignment you will be working with these same tables.   Please complete the following tasks and submit in word file or notepad. 1. First insert tuples into two of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT