LATEST UPDATE (ALREADY GRADED A+)
Use ALTER to
Add column
- Do not include the NOT NULL clause for new column
To drop column
- Some RDBMSs impose restrictions on thedeletion of an attribute
• View - AKA virtual table
• Systems Development Life Cycle (5 phases)
Planning, Analysis, Detailed System Design, Implementation, Maintenance
Planning Step
yields a general overview of the company and its objectives
Analysis Step
problems defined the planning phase are examined in the greater detail during the
analysis phase
Detailed System Design Step
in the detailed sys design phase, the designer completes the design of the
sys processes.
Implementation step
During the implementation phase, the hardware, DBMS software, and
application programs are installed, and database design is implemented.
Maintenance step
almost as soon as the sys is operational, end users begin to request changes in it.
Database Life Cycle (6)
Initial study> Database design > implementation & loading > testing and evaluation > operation
>maintenance & evolution
Database Design Steps (4)
Conceptual, DBMS selection, Logical, Physical
Database request:
is the equivalent of a single SQL statement in an application program or transaction
, - What is a transaction?
+ Logical unit of work
+ Maintains consistency
+ Most real-world database transactions are formed by two or more database requests
Transaction properties
each individual transaction must display atomicity, durability, etc.
Atomicity:
requires that all operations (SQL requests) of a transaction be completed; if not the
transaction is aborted.
Consistency:
indicates the permanence of the database's consistent state.
Isolation:
means that the data used during the execution of a transaction cannot be used by second transaction
until the first one is completed.
Durability:
ensures that once transaction changes are done and committed, they cannot be
undone or lost, even in the event of a system failure
Serializability:
ensures that the schedule for the concurrent execution of the transactions yields consistent results.
Transaction support is provided by two SQL statements:
COMMIT and ROLLBACK
Transaction sequence must continue until COMMIT statement is reached in which case
is which case all changes are permanently recorded within the database.
Transaction sequence must continue until ROLLBACK statement is reached in which case
in which case all changes are aborted and the database is rolled back to its previous consistent state.
Transaction sequence must continue until End of program is reached in which case
all changes are permanently recorded within the database. This action is equivalent to COMMIT
Transaction sequence must continue until Program is abnormally terminated in which case
the database changes are aborted and the database in rolled back to its previous consistent state. This
action is equivalent to ROLLBACK
- Transaction log stores: