Question: Project students name & id: 1 - 2 - 3 - 4 - 5 - Q 1 ) Create a complete project using SQL /
Project students name & id:Q Create a complete project using SQLPLSQL programing language to achieve the following requirement to develop point of sale system which allow the Employee to add customer invoice which contain hisher invoice information such as customer name, employee name who create this invoice which contain invoice date and total price with its related purchased items which contain quantity and price for each item in customer invoice.Follow these requirements Design database schema and create database user pointOfSal that contain database schema tables with its related relationships and database constraintsGrant the pointOfSal user all privileges that needed by database designer and developer to create database schemaThe system must contain tables such as categorycatNo catogeryName ; Employee employeeNoemployeeName,job ; branchNoName;ItemsitemNoItemName,Price,totalquantity, catNo; Itemsstorentryentryno number primary key,itemNo,entrydate quantity,employeeNo CustomercustomerNocostomerNamegender ; Invoice employeeNocustomerNo,total price invoiceNo,InvoiceDate,branchNo ;InvoiceDeatail contain List Of Purchase Items contain detail information related to the invoice invoiceNoItemNo, paidPrice, quantity create getItemTotalPrice function which to return quantitypaidPrice Create database package pointOfSal which contain the following Aprocedure to add new customer addCustmercustomerNamegenderwhich use validation method checkExistingCustomer using cursor to validate customer name if its not exists before, then add this new customer and generate the customer number automatically using database trigger.BMethod to add new Employee which use validation method checkExistingEmployee using cursor to validate Employee name if its not exists before, then add this Employee and generate the Employee number automatically using database trigger.Cprocedure to add new Category which use validation method checkExistingCategory using exception to validate category name if its not exists before, then add this category and generate the category number automatically using database trigger.Dprocedure to add new itemItemNamePrice,totalquantity, category name which use validation function checkExistingitem using exception to validate item name if its not exists before then add this category and generate the item number automatically using database trigger Note create method getCatgeoryNocategory name to return category number to be used when item is added this method will return if category name not exists and the procedure addItem will display message that one item record has been added or this category not exists or this item is exists before Eprocedure to add new branchy which use validation method checkExistingbranch using cursor to validate branch name if its not exists before then add this branch and generate the branch number automatically using database trigger Fprocedure to add newItemQuantatyitemNamenewquantaty this firstly check the existing of this item name using getItemNo and return item no if exists else it return then if its exists then it will add new entry to Itemsstorentry table to create new row with this itemname as new entry to store. Then increase the item totalquantity in the items table with new quantity then display message show the items new total quantity in the store else if this item not exists it will display the message no item has this name will be display Gprocedure to add new customer invoice addInvoicecustomernameemployeeName,branchName, invoicedate then the procedure will check from the exists of customername,employeeName,BranchName by calling there check existsing function for each name and if all of them are exists then a new record will be created with total price equel to zero and the invoceno will be generated using method getNextInvoiceNo which return the maximum then the method will display the message one record has been created with invoice No:show the generated invoiceNo her in this message else display a specific message that show the customer or employee or branch name doesnt exist please reenter correct names Hprocedure to add Invoice detail AddInvoiceDeatailinvoiceNoitemName,quantity This method start by validating the existing of the current invoiceNO by call function checkExistingInvoiceinvoiceNo so if this invoice exists then we will start checking the existing of item name by call getItemNoitemName which will return itemNo if the item name is exists else it will return if this item not exists in items then if exists we call getItemPriceitemNo function to return item price.After that if invoiceNo and ItemNO valid and exists before then the procedure will check the existsing if itemno of this invoiceNO not exists before by call checkExistingInvoiceIteminvoiceNoitemNo so this itemNo will be added to this invoiceNO in table InvoiceDeatail and the transaction related to adding this record as follow :New record contain invoiceNo with i itemNo,paidprice, and quantity it will be added to InvoiceDeatail table then The total price for this invoice it will be increased by using this formula quantity price related to current item then the total price of invoice it will be increase, after that the item total quantity in items table will be decrease for this itemNO related to this itemNO in InvoiceDeatail but if this itemNo exists before in this InvoiceNo then instead of insert new recorde with the new quantity in InvoiceDeatail table then the quantity it will be updated in for that item added before and the rest of logic related to increase the invoice total price and decrease item quantity from items table its the same scenario of added new items the system will display a message that one item :item name has been added successfully else the message will display there is no item has this name: parameter item name I.procedure to remove item from customer invoice removeInvoiceIteminvoiceNo itemName where this method will firstly call getItemNoitemNAme method which it will return item no if exists else it will return if not exists After that the procedure will call function checkExistingInvoiceIteminvoiceNoitemNo which will return exists if this item was sell in this invoice or not exists if not was sell. After that the procedure will call getitemInvoiceQuantityinvoiceNoitemNo getitemInvoicepaidpriceinvoiceNoitemNo for existing item in this invoice then this function it will return the quantity for this item was sell to customer in this invoice then the procedure will increase the totalquantity for this item in items table then it will decrease the total price related to this invoice by this formula total price total price quantitypricefinaly after make updates then the invoiceNo with its itemNo and its quantity and paid price it will be inserted in InvoiceDeataildeltedHistory table with deletion transaction date after that then the item invoice record it will be deleted from InvoiceDeatail table related to this invoice item and message one record deleted successfully will be display to the user create view invoiceMaster which contain InvoiceNo,Date,total Price,EmployeeName, customerName,branch name,customerNo employeeNo,branch nocreate view invoiceMasterDetail which contain InvoiceNo,item name,quantity,price,total price itemNocreate a procedure getCustomerInvoiceInfoinvoiceno where this procedure will firstly call chechExistingInvoice invoiceNo function if its exists then it will display the main information of this invoice will it will display invoice noinvoice data,total price,customer name,employee name,branch name as master information from invoiceMaster viewthen it will list all item information item name,quantity, price total price from invoiceDetail view related to this invoice apply transaction commit on each Stord proceduremake the database more secure by un allowed for any user to modifyapply dml invoice master and detail table on Friday and Saturday by using statement triggergenerate an xml file for all created invoices records read from invoice master viewgenerate an xml file contain all created in invoice records with its detail items create stord procedure AddCustomerListXMLcustomerList xml to read xml file related to customer information then this procedure will read xml flle to add each customer in xml file by call addCustmer procedure as that created in A optional
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
