Database Management Systems II Session 5
Objectives Design database schema Understand elements of RDBMS Understand use of SQL and read simple SQL commands Complete a RDBMS exercise using MS Access
Topics Database Schema Queries, Forms and Reports Introduction to SQL Hands-on exercise
Scenario Draw an E-R diagram: Northwind is a wholesaler of delicatessen products. Customers are all over the world and each member of the sales team may deal with any customer. Products is kept in a central warehouse and items are ordered from Suppliers when numbers reach the re-order level. An Order may consist of several different products and may be delivered by any one of three Shippers.
Entity-Relationship Diagram
Table Definition Table: Contacts Field Name Data Type Size Indexing Contact ID Number Long Integer Primary Key Name Text 30 Birthday Date Birthday Card Yes/No
RDBMS Objects FORMS TABLES QUERIES REPORTS
Forms
Reports
SQL Code SELECT ProductID, ProductName FROM Products WHERE Discontinued = ‘No’ ORDER BY ProductName; - What will the query output look like? - What is this query doing?
Exercise Honest Pete’s Car Sales is a business that deals in second hand cars. You have been given a table of current stock and a table of sales staff. Construct a schema with table definitions showing primary keys and indicating how tables should be linked. Following your design, construct the DBMS in MS Access