LOGICAL DATABASE DESIGN

5.1 Introduction


Logical design describes the detail specification for the proposed system. We can say that it describes its own features. Input output tables and database in a manner that meets the project needs. In logical design work with users is done to develop general system design, choose best design, develop system flowcharts, identify hardware, software and personal needs and revise estimates etc.

5.2 Entity Relationship Model [4]


The entity relationship model is a tool for analyzing the semantic feature of an application that is independent of events. Entity-relationship modeling helps reduce data redundancy. This approach includes a graphical notation, which depicts entity classes as rectangles, relationships as diamonds and attributes as ovals. For example situations a partial entity relationship diagram may be used to present a summary of the entities and relationships but not include the details of the attributes.

5.3 Entity Relationship Diagram


The entity relationship diagram provides a convenient method for visualizing the inter-relationship among entities in a given application. This tool has proven useful in making the transition from an information application description to a formal database schema. The entity relationship model is used for describing the conceptual scheme of an enterprise without attention to the efficiency of the physical database design. The entity relationship diagrams are later turned into a conceptual schema in one of the other models in which the database is actually implemented.

Following are shapes which are used in ERD.

5.4 Entity


Anything that produces or consumes information is called entity. The representation of any composite information that must be understood by software is called data

object, by composite information we mean something that has a number of different properties or attributes.

We have used the following entities in our project.

  1. Tbl_BUSINESS
  2. Tbl_LOGIN
  3. Tbl_CATEGORY
  4. Tbl_PRODUCT
  5. Tbl_CUSTOMER
  6. Tbl_SALE
  7. Tbl_SALEDETAIL
  8. Tbl_SALEPAYMENT
  9. Tbl_SUPPLIER
  10. Tbl_SUPPLY
  11. Tbl_SUPPLYDETAIL
  12. Tbl_SUPPLYPAYMENT
  13. Tbl_SALEORDER
  14. Tbl_SALEORDERDETAIL
  15. Tbl_EXPENSES                                            
  16. Tbl_EXPENSESTYPE
  17. Tbl_EXPENSESDETAIL
  18. Tbl_SETTING
  19. Tbl_CUSTOMERINFORM
  20. Tbl_RECEIPT                      

5.5 Description of Entities


Business
Id
1. Business


Fig 5.1 Entity “BUSINESS” with Attributes.

BUSINESS
Business Name
logo
email
address
contectNo
 


 


 


 


 



In Business Entity(Table) Store all the Business Basic Information e.g Business Name , Contact no, Address, email , logo. From this Entity the Business Name, Address, ContectNo, Email, Logo are show in the Top of Every Report.


userId
2. Login


Fig 5.2 Entity “LOGIN” with Attributes.

LOGIN
businessId
password
name
userImage
userName
pincode
 


 


 


 


 



In login Entity(Table) store all the basic information of authorize user are UserName , Name , password , Pincode. Through Pincode Attribute user Recover our Password and also update our Profile means userImage , Username  , password , etc.


 


categoryId
3.Category


CATEGORY
businessId
Category
Name
description
userId
 


 


 


 



Fig 5.3 Entity “CATEGORY” with Attributes.

 


Category Entity(Table) store the Stock Category and category description. We Take Stock Catalog in Order of Category Name. Category Table show our stock View and also provide stock filtration feature in Sale Supply37 App. If you want to add New Product, we must be Enter the Product Category, then we add some related product of selected Category.


productId
4. Product


PRODUCT

Fig 5.4 Entity “PRODUCT” with Attributes.

userId
quantity
Status
unitPrice
Product
Name
categoryId
 


 


 


 


 



Product Entity have some Attributes like Product Name,  UnitPrice , Quantity and Status. In Product Entity(Table) is store our Product Detail. Means in Sale Supply37 if user add new Product then user must be select Category Name and then Enter Product Detail because many Product in one Category but not many Category in One Product. Relation between these two Entity or One to many. Through these two table we categories the existing Business Stock.  


customerId
5. Customer


CUSTOMER

Fig 5.5 Entity “CUSTOMER” with Attributes.

userId
Company
CNIC
area
Customer
Name
businessId
Contact No
email
address
 


 


 


 


 



In Customer Entity(table) store our existing Business customer Information(means customer name, area , CNIC  and so on). If you want to take print of our Customer information then simply print this Entity(Table) existing data. It generate each or every customer unique ID(customerId) if you want to search our customer so through this ID you can search. This ID is also available on every Customer List in SaleSupply37. 


6. Sale


SALE

Fig 5.6 Entity “SALE” with Attributes.

userId
saleId
description
saleAmount
saleDate
businessId
customerId
 


 


 


 


 



In Sale Entity(Table) store our Existing Business Sale Information(means our sale Sale Amount, Sale Date and so on). In Sale Supply37 user Interface are available our Sale Invoice Reports. If you want to Print Existing Sale Info then you use of Sale Invoice No(Sale Id). if you want to Print Whole Sale Catalog then select whole Data of this SALE Entity. 

7. Sale Detail


SALE DETAIL

Fig 5.7 Entity “SALE DETAIL” with Attributes.

 

saleId
saleDetailId
Sold
Quantity
salePrice
productId
 


 


 


 


 


 



In Sale Detail Entity(Table) store our Sales Sale_Detail means how many product are sale on existing Customer and also store Existing Product Sale_Price, Sold_Quantity.  


Sale
PaymentId
8. Sale Payment


SALE
PAYMENT

Fig 5.8 Entity “SALE PAYMENT” with Attributes.

userId
Description
isCurrent
Balance
Amount
customerId
businessId
paidAmount
paidDate
 


 


 


 


 



In Sale Payment Entity(Table) are store Customer Payment Detail. In Balance Amount store our customer Balance record, paidAmount attribute show padding amount, iscurrent show previous amount and paidDate attributes show date of customer Payment.




9. Supplier


SUPPLIER

Fig 5.9 Entity “SUPPLIER” with Attributes.

businessId
supplierId
address
contectNo
Supplier
Name

userId
 


 


 


 


 



In Supplier Entity(table) store our existing Business Supplier Information(means Supplier name, Address , contactNo  and so on). If you want to take print of our Supplier information then simply print this Entity(Table) existing data. It generate each or every Supplier unique ID(customerId) if you want to search our Supplier so through this ID you can search. This ID is also available on every Supplier List/Supplier Invoice in SaleSupply37. 


10. Supply


SUPPLY

Fig 5.10 Entity “SUPPLY” with Attributes.

userId
supplyId
description
Supply
Amount
supplyDate
businessId
supplierId
 


 


 


 


 



In Supply Entity(Table) store our Existing Business Supply Information(means our Supply Supply Amount, Supply Date and so on). In Sale Supply37 user Interface are available our Supply Invoice Reports. If you want to Print Existing Supply Info then you use of Supply Invoice No(Sale Id). if you want to Print Whole Supply Catalog then select whole Data of this SUPPLY Entity. 

11. Supply Detail


Fig 5.11 Entity “SUPPLY DETAIL” with Attributes.

SUPPLY
DETAIL
supplyId
Supply
DetailId
purchase
Quantity
purchase Price
productId
 


 


 


 



 


In Supply Detail Entity(Table) store our Supply’s Supply_Detail means how many product are purchase on existing supplier and also store Existing Product Purchase_Price, Purchase_Quantity. 




supply
PaymentId
12. Supply Payment


SUPPLY PAYMENT

Fig 5.12 Entity “SUPPLY PAYMENT” with Attributes.

userId
Description
isCurrent
Balance
Amount
supplierId
businessId
paidAmount
paidDate
 


 


 


 


 



In Supply Payment Entity(Table) are store Supplier Payment Detail. In Balance Amount store our Supplier Balance record, paidAmount attribute show padding amount, iscurrent show previous amount and paidDate attributes show date of Supplier Payment.


 




13. Sale Order


SALE ORDER

Fig 5.13 Entity “SUPPLY PAYMENT” with Attributes.

 

userId
salesOrder
Id
description
Order
Amount
orderDate
customerId
businessId
 


 


 


 


 



In Sale Order Entity store our customer Sale Order Record. It store Sale Order Date , Order Amount  and so on. Through this entity you take our Sale-Order’s Print Catalog and also it show Daily, weekly, monthly report.


14. Sale Order Detail


SALE ORDER DETAIL

Fig 5.14 Entity “SALE ORDER DETAIL ” with Attributes.

saleOrderId
salesOrder
ItemId
order
Quantity
unitPrice
productId
 


 


 


 


 



In Sale-Order-Detail Entity(Table) store Order Detail of Customer means Product Quantity, product Sale Unit Price. In Sale Order Invoice product Detail are retrieve from Sale Order Detail.


 


 


15. Expenses Type


EXPENSES TYPE

Fig 5.15 Entity “EXPENSES TYPE” with Attributes.

 

businessId
Expenses TypeId
description
Expense Type
userId
 


 


 


 


 



In Expense Type Entity(Table) store our category of Expenses means Daily Expenses, Weekly bases Expenses, Monthly and Yearly bases Expenses. It use like Category Entity through this entity it categories our Business Expenses.




16. Expenses


EXPENSES

Fig 5.16 Entity “EXPENSES” with Attributes

userId
expensesId
description
Expense
Date
Total
Amount
BusinessId
Source
 


 


 


 


 



In Expenses Entity(Table) store Expenses Information of our Business means expenses source , expenses date , and Total Amount of Expenses. If user want to print weekly Report of expenses so it take from Expenses Table. This feature are available in Sale Supply37. 




17.  Expenses Detail


EXPENSES DETAIL

Fig 5.17 Entity “EXPENSES DETAIL” with Attributes

userId
Expenses DetailId
Amount
Quantity
expenseId
BusinessId
Expenses TypeId
unitPrice
 


 


 


 





In Expenses-Detail Entity(Table) store Expenses Detail of our Business means Expenses Type(Daily, Weekly, Monthly and so on), Quantity, Unit Price. You can also take our Custom Report or Categories Report of Expenses from this table and also take Daily, weekly, monthly and yearly expenses report.


18. Setting


SETTING

Fig 5.18 Entity “SETTING” with Attributes

userId
settingId
Invoice
Quantity
BusinessId
service
 


 


 


 





In Setting Entity(Table) store Sale Supply37 App Default setting Information and also store user or custom setting. From this setting user send customer, supplier invoice’s to our customer and supplier. If user want to set custom setting then select on Setting Module in Sale Supply37 App and then goes to “Sales Order” Tree –view-Item and set our custom/user setting. Quantity Attribute is use for Stock Low Report.Quantity Value is low level of stock.

19. Customer Inform


CUSTOMER INFORM

Fig 5.19 Entity “CUSTOMER INFORM” with Attributes

userId
userInform Id
Password
userName
email
BusinessId
smtpServer
 


 


 


 





In Customer-Inform Entity(Table) store our Business Email which is use for sending of invoice’s. In SmtpServer Attribute store our Email Server (for example(Gmail Server is smpt.gmail.com, Yahoo is smpt.yahoo.com), Email or UserName Attribute store our actual Email Address,  Password attribute store our email password.

20. Receipt


RECEIPT

Fig 5.20 Entity “RECEIPT” with Attributes

customer
receiptId
receiptDate
payment
 


 


 


 





In Receipt Entity(Table) store our customer Payment Receipt Record means store payment (Amount) and receipt date. If customer visit company and want to print my payment record so then Sale Supply37 System check customer payment Record in this entity, if found then retrieve the information of payment in the form of report and then user take print.






5.7 User Use Case


Store


 Diagram:




Fig 5.11 User Use Case Diagram





49




Sigin









Customer




Customer Histoy




Reports




Print Reports




Delete




Update




Sale




Add Expenses




User Sign in





Customer




Customer Histoy




Update




Supply




Delete




Store




Supplier




Supplier Histoy




Update




Create Custom Report




Stock




Add Category




Add Product




Expenses




Delete




Store




Update




Create Custom Report




No comments:

Post a Comment