OK, I've been putting off posting this question for some time now because I know that if I were to ask it to anyone on the list individually, the answer would be "Well yeah, if you paid me to come in as a consultant I'd answer your question".  But I woke up this morning realizing that everyone is on the list to learn and teach, so let me share with you what I'm struggling with.

And an answer like "go read Head First Design Patterns" is perfectly acceptable.

 

My company has customers, employees and vendors.  How would you model this in the OO world?

If a customer were to (in essence) SELECT * FROM Orders, it's an implication that what they are really wanting is:

SELECT * FROM Orders WHERE CustomerID = myCustomerID

 

If a vendor were to SELECT * FROM Orders, it's an implication that what they are really wanting is:

SELECT * FROM Orders

INNER JOIN OrderDetail

INNER JOIN Item

WHERE Item.VendorNo = myVendorNo

 

If an employee were to SELECT * FROM Orders, it should SELECT * FROM Orders.

 

Question 2:

It seems to me that the OO design should be very closely aligned to security (or at least filtering) – who can see what.

Example: if an employee goes on vacation, a fellow employee needs to assume the others' responsibilities without logging in as them.  So they need to assume the other persons' rights.

 

Keeping cfcomponent in mind, how would one model this (kind of common) data model in a SQL database?

 

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to