Docsity

BTEC HND Computer Programing, Assignments of Programming Languages

Toggle sidebar
bg1
Assignment Brief (RQF)
Higher National Certificate/Diploma in
Submission Format:
The submission is in the form of an individual written report. This should be written in a concise, formal
business style using single spacing and font size 12. You are required to make use of headings, paragraphs and
subsections as appropriate, and all work must be supported with research and referenced using the Harvard
referencing system. Please also provide a bibliography using the Harvard referencing system. The
recommended word limit is 2,000–2,500 words, although you will not be penalized f or exceeding the total
word limit.
The submission is in the form of a fully functional relational database system as an individual
written report.
The submission is in the form of a witness statement of the testing completed by the student;
technical documentation; and a written report
Unit Learning Outcomes:
LO1 Use an appropriate design tool to design a relational database system for a
substantial problem.
LO2 Develop a fully functional relational database system, based on an existing system
design.
LO3 Test the system against user and system requirements.
LO4 Produce technical and user documentation.
Prepared by: Higher Education Qualifications (H E Q) Approved by: HEQ, QDAM (HE)
Version 1.0 – November 2017
Student Name /ID Number:
Manusha Randula Wijayapala /
M19900114008
Unit Number and Title:
4: Database Design & Development
Academic Year:
2020
Unit Assessor:
Ms. Sachini Gunasekara
Assignment Title:
Stock Management System (Web/Desktop)
Issue Date:
Submission Date:
Internal Verifier Name:
Ms.Maduwanthi Uthpala
Date:
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e

Partial preview of the text

Download BTEC HND Computer Programing and more Assignments Programming Languages in PDF only on Docsity!

Assignment Brief (RQF)

Higher National Certificate/Diploma in

Submission Format:

The submission is in the form of an individual written report. This should be written in a concise, formal

business style using single spacing and font size 12. You are required to make use of headings, paragraphs and

subsections as appropriate, and all work must be supported with research and referenced using the Harvard

referencing system. Please also provide a bibliography using the Harvard referencing system. The

recommended word limit is 2,000–2,500 words, although you will not be penalized f or exceeding the total

word limit.

The submission is in the form of a fully functional relational database system as an individual

written report.

The submission is in the form of a witness statement of the testing completed by the student;

technical documentation; and a written report

Unit Learning Outcomes:

LO1 Use an appropriate design tool to design a relational database system for a

substantial problem.

LO2 Develop a fully functional relational database system, based on an existing system

design.

LO3 Test the system against user and system requirements.

LO4 Produce technical and user documentation.

Prepared by: Higher Education Qualifications (H EQ) Approved by: HEQ, QDAM (HE)

Version 1.0 – November 2017

Student Name /ID Number:

Manusha Randula Wijayapala /

M

Unit Number and Title:

4: Database Design & Development

Academic Year: 2020

Unit Assessor: Ms. Sachini Gunasekara

Assignment Title: Stock Management System (Web/Desktop)

Issue Date:

Submission Date:

Internal Verifier Name: Ms.Maduwanthi Uthpala

Date:

Table of Contents

  • Task
    • 1.1 ER Diagram
      • 1.1.1 Relational schema
    • 1.2 Database Normalization
  • Task
    • 2.1 user interface, Tables and Triggers
      • 2.1.1 Database Table create Queries ,Triggers and stored procedure
    • 2.3 SQL Query
      • 2.3.1 Select Query..........................................................................................................................
      • 2.2.2 Inner join
      • 2.3.3 Right Join
    • 2.2 Database security and Maintenance
      • 2.2.1 Database security
      • 2.2.2 Database maintenance
  • Task
    • requirements, and suggest improvements. 3.1 The database solution in relation for educational organizational environment and system
    • 3.2 Application Testing
    • 3.3 User Manual for Application
      • 3.3.1 Flowchart
  • Referencing

2 Manusha Wijayapala HND Batch 07

1.1.1 Relational schema

3 Manusha Wijayapala HND Batch 07

1.2 Database Normalization

Clint table

1NF

Supplier table

1NF

2NF

Supplier ID Item Id Item Name Price

3NF

Location Id(Pk) Location Name

Supplier Id(Fk) Location Id(Fk) Contact number Email

Item Id (Pk) Item Name

Supplier Id(Fk) Item Id (Fk) Price

Clint ID(PK)

F Name L name NIC address Email Contact number

Supplier ID(PK)

Supplier Name

Location city name

Location Id

Contact number

Email Item Name

Item Id

Price

Supplier Id Location city name

Location Id Contact number

Email

Supplier ID(PK) Supplier Name

Supplier ID(PK) Supplier Name

5 Manusha Wijayapala HND Batch 07

Task 02

2.1 user interface, Tables and Triggers

 Login

6 Manusha Wijayapala HND Batch 07

 Home Page

 Add Client

Page

8 Manusha Wijayapala HND Batch 07

Insert Trigger

Update Trigger

9 Manusha Wijayapala HND Batch 07

Delete trigger for client table and automatically update Client log table

ALTER TRIGGER [dbo].[Client_TB_DeleteLog] ON [dbo].[Client_TB] AFTER DELETE AS BEGIN SET NOCOUNT ON; DECLARE @ClientId varchar(53) declare @NIC varchar(50); declare @FName varchar(50); declare @LName varchar(50); declare @CAddress varchar(max); declare @CEmail varchar(50); declare @ContactNumber varchar(50); declare @Log_Action varchar(100); declare @UserName nvarchar (30); SELECT @ClientId = DELETED.ClientId FROM DELETED select @NIC= DELETED.NIC FROM DELETED select @FName= DELETED.FName FROM DELETED select @LName= DELETED.LName FROM DELETED select @CAddress= DELETED.CAddress FROM DELETED select @CEmail= DELETED.CEmail FROM DELETED select @ContactNumber= DELETED.ContactNumber FROM DELETED select @UserName= DELETED.UserName FROM DELETED set @Log_Action='delete Record .'; insert into Client_TB_Log (ClientId,NIC,FName,LName,CAddress,CEmail,ContactNumber,UserName,Log_Action,Log_Timestamp ) values(@ClientId,@NIC,@FName,@LName,@CAddress,@CEmail,@ContactNumber,@UserName,@Log_Action,getdat e()); END

Insert trigger for client table and automatically update Client log table

ALTER TRIGGER [dbo].[Client_TB_Log_Trigger] ON [dbo].[Client_TB] FOR INSERT AS declare @ClientId varchar(53); declare @NIC varchar(50); declare @FName varchar(50); declare @LName varchar(50); declare @CAddress varchar(max); declare @CEmail varchar(50); declare @ContactNumber varchar(50); declare @Log_Action varchar(100); declare @UserName nvarchar (30);

select @ClientId=i.ClientId from inserted i; select @NIC=i.NIC from inserted i; select @FName=i.FName from inserted i; select @LName=i.LName from inserted i; select @CAddress=i.CAddress from inserted i; select @CEmail=i.CEmail from inserted i; select @ContactNumber=i.ContactNumber from inserted i; select @UserName=i.UserName from inserted i; set @Log_Action='Inserted Record .'; insert into Client_TB_Log (ClientId,NIC,FName,LName,CAddress,CEmail,ContactNumber,UserName,Log_Action,Log_Timestamp )

11 Manusha Wijayapala HND Batch 07

 View client details and edit client details

 Add supplier

12 Manusha Wijayapala HND Batch 07

 Add Location

14 Manusha Wijayapala HND Batch 07

 Supplier Items Relationship Table

 Purchase Order

15 Manusha Wijayapala HND Batch 07

Tables

 Receive Item

17 Manusha Wijayapala HND Batch 07

 Damage Receive

Update trigger for Recive item table and automatically update Stock table

18 Manusha Wijayapala HND Batch 07

ALTER TRIGGER [dbo].[Stock_Trigger_Damage_UPDATE] ON [dbo].[Receive_Item] for update AS

declare @Unit_Price Decimal (10,2); declare @SupplierId varchar(13); declare @ItemId varchar(53); declare @Quantity int; declare @Old_Rqty varchar(50); declare @New_Rqty varchar(50); declare @Temp_result varchar(50); declare @Result_new varchar(50); declare @old_qty varchar(50); declare @new_qty varchar (50);

select @Unit_Price =i.Unit_Price from inserted i; select @SupplierId=i.SupplierId from inserted i; select @ItemId =i.ItemId from inserted i; select @Quantity= Stock_TB.Quantity from Stock_TB where Unit_Price=@Unit_Price AND SupplierId =@SupplierId AND ItemId=@ItemId ; select @Old_Rqty=i.Damage_Pending_Receive_Quantity from deleted i; select @New_Rqty=i.Damage_Pending_Receive_Quantity from inserted i; select @Temp_result=CONVERT(int,@New_Rqty) - CONVERT(int,@Old_Rqty) ; select @Result_new=CONVERT(int,@Quantity ) + CONVERT(int,@Temp_result); BEGIN update dbo.Stock_TB SET Quantity =@Result_new WHERE Unit_Price=@Unit_Price AND SupplierId =@SupplierId AND ItemId=@ItemId; update dbo.Stock_TB SET Avalable_Stock_Qty =@Result_new WHERE Unit_Price=@Unit_Price AND SupplierId =@SupplierId AND ItemId=@ItemId;

END

 Items Selling (Invoicing)