SlideShare a Scribd company logo
University of Salford
Msc(Hons) Business with Information Technologies
Data Management Module1
2010/2011




                                               Frederico Costa
                                               @00255034
                                               University of Salford Year 1

                                                                         1|Page
Introduction

HyperAV is a company inserted in the cinema and hi-tech market. In this Individual Assignment,
based on Oracle I created a Database (from now on known as DB) that could be used by this
company in order to be helpful to run and organise the business itself.
The DB includes all the stores based in London, Manchester, York, Newcastle, Cardiff and the
warehouse located in Birmingham.
It also shows useful information about sales, staff, customers, suppliers, products and stock.
For this assignment I created random names and addresses, phone numbers and products.
I would like to thank my lecturer Andrew Schofield for all the support and patience, advice and
instructions.
This Assignment is divided in Section A, Section B and Section C and this report will follow the same
structure.

LOGIN and PASSWORD

BZA764
descobreagr




SECTION A



         Entity Relationship Diagram (ERD)
                                                                             Works at
             Customer                                    Staff                                   Location
                                                                                Staffed by

    Places                                                                                      Stores
                                   Makes sale


             Is placed   Sold by                           Located at
             by
                              Is for
             Customer                                    Stock                                    Supplier
              Order                Part of

                                                            Is instance of          Supplies         Supplies

                                             Has items                   Is supplied
                                                                                                                Is supplied
                                             of                          by
                                                                              Part of                           by
                                                     Product                                   Supplier Order
                                                                              Consists of




A customer places an order in a store. It is created an order, a form is given to a customer and a staff
sells an item. (Customer_Order Table ; Customer Table; Location Table; Stock Table).

A product is chosen by a customer and is sold by a store, taken from that store. A supplier is
contacted to supply this product. A order is made by the store to the supplier, which delivers it in the


                                                                                                                          2|Page
warehouse (Birmingham) and then is sent to the store that ordered the product.( Stock Table ;
Product Table ; Supplier Table; Supplier_Order Table).

It works as a group of tables that have an incremental primary key. Various primary keys become
foreign keys in different tables.




Entity Relationship on Database




This represents the attributes and system design. All the primary keys and foreign keys are specified
by colour and the same happens with any related value (i.e. “Location_ID”).


Many staff works in a Store – a store is a workplace for many Staff

Many Customers goes to many stores – a store takes many customers



                                                                                            3|Page
A customer chooses many products – many products can be chosen by many customers

Many customers places many orders – many orders can be placed by a customer

Many stores stocks many products – many products are stocked by many stores

A Stock controller controllers many products – each product is controlled by a stock controller

A supplier supplies one and a product (each supplier supplies only one) – a product is supplied by
one and only one supplier.




This Database consists in 8 Tables.
Table 1: HYPERAV_CUSTOMER




                                                                                             4|Page
Taken from a customer form, Customers give their details to become part of the Database.

CUST_ID – Increments a customer by time order (e.g. first customer have ID 1) ;

CUST_TITLE – Identifies a customer as Mr, Mrs, Miss, Dr, Dra ;

ALL THE OTHER DATA IS RELATED WITH ADDRESS AND CONTACTS




Table 2

CUSTOMER ORDER




                                                                                           5|Page
CUST_ORDER_ID – Increments a new order made by a customer

CUST_ORDER_DATE – Indicates the date that the order was made

CUST_PAYMENT_METHOD – Shows the method used to purchase the item(s)

CUST_ORDER_NOTES – notes relative to order (e.g. Delivery)

CUST_ID – Foreign Key from CUSTOMER table

STAFF_ID – Foreign key from STAFF table




Table 3

LOCATION




                                                                      6|Page
LOCATION_ID – Gives an ID to every single store



ALL THE OTHER DATA IS RELATIVE TO ADDRESS



Table 4

PRODUCT TABLE




                                                  7|Page
PRODUCT_ID – Defines an ID to a product

PRODUCT_PRICE – Defines a price for a product

SUPPLIER_ID – Foreign Key from SUPPLIER_ID

ALL THE OTHER ARE RELATED WITH THE TYPE AND COMPANY FOR THE PRODUCT




                                                                  8|Page
Table 5

STAFF TABLE




STAFF_ID – Generates an ID for a Staff member

STAFF_SALARY – shows the salary paid for each Staff member, it varies on the Location;

LOCATION_ID – Foreign Key from LOCATION Table

ALL THE OTHER ARE RELATED TO STAFF ADDRESS




                                                                                         9|Page
Table 6

STOCK TABLE




STOCK_ID – Generates an ID for every order made by a store (or for a store) to a Supplier

CUST_ORDER_ID – Foreign Key from Customer Order Table

PRODUCT_ID – Foreign Key from Product Table

LOCATION_ID – Foreign Key from Location Table


                                                                                        10 | P a g e
Table 7

SUPPLIER TABLE




SUPPLIER_ID – Generates an ID to identify the product Supplier

ALL THE OTHER ARE RELATED TO SUPPLIER DETAILS

NOTE: Supplier table has a “one to many” relationship with the SUPPLIER_ORDER. A supplier gets
many orders but just delivers one type of product.




                                                                                    11 | P a g e
Table 8

SUPPLIER_ORDER




SUPPLIER_ORDER_ID – Generates an ID to an order from a store to a supplier

SUPPLIER_ID – Foreign Key from SUPPLIER Table

PRODUCT_ID - Foreign Key from Product Table

LOCATION_ID - Foreign Key from Location Table

SUPPLIER_ORDER_QUANTITY – shows number of items ordered to every different product. This
Stock is delivered in the Warehouse (Birmingham) to be re-sent to fulfil stock in other stores.




                                                                                       12 | P a g e
Assuptions



All the tables are populated with no more than 10 fields.

Although not all the data might be real, there are some assumptions that were made and needs to be
considered in this report.

Customer Orders

All the orders are updated until the end of October.

Products

The products are categorized in 4 groups:

TV

Mobile

Computer

Accessories

Store

There’s only a cashier per store, the other 2 (or 1 in some cases, explained in the Store’s
assumptions) are sales assistants and Supervisor, so only 1 member of staff per store makes the sale
(i.e. Simon in London).

Supplier Order

The quantity of items ordered from the suppliers depends on the sales that the company had on the
previous month. The figures in Supplier_order table determine how many items the company can
store.

Staff

Birmingham Warehouse allocates a employee to ensure all the stock transfers and deliveries.

Birmingham as been set as a store too.

Stock

The stock is updated until the end of October.

There’s a table that shows how many items can be stored.




                                                                                        13 | P a g e
Total   Stock
Stoc    _Lond                                    Stock_Newcast      StockWarehous     Stock_Manches
k       on       Stock_Cardiff   Stock_York      le                 e                 ter
97      29       3               5               10                 30                20
195     77       18              20              20                 30                30
73      40       10              3               5                  10                5
999     400      100             80              20                 300               99

        Total
Total   Room
Roo     for
m for   Stock    Total Room      Total Room      Total Room for     Total Room for    Total Room for
Stoc    Londo    for Stock       for Stock       Stock              Stock             Stock
k       n        Cardiff         York            Newcastle          Warehouse         Manchester
100     30       5               5               10                 30                20
200     80       20              20              20                 30                30
90      40       10              5               15                 10                10
1000    400      100             80              20                 300               100




This table shows that London and Manchester are bigger stores and that’s why they have more staff
and more room for stock (it doesn’t mean that the sales have to be better).




Procedures description

A customer goes to a store to buy something. The customer is helped to choose the best item for
himself by a sales assistant or Supervisor and pays on the till. The cashier check if the item is
available in the store. If it is not available it is ordered from the warehouse.

The system is updated and the Stock Controller orders the sold item from the supplier to replace the
item sold so the company can always have it’s maximum stock always available.

The customer’s order is inserted on the system and delivered (if required).The delivery is free. For
every customer is created an ID and the same is automatically done for the order too.




                                                                                            14 | P a g e
SECTION B

QUERIES




a)   Create SQL code to list all staff members and the branch at which they work.



Select * from HYPERAV_STAFF NATURAL INNER JOIN HYPERAV_LOCATION ;

In this Query it was select ‘everything’ from HYPERAV_STAFF and was used a NATURAL INNER
JOIN to relate with HYPERAV_LOCATION. This way all staff members were listed and related to its
branch.




                                                                                      15 | P a g e
QUERY PLAN




b)   Create SQL code to list all products in stock, the stock level of
each product and the total value of stock for each product.

Select PRODUCT_ID, PRODUCT_DESCRIPTION, COUNT(STOCK_ID) STOCK_LEVEL,
SUM(PRODUCT_PRICE) TOTAL_VALUE from HYPERAV_STOCK NATURAL INNER JOIN
HYPERAV_PRODUCT GROUP BY PRODUCT_ID, PRODUCT_DESCRIPTION ;


This query lists all products in stock (stock level) and total value (note that before it was shown the
ideal stock but that is business strategy, not business reality so I assumed the stock on replacing what
is sold gets stocked again, that is why the actual stock is only a re-stock of what was sold.




                                                                                            16 | P a g e
QUERY PLAN




c)   Create SQL code to display all products which are in stock at the
Manchester branch and which have a price of over £500. The output
should be sorted by price.

SELECT * FROM HYPERAV_LOCATION NATURAL INNER JOIN HYPERAV_STOCK NATURAL
INNER JOIN HYPERAV_PRODUCT WHERE LOCATION_TOWN_CITY like 'Manchester' and
PRODUCT_PRICE > 500 ORDER BY PRODUCT_PRICE

This query displays all products which are in stock at Manchester Branch with a price over £500.

Note: It could be done with this code too ‘SELECT * FROM HYPERAV_STOCK NATURAL INNER
JOIN HYPERAV_PRODUCT WHERE LOCATION_ID =2 and PRODUCT_PRICE > 500 ORDER BY
PRODUCT_PRICE’




                                                                                          17 | P a g e
QUERY PLAN




d)    Create SQL code to prompt the user for a supplier and to then
display all products which the chosen supplier offers.



SELECT * FROM HYPERAV_SUPPLIER NATURAL INNER JOIN HYPERAV_PRODUCT WHERE
SUPPLIER_ID= :ENTER_ID

This code creates a prompt that gives the opportunity to choose the SUPPLIER_ID and check all its
attributes.




                                                                                        18 | P a g e
As an example it was shown all the attributes for SUPPLIER_ID 1.



QUERY PLAN




                                                                   19 | P a g e
e)    Create SQL code to display information about each customer and the
orders that they have placed. The output should include customers that
have not placed any orders. Sort the output by the date of the order.
(Note, you should ensure that your sample data properly demonstrates
this query, i.e. that it shows customer with no orders)


SELECT * FROM HYPERAV_CUSTOMER LEFT OUTER JOIN HYPERAV_CUSTOMER_ORDER
ON HYPERAV_CUSTOMER.CUST_ID =HYPERAV_CUSTOMER_ORDER.CUST_ID ORDER BY
CUST_ORDER_DATE;

This Query shows all the customers and the orders placed by them.
This Database didn’t have a customer without orders because it was assumed that all the customers
would fill the form on the first purchase but it was created a “Test” customer, ID 21 to show that the
code is working.




                                                                                            20 | P a g e
QUERY PLAN




             21 | P a g e
SECTION C (APPLICATION BUILDER)


a)       Forms for inputting customer and customer order details




CUSTOMER FORM (Blank)

     -     To become a customer and be inserted in the system;




                                                                   22 | P a g e
CUSTOMER ORDER FORM (blank)
   - To place an order;




                              23 | P a g e
b)   A report on the products sold by the company, including an analysis
        page which show a pie chart of the different types of products.




Products sold by the company and report of turnover by product (value obtained).

The Chart cannot be shown in the actual report because it is necessary a SVG viewer and the actual
computers cannot download it (no administrator permission in computers in University) but it is
available on the Oracle Platform.




                                                                                        24 | P a g e
Conclusion



This report is expected to fulfil all the tasks from section A, B and C for this assignment and to explain
the strategy plan for this company (just about the database).

It correspond to the use of queries, input forms and reports but more utilities from an Oracle Platform
can be used such as SQL Queries, Application Builders and in a forward stage, connect databases
with MYSQL and PHP or to create Retail Databases more developed.




                                                                                              25 | P a g e
Conclusion



This report is expected to fulfil all the tasks from section A, B and C for this assignment and to explain
the strategy plan for this company (just about the database).

It correspond to the use of queries, input forms and reports but more utilities from an Oracle Platform
can be used such as SQL Queries, Application Builders and in a forward stage, connect databases
with MYSQL and PHP or to create Retail Databases more developed.




                                                                                              25 | P a g e
Conclusion



This report is expected to fulfil all the tasks from section A, B and C for this assignment and to explain
the strategy plan for this company (just about the database).

It correspond to the use of queries, input forms and reports but more utilities from an Oracle Platform
can be used such as SQL Queries, Application Builders and in a forward stage, connect databases
with MYSQL and PHP or to create Retail Databases more developed.




                                                                                              25 | P a g e

More Related Content

Similar to Report oracle Frederico Costa

Supply Chain Management, Basics
Supply Chain Management, BasicsSupply Chain Management, Basics
Supply Chain Management, Basics
Rajendran Ananda Krishnan
 
PROCUREMENT & INVENTORY MANAGEMENT
PROCUREMENT & INVENTORY MANAGEMENTPROCUREMENT & INVENTORY MANAGEMENT
PROCUREMENT & INVENTORY MANAGEMENT
Zohaib Ansari
 
Inventory management
Inventory managementInventory management
Inventory management
Tran Thuy Duong
 
Inventory management
Inventory managementInventory management
Inventory management
Ashfaq Umar
 
Inventory mgmt
Inventory mgmtInventory mgmt
Inventory mgmt
Ashish Sarolia
 
Introduction To Msbi By Yasir
Introduction To Msbi By YasirIntroduction To Msbi By Yasir
Introduction To Msbi By Yasir
yasir873
 
ACCOUNTING FOR MATERIAL.pptx
ACCOUNTING FOR MATERIAL.pptxACCOUNTING FOR MATERIAL.pptx
ACCOUNTING FOR MATERIAL.pptx
DaveN31
 
Inventory types
Inventory typesInventory types
Inventory types
Anubha Dureja
 
Distribution operations
Distribution operationsDistribution operations
Distribution operations
Rush Jobsite
 
Ppts of odoo
Ppts of odooPpts of odoo
Ppts of odoo
Hiba Malass
 
Supply chain management
Supply chain managementSupply chain management
Supply chain management
MANNU KUMAR
 
Purchase order and inventory management training
Purchase order and inventory management trainingPurchase order and inventory management training
Purchase order and inventory management training
DSarmah
 
Gestão de stocks lingua inglesa 1
Gestão de stocks lingua inglesa 1Gestão de stocks lingua inglesa 1
Gestão de stocks lingua inglesa 1
Isabel Miguel
 
Gestão de stocks língua inglesa
Gestão de stocks língua inglesaGestão de stocks língua inglesa
Gestão de stocks língua inglesa
Isabel Miguel
 
Inventory Management Project
Inventory Management ProjectInventory Management Project
Inventory Management Project
MOHD ARISH
 
Inventory management
 Inventory management Inventory management
Inventory management
N M
 
Project report inventory
Project report inventoryProject report inventory
Project report inventory
Raj Aman
 
NMIT-SUPPLY-CHAIN-MANAGEMENT-Lesson5
NMIT-SUPPLY-CHAIN-MANAGEMENT-Lesson5NMIT-SUPPLY-CHAIN-MANAGEMENT-Lesson5
NMIT-SUPPLY-CHAIN-MANAGEMENT-Lesson5
Jacqueline Quek
 
NASCC_Presentation_2015 v1
NASCC_Presentation_2015 v1NASCC_Presentation_2015 v1
NASCC_Presentation_2015 v1
John Schuepbach
 
Qs2 um en_05_customer_return_to_credit
Qs2 um en_05_customer_return_to_creditQs2 um en_05_customer_return_to_credit
Qs2 um en_05_customer_return_to_credit
khayer
 

Similar to Report oracle Frederico Costa (20)

Supply Chain Management, Basics
Supply Chain Management, BasicsSupply Chain Management, Basics
Supply Chain Management, Basics
 
PROCUREMENT & INVENTORY MANAGEMENT
PROCUREMENT & INVENTORY MANAGEMENTPROCUREMENT & INVENTORY MANAGEMENT
PROCUREMENT & INVENTORY MANAGEMENT
 
Inventory management
Inventory managementInventory management
Inventory management
 
Inventory management
Inventory managementInventory management
Inventory management
 
Inventory mgmt
Inventory mgmtInventory mgmt
Inventory mgmt
 
Introduction To Msbi By Yasir
Introduction To Msbi By YasirIntroduction To Msbi By Yasir
Introduction To Msbi By Yasir
 
ACCOUNTING FOR MATERIAL.pptx
ACCOUNTING FOR MATERIAL.pptxACCOUNTING FOR MATERIAL.pptx
ACCOUNTING FOR MATERIAL.pptx
 
Inventory types
Inventory typesInventory types
Inventory types
 
Distribution operations
Distribution operationsDistribution operations
Distribution operations
 
Ppts of odoo
Ppts of odooPpts of odoo
Ppts of odoo
 
Supply chain management
Supply chain managementSupply chain management
Supply chain management
 
Purchase order and inventory management training
Purchase order and inventory management trainingPurchase order and inventory management training
Purchase order and inventory management training
 
Gestão de stocks lingua inglesa 1
Gestão de stocks lingua inglesa 1Gestão de stocks lingua inglesa 1
Gestão de stocks lingua inglesa 1
 
Gestão de stocks língua inglesa
Gestão de stocks língua inglesaGestão de stocks língua inglesa
Gestão de stocks língua inglesa
 
Inventory Management Project
Inventory Management ProjectInventory Management Project
Inventory Management Project
 
Inventory management
 Inventory management Inventory management
Inventory management
 
Project report inventory
Project report inventoryProject report inventory
Project report inventory
 
NMIT-SUPPLY-CHAIN-MANAGEMENT-Lesson5
NMIT-SUPPLY-CHAIN-MANAGEMENT-Lesson5NMIT-SUPPLY-CHAIN-MANAGEMENT-Lesson5
NMIT-SUPPLY-CHAIN-MANAGEMENT-Lesson5
 
NASCC_Presentation_2015 v1
NASCC_Presentation_2015 v1NASCC_Presentation_2015 v1
NASCC_Presentation_2015 v1
 
Qs2 um en_05_customer_return_to_credit
Qs2 um en_05_customer_return_to_creditQs2 um en_05_customer_return_to_credit
Qs2 um en_05_customer_return_to_credit
 

More from Frederico Costa

Individual report mdp
Individual report mdpIndividual report mdp
Individual report mdp
Frederico Costa
 
Dynamic Web Development Report by Frederico Costa
Dynamic Web Development Report by Frederico CostaDynamic Web Development Report by Frederico Costa
Dynamic Web Development Report by Frederico Costa
Frederico Costa
 
Accounting assignment frederico costa
Accounting assignment frederico costaAccounting assignment frederico costa
Accounting assignment frederico costa
Frederico Costa
 
Corporate Strategy Assignment 1 by Frederico Costa
Corporate Strategy Assignment 1 by Frederico CostaCorporate Strategy Assignment 1 by Frederico Costa
Corporate Strategy Assignment 1 by Frederico Costa
Frederico Costa
 
Trade unions assignment by Frederico Costa
Trade unions assignment by Frederico CostaTrade unions assignment by Frederico Costa
Trade unions assignment by Frederico Costa
Frederico Costa
 
Zara segmentation by
Zara segmentation byZara segmentation by
Zara segmentation by
Frederico Costa
 
Advwebdesign report
Advwebdesign reportAdvwebdesign report
Advwebdesign report
Frederico Costa
 
Frederico costa project management
Frederico costa project managementFrederico costa project management
Frederico costa project management
Frederico Costa
 

More from Frederico Costa (8)

Individual report mdp
Individual report mdpIndividual report mdp
Individual report mdp
 
Dynamic Web Development Report by Frederico Costa
Dynamic Web Development Report by Frederico CostaDynamic Web Development Report by Frederico Costa
Dynamic Web Development Report by Frederico Costa
 
Accounting assignment frederico costa
Accounting assignment frederico costaAccounting assignment frederico costa
Accounting assignment frederico costa
 
Corporate Strategy Assignment 1 by Frederico Costa
Corporate Strategy Assignment 1 by Frederico CostaCorporate Strategy Assignment 1 by Frederico Costa
Corporate Strategy Assignment 1 by Frederico Costa
 
Trade unions assignment by Frederico Costa
Trade unions assignment by Frederico CostaTrade unions assignment by Frederico Costa
Trade unions assignment by Frederico Costa
 
Zara segmentation by
Zara segmentation byZara segmentation by
Zara segmentation by
 
Advwebdesign report
Advwebdesign reportAdvwebdesign report
Advwebdesign report
 
Frederico costa project management
Frederico costa project managementFrederico costa project management
Frederico costa project management
 

Recently uploaded

OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
Claudio Di Ciccio
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 

Recently uploaded (20)

OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 

Report oracle Frederico Costa

  • 1. University of Salford Msc(Hons) Business with Information Technologies Data Management Module1 2010/2011 Frederico Costa @00255034 University of Salford Year 1 1|Page
  • 2. Introduction HyperAV is a company inserted in the cinema and hi-tech market. In this Individual Assignment, based on Oracle I created a Database (from now on known as DB) that could be used by this company in order to be helpful to run and organise the business itself. The DB includes all the stores based in London, Manchester, York, Newcastle, Cardiff and the warehouse located in Birmingham. It also shows useful information about sales, staff, customers, suppliers, products and stock. For this assignment I created random names and addresses, phone numbers and products. I would like to thank my lecturer Andrew Schofield for all the support and patience, advice and instructions. This Assignment is divided in Section A, Section B and Section C and this report will follow the same structure. LOGIN and PASSWORD BZA764 descobreagr SECTION A Entity Relationship Diagram (ERD) Works at Customer Staff Location Staffed by Places Stores Makes sale Is placed Sold by Located at by Is for Customer Stock Supplier Order Part of Is instance of Supplies Supplies Has items Is supplied Is supplied of by Part of by Product Supplier Order Consists of A customer places an order in a store. It is created an order, a form is given to a customer and a staff sells an item. (Customer_Order Table ; Customer Table; Location Table; Stock Table). A product is chosen by a customer and is sold by a store, taken from that store. A supplier is contacted to supply this product. A order is made by the store to the supplier, which delivers it in the 2|Page
  • 3. warehouse (Birmingham) and then is sent to the store that ordered the product.( Stock Table ; Product Table ; Supplier Table; Supplier_Order Table). It works as a group of tables that have an incremental primary key. Various primary keys become foreign keys in different tables. Entity Relationship on Database This represents the attributes and system design. All the primary keys and foreign keys are specified by colour and the same happens with any related value (i.e. “Location_ID”). Many staff works in a Store – a store is a workplace for many Staff Many Customers goes to many stores – a store takes many customers 3|Page
  • 4. A customer chooses many products – many products can be chosen by many customers Many customers places many orders – many orders can be placed by a customer Many stores stocks many products – many products are stocked by many stores A Stock controller controllers many products – each product is controlled by a stock controller A supplier supplies one and a product (each supplier supplies only one) – a product is supplied by one and only one supplier. This Database consists in 8 Tables. Table 1: HYPERAV_CUSTOMER 4|Page
  • 5. Taken from a customer form, Customers give their details to become part of the Database. CUST_ID – Increments a customer by time order (e.g. first customer have ID 1) ; CUST_TITLE – Identifies a customer as Mr, Mrs, Miss, Dr, Dra ; ALL THE OTHER DATA IS RELATED WITH ADDRESS AND CONTACTS Table 2 CUSTOMER ORDER 5|Page
  • 6. CUST_ORDER_ID – Increments a new order made by a customer CUST_ORDER_DATE – Indicates the date that the order was made CUST_PAYMENT_METHOD – Shows the method used to purchase the item(s) CUST_ORDER_NOTES – notes relative to order (e.g. Delivery) CUST_ID – Foreign Key from CUSTOMER table STAFF_ID – Foreign key from STAFF table Table 3 LOCATION 6|Page
  • 7. LOCATION_ID – Gives an ID to every single store ALL THE OTHER DATA IS RELATIVE TO ADDRESS Table 4 PRODUCT TABLE 7|Page
  • 8. PRODUCT_ID – Defines an ID to a product PRODUCT_PRICE – Defines a price for a product SUPPLIER_ID – Foreign Key from SUPPLIER_ID ALL THE OTHER ARE RELATED WITH THE TYPE AND COMPANY FOR THE PRODUCT 8|Page
  • 9. Table 5 STAFF TABLE STAFF_ID – Generates an ID for a Staff member STAFF_SALARY – shows the salary paid for each Staff member, it varies on the Location; LOCATION_ID – Foreign Key from LOCATION Table ALL THE OTHER ARE RELATED TO STAFF ADDRESS 9|Page
  • 10. Table 6 STOCK TABLE STOCK_ID – Generates an ID for every order made by a store (or for a store) to a Supplier CUST_ORDER_ID – Foreign Key from Customer Order Table PRODUCT_ID – Foreign Key from Product Table LOCATION_ID – Foreign Key from Location Table 10 | P a g e
  • 11. Table 7 SUPPLIER TABLE SUPPLIER_ID – Generates an ID to identify the product Supplier ALL THE OTHER ARE RELATED TO SUPPLIER DETAILS NOTE: Supplier table has a “one to many” relationship with the SUPPLIER_ORDER. A supplier gets many orders but just delivers one type of product. 11 | P a g e
  • 12. Table 8 SUPPLIER_ORDER SUPPLIER_ORDER_ID – Generates an ID to an order from a store to a supplier SUPPLIER_ID – Foreign Key from SUPPLIER Table PRODUCT_ID - Foreign Key from Product Table LOCATION_ID - Foreign Key from Location Table SUPPLIER_ORDER_QUANTITY – shows number of items ordered to every different product. This Stock is delivered in the Warehouse (Birmingham) to be re-sent to fulfil stock in other stores. 12 | P a g e
  • 13. Assuptions All the tables are populated with no more than 10 fields. Although not all the data might be real, there are some assumptions that were made and needs to be considered in this report. Customer Orders All the orders are updated until the end of October. Products The products are categorized in 4 groups: TV Mobile Computer Accessories Store There’s only a cashier per store, the other 2 (or 1 in some cases, explained in the Store’s assumptions) are sales assistants and Supervisor, so only 1 member of staff per store makes the sale (i.e. Simon in London). Supplier Order The quantity of items ordered from the suppliers depends on the sales that the company had on the previous month. The figures in Supplier_order table determine how many items the company can store. Staff Birmingham Warehouse allocates a employee to ensure all the stock transfers and deliveries. Birmingham as been set as a store too. Stock The stock is updated until the end of October. There’s a table that shows how many items can be stored. 13 | P a g e
  • 14. Total Stock Stoc _Lond Stock_Newcast StockWarehous Stock_Manches k on Stock_Cardiff Stock_York le e ter 97 29 3 5 10 30 20 195 77 18 20 20 30 30 73 40 10 3 5 10 5 999 400 100 80 20 300 99 Total Total Room Roo for m for Stock Total Room Total Room Total Room for Total Room for Total Room for Stoc Londo for Stock for Stock Stock Stock Stock k n Cardiff York Newcastle Warehouse Manchester 100 30 5 5 10 30 20 200 80 20 20 20 30 30 90 40 10 5 15 10 10 1000 400 100 80 20 300 100 This table shows that London and Manchester are bigger stores and that’s why they have more staff and more room for stock (it doesn’t mean that the sales have to be better). Procedures description A customer goes to a store to buy something. The customer is helped to choose the best item for himself by a sales assistant or Supervisor and pays on the till. The cashier check if the item is available in the store. If it is not available it is ordered from the warehouse. The system is updated and the Stock Controller orders the sold item from the supplier to replace the item sold so the company can always have it’s maximum stock always available. The customer’s order is inserted on the system and delivered (if required).The delivery is free. For every customer is created an ID and the same is automatically done for the order too. 14 | P a g e
  • 15. SECTION B QUERIES a) Create SQL code to list all staff members and the branch at which they work. Select * from HYPERAV_STAFF NATURAL INNER JOIN HYPERAV_LOCATION ; In this Query it was select ‘everything’ from HYPERAV_STAFF and was used a NATURAL INNER JOIN to relate with HYPERAV_LOCATION. This way all staff members were listed and related to its branch. 15 | P a g e
  • 16. QUERY PLAN b) Create SQL code to list all products in stock, the stock level of each product and the total value of stock for each product. Select PRODUCT_ID, PRODUCT_DESCRIPTION, COUNT(STOCK_ID) STOCK_LEVEL, SUM(PRODUCT_PRICE) TOTAL_VALUE from HYPERAV_STOCK NATURAL INNER JOIN HYPERAV_PRODUCT GROUP BY PRODUCT_ID, PRODUCT_DESCRIPTION ; This query lists all products in stock (stock level) and total value (note that before it was shown the ideal stock but that is business strategy, not business reality so I assumed the stock on replacing what is sold gets stocked again, that is why the actual stock is only a re-stock of what was sold. 16 | P a g e
  • 17. QUERY PLAN c) Create SQL code to display all products which are in stock at the Manchester branch and which have a price of over £500. The output should be sorted by price. SELECT * FROM HYPERAV_LOCATION NATURAL INNER JOIN HYPERAV_STOCK NATURAL INNER JOIN HYPERAV_PRODUCT WHERE LOCATION_TOWN_CITY like 'Manchester' and PRODUCT_PRICE > 500 ORDER BY PRODUCT_PRICE This query displays all products which are in stock at Manchester Branch with a price over £500. Note: It could be done with this code too ‘SELECT * FROM HYPERAV_STOCK NATURAL INNER JOIN HYPERAV_PRODUCT WHERE LOCATION_ID =2 and PRODUCT_PRICE > 500 ORDER BY PRODUCT_PRICE’ 17 | P a g e
  • 18. QUERY PLAN d) Create SQL code to prompt the user for a supplier and to then display all products which the chosen supplier offers. SELECT * FROM HYPERAV_SUPPLIER NATURAL INNER JOIN HYPERAV_PRODUCT WHERE SUPPLIER_ID= :ENTER_ID This code creates a prompt that gives the opportunity to choose the SUPPLIER_ID and check all its attributes. 18 | P a g e
  • 19. As an example it was shown all the attributes for SUPPLIER_ID 1. QUERY PLAN 19 | P a g e
  • 20. e) Create SQL code to display information about each customer and the orders that they have placed. The output should include customers that have not placed any orders. Sort the output by the date of the order. (Note, you should ensure that your sample data properly demonstrates this query, i.e. that it shows customer with no orders) SELECT * FROM HYPERAV_CUSTOMER LEFT OUTER JOIN HYPERAV_CUSTOMER_ORDER ON HYPERAV_CUSTOMER.CUST_ID =HYPERAV_CUSTOMER_ORDER.CUST_ID ORDER BY CUST_ORDER_DATE; This Query shows all the customers and the orders placed by them. This Database didn’t have a customer without orders because it was assumed that all the customers would fill the form on the first purchase but it was created a “Test” customer, ID 21 to show that the code is working. 20 | P a g e
  • 21. QUERY PLAN 21 | P a g e
  • 22. SECTION C (APPLICATION BUILDER) a) Forms for inputting customer and customer order details CUSTOMER FORM (Blank) - To become a customer and be inserted in the system; 22 | P a g e
  • 23. CUSTOMER ORDER FORM (blank) - To place an order; 23 | P a g e
  • 24. b) A report on the products sold by the company, including an analysis page which show a pie chart of the different types of products. Products sold by the company and report of turnover by product (value obtained). The Chart cannot be shown in the actual report because it is necessary a SVG viewer and the actual computers cannot download it (no administrator permission in computers in University) but it is available on the Oracle Platform. 24 | P a g e
  • 25. Conclusion This report is expected to fulfil all the tasks from section A, B and C for this assignment and to explain the strategy plan for this company (just about the database). It correspond to the use of queries, input forms and reports but more utilities from an Oracle Platform can be used such as SQL Queries, Application Builders and in a forward stage, connect databases with MYSQL and PHP or to create Retail Databases more developed. 25 | P a g e
  • 26. Conclusion This report is expected to fulfil all the tasks from section A, B and C for this assignment and to explain the strategy plan for this company (just about the database). It correspond to the use of queries, input forms and reports but more utilities from an Oracle Platform can be used such as SQL Queries, Application Builders and in a forward stage, connect databases with MYSQL and PHP or to create Retail Databases more developed. 25 | P a g e
  • 27. Conclusion This report is expected to fulfil all the tasks from section A, B and C for this assignment and to explain the strategy plan for this company (just about the database). It correspond to the use of queries, input forms and reports but more utilities from an Oracle Platform can be used such as SQL Queries, Application Builders and in a forward stage, connect databases with MYSQL and PHP or to create Retail Databases more developed. 25 | P a g e