Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Assignment -

Purpose: To analyze an existing database design. To design a data warehouse and perform initial upload of data.

Part 1 - Use the following script to create tables on the Oracle 11g server

CREATE TABLE customers (

customer_id INTEGER CONSTRAINT customers_pk PRIMARY KEY,

first_name VARCHAR2(10) NOT NULL,

last_name VARCHAR2(10) NOT NULL,

dob DATE,

phone VARCHAR2(12)

);

CREATE TABLE product_types (

product_type_id INTEGER CONSTRAINT product_types_pk PRIMARY KEY,

name VARCHAR2(10) NOT NULL

);

CREATE TABLE products (

product_id INTEGER CONSTRAINT products_pk PRIMARY KEY,

product_type_id INTEGER

CONSTRAINT products_fk_product_types

REFERENCES product_types(product_type_id),

name VARCHAR2(30) NOT NULL,

description VARCHAR2(50),

price NUMBER(5, 2)

);

CREATE TABLE purchases (

Purchase_id INTEGER PRIMARY KEY,

product_id INTEGER

CONSTRAINT purchases_fk_products

REFERENCES products(product_id),

customer_id INTEGER

CONSTRAINT purchases_fk_customers

REFERENCES customers(customer_id),

quantity INTEGER NOT NULL,

purchase_date DATE NOT NULL

);

1. Use PowerDesigner to reverse engineer the script, and create a CDM (ERD) for the above database.

2. Prepare a physical model, create DDL script, and create tables. If necessary, introduce your own changes to the script. For example: create sequences, add necessary indexes. Create the final DDL Script.

3. Add data to test the next step. Add purchases for 2-3 month within 2 (or more) years.

4. Prepare SQL queries to list he following data:

a. For each product, a total # of products sold in all years and each month within the year. Use ROLLUP.

b. For each product, a total $ amount for products sold in all years and each month within the year. Use ROLLUP.

Part 2 - Design a data warehouse PURCHASES using a star model (or snowflake). Include facts related to number of products purchased and total amount of $ for products purchased. Use the following dimensions: time (month, year), product, customer (age group). Create a conceptual and physical model for the data warehouse using PowerDesigner (please prefix all tables with DW1). Print out your physical model. Generate the schema for Oracle and run the script to create appropriate tables. Load the data into the data warehouse using tables from part 1.

Prepare the following OLAP queries:

1. What was the total number of products sold in each year?

2. What was the month and year of the highest purchases in $?

3. What was the total number of products ordered by customers older than 65?

Part 3 - 1. Create an arff file for the following Shopping basket (you may change your data)

@relation SHOPPING

@attribute pencil {0,1}

@attribute magazine {0,1}

@attribute banana {0,1}

@attribute paper {0,1}

@attribute milk {0,1}

@attribute apple {0,1}

@attribute pear {0,1}

@data

0,0,1,0,1,1,1

0,0,1,0,1,1,0

1,1,0,1,0,0,0

1,0,1,1,0,0,0

1,0,0,1,0,0,0

1,0,0,1,1,0,1

0,1,1,0,1,1,0

1,1,1,0,0,0,1

1,0,1,1,1,1,0

0,0,1,0,1,1,1

Ru the associate rules Apriori algorithm and report your results:

a. What is minimum support reported? (****)

b. Minimum confidence? (****)

c. Best rules found? (****)

Attachment:- Assignment File.rar

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M92745313

Have any Question?


Related Questions in DBMS

Backgrounda new training organization called abc

Background A new training organization called ABC TechTraining is opening soon and they have approached you to help design their new database. They have just completed the refurbishment of the premises and are now lookin ...

A schools office of the registrar maintains data about the

A School's office of the registrar maintains data about the following entities: a) courses (including course number, title, credits, syllabus and prerequisites), b) course offerings (including course number, year, semest ...

Assignmentqueries functions and triggersdatabase

Assignment Queries, Functions and Triggers Database Systems Aims The aims of this assignment are to: formulate SQL queries; populate an RDBMS with a real dataset, and analyse the data; design test data for testing SQL qu ...

Questionsuppose a prolog database exists that gives

Question: Suppose a Prolog database exists that gives information about states and capital cities. Some cities are big, others small. Some states are eastern, others are western. a. Write a query to find all the small ca ...

Databases assignment - monash library services monlib case

Databases Assignment - Monash Library Services (MonLib) Case Study TASK 1: Data Definition For this task you are required to complete the following: 1.1 - Add to your solutions script, the CREATE TABLE and CONSTRAINT def ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

Stored procedure please create the following stored

Stored procedure. Please create the following stored routines using CPS3740_2017S database using the tables in dreamhome database. xxxx is your email id 1) Implement a stored procedure p3Q21_xxxx to display the Branch ci ...

Question create an erd for the following scenario once you

Question: Create an ERD for the following scenario. Once you submit you will get access to the correct way to create the ERD. Please watch the video and correct any errors in your submission and resubmit. A small company ...

Question 1 describe 1nf 2nf 3nf2 explain why 4nf is a

Question: 1: Describe 1NF, 2NF, 3NF. 2: Explain why 4NF is a normal form more desirable than BCNF. The response must be typed, single spaced, must be in times new roman font (size 12) and must follow the APA format.

This is a starting out with visual basic programming

This is a starting out with visual basic programming problem, meaning its a basic programming nothing advanced. Question: Add a linq statement to the combo box text-changed event to dispaly the city field of the selected ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As