Академический Документы
Профессиональный Документы
Культура Документы
What is a Database ?
‘Is a repository for stored data’ - C.J.Date
• Hierarchical Model
• Network Model
• Relational Model
• Object-Oriented Model
• NETWORK
• Does not distinguish between parent and child. Any
record type can be assocaited with any number of
arbitrary record types
• Enhanced to overcome limitations of Network
model but in reality, there is minimal diffeence due
to frequent enhancements
• RELATIONAL
• Data stored in table in the form of tables and rows.
• Examples - DB2, Oracle, Sybase, Ingres etc
INSERT :
- Refer handout
- Mullins, chapter 2
• Column Definition
• Format : CREATE TABLE TABLENAME (Column
Definitions)
• PRIMARY KEY(Columns) / FOREIGN KEY
*
• UNIQUE (Colname) (referential constraint)
Can be used in
• ‘INTO’ CLAUSE OF SELECT & FETCH
STATEMENTS
• AS INPUT OF ‘SET’ CLAUSE OF UPDATE STMTS
• AS INPUT FOR THE ‘VALUES’ CLAUSE OF
INSERT STATEMENT
• IN WHERE CLAUSE OF SELECT, INSERT,
UPDATE & DELETE
• AS LITERALS IN SELECT LIST OF A SELECT
STATEMENT
CTS-PAC Version 1.1 103
Example
• Format of GRANT :
GRANT SELECT, UPDATE(NAME,NO)
ON TABLE EMPL
TO A, B, C(or PUBLIC);
GRANT ALL ON EMPL TO PUBLIC;
GRANT EXECUTE ON PLAN PLANA TO USER;
• DB2 UTILITIES
• CHECK
• COPY, MERGECOPY
• RECOVER
• LOAD
• REORG, RUNSTATS
• EXPLAIN
• LOCKING SERVICES :
These are provided by an MVS subsystem called the
IMS resource Lock Manager(IRLM).
It is used to control concurrent access DB2 data,
regardless of whether IMS is present in a system or not.