I am not sure if i understood your question correctly. I am assuming you want an idea on how to structure your tables for your service project.
It would actually depend on the requirements and what data is required.
Given the description of the project details one approach would be,
You can have a table with the list of all services something like
CREATE TABLE tblServiceList
(
ServiceID INT CONSTRAINT PK_tblServiceList PRIMARY KEY,
ServiceName VARCHAR(100)
)
Then you can have a table that holds a list of all the companies for which you take payments or provide other services to that company's customers.
CREATE TABLE tblCompanyList
(
CompanyID INT CONSTRAINT PK_tblCompanyList PRIMARY KEY,
CompanyName VARCHAR(100)
)
You may also need to track the status of a particular service (Like is the credit card payment forwarded to the bank etc). So you can have a table that will list all the statuses in your workflow.
CREATE TABLE tblBillStatus
(
BillStatusID INT CONSTRAINT PK_tblBillStatus PRIMARY KEY,
StatusDescription VARCHAR(50)
)
INSERT INTO tblBillStatus
SELECT 100, 'Payment received from Customer'
UNION
SELECT 101, 'Payment forwarded to company'
UNION
SELECT 102, 'Payment confirmed'
There will be another table to hold the service details requested. Here all the bill payments or any other service requested will be stored.
CREATE TABLE tblServiceDetail
(
ServiceDetailID INT CONSTRAINT PK_tblServiceDetail PRIMARY KEY,
CustomerName VARCHAR(100),
CompanyID INT NOT NULL CONSTRAINT FK_tblServiceDetail_tblCompanyList FOREIGN KEY REFERENCES tblCompanyList(CompanyID),
ServiceID INT NOT NULL CONSTRAINT FK_tblServiceDetail_tblServiceList FOREIGN KEY REFERENCES tblServiceList(ServiceID),
BillStatusID INT NOT NULL CONSTRAINT FK_tblServiceDetail_tblBillStatus FOREIGN KEY REFERENCES tblBillStatus(BillStatusID),
InvoiceNumber VARCHAR(50),
AccountNumber VARCHAR(50),
BillAmount DECIMAL(14,2),
DatePaid DATETIME,
DueDate DATETIME,
DatePaidToCompany DATETIME
)
This is just a sample approach. Your tables may have more columns based on the requirement (Example: You may want to store the company address and contact information in you company table). Also your tables may have to be structured differently depending on the client requirement.
Hope this helps you in getting an idea of how to design your tables.
Good luck :)