Got Stuck at a place in my project , need help to proceed

Basically I have  a section of complain registration , here user registers a complain and a mail is send to the admin , then admin performs some action and mail is received by the user , If a user is satisfied , the complain is closed by the admin else the user needs to update the complain, Now I want to have the complete history of how many times user updates and the action performed the admin.....So how can i store the complete history in my database and display it in the form of report...I have made two tables for it....

1) User_Complain
CREATE TABLE [dbo].[User_Complain] (
    [Complain_Id]   INT         IDENTITY (1, 1) NOT NULL,
    [Flat]          INT         NOT NULL,
    [Complain_Name] NCHAR (70)  NOT NULL,
    [Description]   NCHAR (100) NOT NULL,
    [Status]        NCHAR (50)  NOT NULL,
    [Date]          DATE        NOT NULL,
    [Time]          TIME (7)    NOT NULL

Open in new window

CREATE TABLE [dbo].[Admin_Action] (
    [Complain_Id]      INT         NOT NULL,
    [Flat]             INT         NOT NULL,
    [Complain_Name]    NCHAR (70)  NOT NULL,
    [Description]      NCHAR (100) NOT NULL,
    [Action_Performed] NCHAR (500) NOT NULL,
    [Status]           NCHAR (25)  NOT NULL,
    [Date]             DATE        NOT NULL,
    [Time]             TIME (7)    NOT NULL

Open in new window

Sukesh ShuklaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Well to help we will need an explanation of what you intend to use each variable in the tables for. I would also suggest that this could be done with one table tracking the complaint and its status itself and another table tracking the conversation between the users and admins and actions taken by the might even be possible to do everything with one single table...
Sukesh ShuklaAuthor Commented:

See, there is a unique complain id , them Flat is the Flat number then Complain_Name is for ex water related problem, Description gives the detailed explaination and action_Performed is the action performed by the admin and finally is the date and time ......
ok, I understand better now. this is for complaints to a building supervisor so they problems can be addresses and fixed. I mentioned you should restructure your tables and rethink your programming process logic. So how and where are you stuck?
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

Sukesh ShuklaAuthor Commented:
I'm basically struck at a point , as to how to store the complete conversation and how to display it in the form of reports
Ok, start by restructuring your tables to hold the information you need specific to each part of your problem. Store the complaint information in one table and the conversation about the complaint in the other. Their should be an ID reference from the conversation table to the complaint table. Then to run the report you simply pull the complaint you want to run a history of from the complain table and then once you know the complaint ID use it to retrieve only the conversation records that reference that ID.
Sukesh ShuklaAuthor Commented:
So can you please tell me how my complain table and conversation table should be designed ie what all columns should I use in them according to you ........So that data storage gets easier and not at all confusing.....
Now I'm not going to do all the work for you but I will tell you this. Keep you complaint table as is...just rename it from "user_complaint" to "complaints". The second table rename it "conversations" and eliminate the fields that are dublicates from the complaint table keeping only the complaint_id which references back to the complaint table and add fields for id (unique id per conversation record), users name, user type, comment, and action taken. reformat the tables and repost them and I'll let you know if you are close. then all you need to do is write the code to access the information in the tables to list the conversation history per complaint.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.