Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CRUD matrix

Status
Not open for further replies.

kenndot

Programmer
May 15, 2001
316
US
Hi all,

Making a crud matrix in I guess the "traditional" format. So I need to determine what Foxpro keywords match up with the

CREATE
READ
UPDATE
DELETE

All I'm aware of as far as access to tables is NOUPDATE and SHARED and EXCLUSIVE. How do those translate?

EXCLUSIVE
C,R,U,D

SHARED
C,R,U,D ?

NOUPDATE
R

I'm not entirely sure about what I wrote, I was just trying to fill it in, can someone help me and tell me if I'm wrong about all that?
 
CREATE - APPEND BLANK or INSERT INTO (Record Creation)

READ - Bind the field to a control, GOTO, SEEK, LOCATE to the desired record.

UPDATE - Buffered, TABLEUPDATE, TABLEREVERT, SKIP, GOTO, LOCATE. Depends on the Buffering whether record pointer movement automagically saves the changes.

DELETE - DELETE (Use DELETED() to check status.)

More info, see the help.

Regards,

Mike
 
I am actually trying to take that just a bit further and translate the commands SHARED,EXCLUSIVE,NOUPDATE into CREATE,READ,UPDATE,DELETE

so then based on what you are saying the answer to my question is as follows?:

CREATE - anything that's opened with SHARED,EXCLUSIVE
READ - anything opened with SHARED,EXCLUSIVE,NOUPDATE
UPDATE - anything opened with SHARED,EXCLUSIVE
DELETE - anything opened with SHARED, EXCLUSIVE

 
Nope,

SHARED,EXCLUSIVE relates to them all (CRUD). SHARED is used in multi-user access to the data, along with buffering which takes care of most update conflicts. In a single user app USE'ing EXCLUSIVE simplifies and speeds up data access.

NOUPDATE would cause the data to be accessed ReadOnly.

Also be aware that some commands such as PACK and INDEX require EXCLUSIVE access.

More info in the help.

Regards,

Mike
 
Mike gave a pretty good list, but missed the SQL commands:

SELECT
UPDATE
DELETE
CREATE/ALTER

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports"
 
Indeed. Not to mention SPT etc. (I did get INSERT <g>)

However, my goal was to try to clarify SHARED - EXCLUSIVE. I did refer kenndot to the help (which is very good). Search on buffering.

Regards,

Mike
 
Hmmm...SPT is an interesting animal, as is CursorAdaptor and Views. You really don't create a table in any of them, but you create a "view" of the data...a temporary table. The SQL commands used by all of them are the SQL commands used by the underlying database, not VFP (unless of course you're talking about local views).

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports&quot;
 
CREATE - All operations involving creation of records as in APPEND BLANK; creation of new records in a Grid control; creation of your specified tables as in CREATE TABLE/DBF and SELECT INTO DBF (SQL command); creation of index files, etc.

READ - All operations involving any reference to the values of your table fields, record pointer operations, etc. For example:
Code:
MyVar = MyField

if MyField = "My Value"
  ....codes here
endif

locate for MyField = "Value"

select * from MyTable into cursor MyCursor

index on MyIndexKey tag MyTag
All field references through Grid controls, Textbox, and other controls wherein your fields is bound are considered READ operations.

UPDATE - All operations involving changes to field values such as the use of REPLACE command, DELETE, field updates using Grid, Textbox or other controls, REINDEXing of tables, use of ALTER TABLE command, etc.

DELETE - All delete operations like erasing table and index files, use of DELETE command, PACK, ZAP, record deletion using Grid controls, etc.

Opening tables with the USE command doesn't tell exactly which CRUD operations are involved. It's what you do with the table and the records that count.
 
thanks everyone, what everyone said was great and certainly true but not really what I meant to ask for. I don't think it came out the way I thought it did. I will try to think of a more clear way to post the question that I am trying to answer.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top