Database Principles Autumn 2007 High Distinction Assignment REBEL Sport Online Author: Joseph Diver.

Slides:



Advertisements
Similar presentations
MS-Access XP Lesson 2. Input Mask Property 1.Field : Phone No Data Type : Number Input Mask : Character 0 represent a single digit and phone.
Advertisements

COMP 3715 Spring 05. Working with data in a DBMS Any database system must allow user to  Define data Relations Attributes Constraints  Manipulate data.
Accounting System Design
Concepts of Database Management, 4th Edition, Pratt & Adamski
RELATIONSHIP  THE WAY TABLES ARE RELATED  A TABLE MUST PARTICIPATE IN AT LEAST ONE RELATIONSHIP  IN A BINARY RELATIONSHIP TWO ENTITIES PARTICIPATE 
Sample queries Practice in using Oracle SQL (1 of 2)
Implementing an REA Model in a Relational Database
Tutorial 5 Multi-table queries. Tutorial 5 objectives Displaying Data from Multiple Tables –[ ]Write SELECT statements to access data from more than one.
Database – Part 2a Dr. V.T. Raja Oregon State University.
Database Constraints. Database constraints are restrictions on the contents of the database or on database operations Database constraints provide a way.
Computer Science & Engineering 2111 Introduction to Database Management Systems Relationships and Database Creation 1 CSE 2111 Introduction to Database.
Define Table Relationships—1 of 3 One of the most powerful features of a relational database management system, such as Access, is its ability to define.
SQL Joins.
1 Database Requirements and Design. 2 DATA PEOPLE PROCEDURES HARDWARE SOFTWARE The Product: a working system.
ACCESS CHAPTER 1. OBJECTIVES Tables Queries Forms Reports Primary and Foreign Keys Relationship.
The ZhangLamHoyts Case Study De Wen Zhong Vincent Tang Distinction Assignment, Autumn 2007.
Microsoft Access Lesson 3
CPS120: Introduction to Computer Science Information Systems: Database Management Nell Dale John Lewis.
The 2 nd Hand Student Book Database Jon Havier High Distinction Assignment, Autumn 2007.
Concepts of Database Management, Fifth Edition Chapter 4: The Relational Model 3: Advanced Topics.
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
By Sean Boange.  This Database is modelled on the Computer Hardware Store MSY At current they display the numerous products they sell.
Your Name Here See Page Notes for Info about Hyperlinks.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
STA TRAVEL AUSTRALIA Rumana Islam HD Assignment 3, Autumn 2007.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Final Exam Guide PHP NOTE: PHP CODE WILL BE BLUE, HTML IS BLACK EXAMPLE
“National Electoral Division Profiles” Case Study Vincent Tang High Distinction Assignment, Autumn 2007.
SQL 101 for Web Developers 14 November What is a database and why have one? Tables, relationships, normalization SQL – What SQL is and isn’t – CRUD:
Dr. Chen, Business Database Systems JustLee DataBase Referential Integrity Jason C. H. Chen, Ph.D. Professor of MIS School of Business Administration Gonzaga.
What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.
1 General Form of the SELECT Statement SELECT [DISTINCT | ALL {* | col_expr [AS new_name] [,…]} FROMtable_name [,…] [,…] [WHERE condition] [GROUP BY col_list]
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 6/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Microsoft Access Intro Class 6 Relationships.
M Taimoor Khan Course Objectives 1) Basic Concepts 2) Tools 3) Database architecture and design 4) Flow of data (DFDs)
SQL for Data Retrieval. Review Questions of Previous Class Q1. Show the sum of hours worked for project with ID 1200 (use ASSIGNMENT table) – Use “SUM”
Recap of SQL Lab no 8 Advance Database Management System.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
1 IRU – database design part one Geoff Leese September 2009.
Database Fundamentals Lecture 4 Useful website for MySQL download language.com/workshops/Default.asp ?workshop=21.
© 2002 by Prentice Hall 1 Database Processing with Microsoft Access David M. Kroenke Database Concepts 1e Appendix A.
Introduction to Database using Microsoft Access 2013 Part 7 November 19, 2014.
Database Processing with Microsoft Access Appendix DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Constraints cis 407 Types of Constraints & Naming Key Constraints Unique Constraints Check Constraints Default Constraints Misc Rules and Defaults Triggers.
1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 7: SQL, the Structured Query Language Instructor’s name and.
Indexes and Views Unit 7.
1 DBS201: More on SQL Lecture 3. 2 Agenda How to use SQL to update table definitions How to update data in a table How to join tables together.
 Taber Shimono Lilyana Gross Andrea Nelson Chelsea Ball Eric Svendsen Shefflette.
UTS DATABASE Chris Zaharia.
Lesson 2: Designing a Database and Creating Tables.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
1 MySQL and SQL. 2 Topics  Introducing Relational Databases  Terminology  Managing Databases MySQL and SQL.
* Database is a group of related objects * Objects can be Tables, Forms, Queries or Reports * All data reside in Tables * A Row in a Table is a record.
Jenny Jirathammakul High Distinction Assignment Database Principles Autumn, 2007 Melbourne City Toyota.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
Exam 2 Review. SQL – Create Table REMEMBER!! – Create table mxws.Contact ( ContactID INT(10) NOT NULL,.., primary key (contactID));
Lab week 10 Aggregates and sub-queries And assignment details.
1 All Powder Board and Ski SQL Server Workbook Chapter 5: Advanced Queries Jerry Post Copyright © 2003.
Module 5: Joining Multiple Tables. Overview Using Aliases for Table Names Combining Data from Multiple Tables Combining Multiple Result Sets.
THE DATABASE OF MSY TECHNOLOGY PTY. LTD PRODUCT Ronald Diningrat High Distinction Assignment Autumn 2007.
Database Constraints ICT 011. Database Constraints Database constraints are restrictions on the contents of the database or on database operations Database.
The Booktopia Database
Order Database – ER Diagram
Order Database – ER Diagram
All Powder Board and Ski
Order Database – ER Diagram
Order Database – ER Diagram
Web Services שפת SQL כתבה: זהבה יעקובסון ליווי מקצועי : ארז קלר
5.02 Understand database queries, forms, and reports used in business.
Order Database – ER Diagram
Presentation transcript:

Database Principles Autumn 2007 High Distinction Assignment REBEL Sport Online Author: Joseph Diver

Introduction Purpose: To maintain ordering of products based on current stock levels and processing of current orders This database is also built upon the AS400 system which is required for stock levelling, delivery&installations and so on

ERD

Single-To-Many Relationship Rebel_Suppliers SupplierID CompanyName Address OfficePhoneNo FaxNo Comments Rebel_PurchaseOrders PurchaseOrderID SupplierID* DateOfCreation DueDatePurchaseOrderIDSupplierID

Many-To-Many Relationship Rebel_Orders OrderID SKU* StaffID* DelInstNo* Quantity Date_Created DueDate AusPostRef Rebel_Customers CustID FirstName LastName UnitNo StreetNo StreetName StreetType Suburb PostCode HomePhone WorkPhone MobilePhone Rebel_CustOrders CustID* OrderID*CustIDOrderID

Select Query This query selects the items which are not on order

Natural Join This query join the purchase order table with the suppliers table to find orders before 15 th of August

Cross Product This query selects the orders which have DeliveryInstallation numbers attached to them

Group By This query outputs the number of delivery or installations allocated to each supplier

Sub-Query This query selects the products with the maximum price but still have a cost under $200

Check Statement CONSTRAINT PK_StockLevel PRIMARY KEY (SKU, StoreID), CONSTRAINT FK_SKU FOREIGN KEY (SKU) REFERENCES Rebel_Items ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT FK_StoreID FOREIGN KEY (StoreID) REFERENCES Rebel_Stores ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT SKU_Length CHECK (length(SKU) = 7), CONSTRAINT StoreID_Length CHECK (length(StoreID) = 5), CONSTRAINT Level_Valid CHECK (Level >= 0), CONSTRAINT OnLayby_Valid CHECK (OnLayby >= 0), CONSTRAINT OnOrder_Valid CHECK (OnOrder >= 0), CONSTRAINT NetOnHand_Valid CHECK (NetOnHand = (OnHand - (InTransfer + OnLayby))), CONSTRAINT ValidOrdering CHECK (OnOrder <= (Level - NetOnHand))

Action Statements CONSTRAINT FK_DIStaff FOREIGN KEY (StaffID) REFERENCES Rebel_Employees ON DELETE RESTRICT -- DnI's require a staff number attached to them ON UPDATE CASCADE, CONSTRAINT FK_DISupplier FOREIGN KEY (SupplierID) REFERENCES Rebel_Suppliers ON DELETE RESTRICT -- If the Supplier disappears, the customer would be left hanging ON UPDATE CASCADE,