views:

91

answers:

1

i want to design maker/ checker module in my project like if user A add new user so the another User B will approve or reject this adding. i want to know the best practices of design for this module in the database ....... any help

A: 

This sounds like business logic to me - hence your module? While there might be an element of database design in a good dolution that's not the main issue (you might want to re-tag the question with some other terms).

I would start by designing the module on paper: use UML (if you know it) to map out what the module needs to do, think about the different cases of use. A state diagram sounds like it'd be useful, maybe some sequence diagrams.

Once you understand all that the database part should be straight forward.

Are you building a database from stratch or adding to an existing system?

If it's part of an existing database you'll need to understand that, and leverage the existing data as much as appropriate.

The approval process you describe is basically a Workflow - have a look at some workflow related information for more ideas, but for a basic solution I imagine some sort of flag in teh newly created record, and links to the users who take action (adding the record, approving it, etc). You might also want to record all actions in a seperate 'audit' table of some kind. Best practice? - Ensure you maintain refentai integrity.

Adrian K