Appendix E – Advanced SQL
TEACHING SUGGESTIONS
• Logically the topics in this appendix should be taught immediately after Chapter 3 on
SQL.
• There are variety of topics in this appendix, and for the most part they can be
covered independently (e.g. one does not need to cover the SQL ALTER statement
in order to cover SQL views or SQL set operators, etc.).
• Some of the SQL features described in this appendix are not available in Microsoft
Access, and some others are not covered in this appendix. This appendix covers the
SQL ALTER TABLE statement, querying recursive relationships, and the Microsoft
Access equivalent to SQL views. Exercises, review questions, and case questions
relating to other topics will therefore not have Access solutions.
• The topics of importing Microsoft Excel data into a database and using Microsoft
Access as a development front-end to another DBMS are only mentioned briefly in
this appendix; they are given more complete treatment in Appendices A (SQL
Server), B (Oracle), and C (MySQL).
• The Wedgewood Pacific (WP) database discussed in Chapter 3 is a good database
to use for an in-class demo of the concepts in this appendix. That database was the
basis of the Access Workbench Exercises in Chapters 1 and 2, and for the example
SQL queries in Chapter 3. If your students did the related assignments, they have a
WP database ready to use for the SQL work in Appendix E. If you want to
demonstrate the material in this appendix, see the IRC files supplied and use:
• Microsoft Access:
• DBC–e08–WP-SQL-Version-CH03-AppE.accdb
• SQL Server 2016:
• DBC–e08-MSSQL-WP-Create-Tables.sql
• DBC–e08-MSSQL-WP-Insert-Data.sql
• DBC–e08-MSSQL-WP-Create-AppE-Tables.sql
• DBC–e08-MSSQL-WP-Insert-Data-AppE.sql
• DBC–e08-MSSQL-WP-SQL-AppE-Text.sql
• Oracle Database XE:
• DBC–e08-ODB-WP-Create-Tables.sql
• DBC–e08-ODB-WP-Insert-Data.sql
• DBC–e08-ODB-WP-Create-AppE-Tables.sql
• DBC–e08-ODB-WP-Insert-Data-AppE.sql