Database System For Retail Department Store

Read Complete Research Material



Database System for Retail Department Store

Task 1

Sales Transaction for the Retail Department Store

In the transaction given below a customer ill not be able to make any sort of transaction in case the elected item cot more than the credit amount in the customer's account.

CREATE TRIGGER salesTransaction ON dbo.Orders

FOR INSERT, UPDATE

AS

--Get Credit limit

DECLARE @Count INT

SELECT @COUNT = COUNT(*)

FROM Inserted i

INNER JOIN dbo.Orders o ON i.CustomerNo = o.CustomerNo

INNER JOIN SalesDetail s ON s.OrderNo = o.OrderNo

INNER JOIN Products p ON p.ManufactureID = s.ManufactureID AND m.Product = s.ProductID

INNER JOIN dbo.Customer c ON o.CustomerNo = c.CustomerNo

WHERE (p.Price * s.qtyOrdered) > c.CreditLimit

IF (@Count > 0)

ROLLBACK TRANSACTION

Transaction Management for the Department Store

BEGIN TRANSACTIONStart transaction

INSERT INTO INVOICEAdd record to invoice

(INV_NUM, INV_DATE, ACCNUM, TOTAL)

VALUES (1020,'15-MAR-2012','60120010',3500);

UPDATE INVENTRYUpdate the quantity on hand of the

SET ON_HAND = ON_HAND - 100product

WHERE PROD_CODE = '345TYX';

UPDATE ACCRECUpdate the customer balance

SET BALANCE = BALANCE + 3500account

WHERE ACCNUM = '60120010';

COMMIT;

Task 2

Conceptual Model of the Database solution for the Department Store

Task 3

ERM Diagram of the Database System

A customer may make many purchases, each one represented by an invoice.

The CUS_BALANCE is updated with each credit purchase or payment and represents the amount the customer owes.

The CUS_BALANCE is increased (+) with every credit purchase and decreased (-) with every customer payment.

The date of last purchase is updated with each new purchase made by the customer.

The date of last payment is updated with each new payment made by the customer.

An invoice represents a product purchase by a customer.

An INVOICE can have many invoice LINEs, one for each product purchased.

The INV_TOTAL represents the total cost of invoice including taxes.

The INV_TERMS can be “30,” “60,” or “90” (representing the number of days of credit) or “CASH,” “CHECK,” or “CC.”

The invoice status can be “OPEN,” “PAID,” or “CANCEL.”

A product's quantity on hand (P_QTYOH) is updated (decreased) with each product sale. A customer may make many payments. The payment type (PMT_TYPE) can be one of the following:

“CASH” for cash payments.

“CHECK” for check payments

“CC” for credit card payments

The payment details (PMT_DETAILS) are used to record data about check or credit card payments:

The bank, account number, and check number for check payments

The issuer, credit card number, and expiration date for credit card payments.

Task 5

Cost of Cloud Implementation

A reputable supplier of cloud implementation in database is Nirvanix. In fact, the product is called CloudNAS. Incentra is another provider who is dedicated to storage services in the cloud (Kudtarkar et.al, 2010). Cloud computing (cloud) is probably currently the most fashionable word in the field of information technology, and data storage market is no exception. Network storage (NAS) in the cloud is emerging as a solution for file storage needs of some small businesses (Greenberg et.al, 2008). As unstructured data continue to rise, the NAS in the cloud can become a good option for many organizations. However, implementation of cloud computing in a company database is very expensive, which could be noticed from the cot analysis table ...
Related Ads