In: Computer Science
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.
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.