Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Business Processes and or Events

Author  Topic 

Sitka
Aged Yak Warrior

571 Posts

Posted - 2008-09-09 : 09:50:36
A lot of doing business is filling out forms, I've done lots of Design and applications for stuff like Sales Orders, PO's, Quotes Attendance/HR, Work Order/routings etc.
But I haven't really done one that involves business processes and or events other than "click here when complete". I think this design makes sense but I'm looking for a little confirmation on the domain of the processes and the event types making "sense". Quality/ISO type processes and work instructions kind of take this approach. Sign offs, double checking, scope of duty and reponsibility etc.

CREATE TABLE processes (
processID int IDENTITY (1, 1) NOT NULL ,
processname varchar (255) NULL ,
processdesc varchar (1024) NULL ,
processdiagram image NULL ,
CONSTRAINT PK_processes PRIMARY KEY CLUSTERED
(
processID
)
)
GO
EXAMPLE of the processname Domain Values
(PURCHASE ASSEMBLYXYZ, AQUIRE CUSTOMER APPROVAL FOR FIRST STAGEXYZ, DESIGN PART XYZ, ISSUE CAD FILES TO SHOP FLOOR, SHIP GOODS TO CUSTOMER, PAINT THE BATHROOMS)

CREATE TABLE eventtypes (
eventtypeID int IDENTITY (1, 1) NOT NULL ,
eventtype varchar (24) NULL ,
CONSTRAINT PK_eventypes PRIMARY KEY CLUSTERED
(
eventtypeID
)
)
GO
EXAMPLE of the eventtype Domain Values
(MEETING, BOOKING,WORKING,MILESTONE,CONCLUSION,BEGINING,TELECONFERENCE,AUDIT)

CREATE TABLE eventstatus (
eventstatusID int IDENTITY (1, 1) NOT NULL ,
eventstatusname varchar (24) NOT NULL ,
eventstatusdescription varchar (255) NULL ,
CONSTRAINT PK_eventstatus PRIMARY KEY CLUSTERED
(
eventstatusID
)
)
(WAITING ON CUSTOMER, READY FOR REVIEW, CUSTOMER REQUEST, CUSTOMER APPROVAL REQUIRED, RESLOVED, UNRESOLVED)




CREATE TABLE events (
eventID int IDENTITY (1, 1) NOT NULL ,
eventtypeID int NOT NULL ,
processID int NULL ,
sono char (6) NOT NULL ,
eventcreatedate datetime NOT NULL ,
communicationdate datetime NULL ,
eventdate datetime NOT NULL ,
eventstatusID int NULL ,
eventstatusdate datetime NULL ,
issuccess bit NULL ,
eventminutes text NULL ,
CONSTRAINT PK_events PRIMARY KEY CLUSTERED
(
eventID
),
CONSTRAINT FK_events_eventstatus FOREIGN KEY
(
eventstatusID
) REFERENCES eventstatus (
eventstatusID
),
CONSTRAINT FK_events_eventypes FOREIGN KEY
(
eventtypeID
) REFERENCES eventypes (
eventtypeID
),
CONSTRAINT FK_events_processes FOREIGN KEY
(
processID
) REFERENCES processes (
processID
)
)
GO


CREATE TABLE process_event (
processID int NOT NULL ,
eventID int NOT NULL ,
CONSTRAINT PK_process_event PRIMARY KEY CLUSTERED
(
processID,
eventID
),
CONSTRAINT FK_process_event_processes FOREIGN KEY
(
processID
) REFERENCES processes (
processID
),
CONSTRAINT FK_process_event_events FOREIGN KEY
(
eventID
) REFERENCES events(
eventID
)

)
GO







"it's definitely useless and maybe harmful".
   

- Advertisement -