Cristian Alaniz - Daniel Hielpos
description
Transcript of Cristian Alaniz - Daniel Hielpos
![Page 1: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/1.jpg)
Cristian Alaniz - Daniel Hielpos
![Page 2: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/2.jpg)
Agenda
- Arquitectura
- Tipos de Objetos
- Lenguaje de Consulta
- Transacciones
- Backup y Recuperación
- Seguridad
![Page 3: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/3.jpg)
Arquitectura
- estructura lógica
- estructura física
- memorias
- procesos
- configuración
![Page 4: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/4.jpg)
Arquitectura (estructura lógica)
- esquemas
- bloques de datos
- extensiones
- segmentos
- tablespaces
![Page 5: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/5.jpg)
Arquitectura
Relación entre segmentos, extensiones y bloques
![Page 6: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/6.jpg)
Arquitectura (estructura física)
- datafiles
- redo logs
- control files
![Page 7: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/7.jpg)
Arquitectura (memorias)
- Area Global de Programa (PGA): es la zona de memoria de cada estado.No está compartida y contiene datos e información de ctrol de un único proceso. - Area Global de Sistema (SGA): Oracle guarda información sobre su estado. Disponible para todos los procesos.
![Page 8: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/8.jpg)
Arquitectura (procesos)
- el servidor se vale de una serie de
procesos que son el enlace entre las
estructuras físicas y la memoria
![Page 9: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/9.jpg)
Arquitectura
![Page 10: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/10.jpg)
Arquitectura (configuración)
- arranque / parada: suceden un cjto de
eventos que llevan a la BD por diferentes
estados
![Page 11: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/11.jpg)
Arquitectura (configuración - cont.)
- arranque
startup open
startup nomount
startup mount
![Page 12: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/12.jpg)
Arquitectura (configuración - cont.)
- parada
shutdown normal
shutdown inmediate
shutdown abort
![Page 13: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/13.jpg)
Tipos de objetos
- tipos de datos
- índices
- secuencia
![Page 14: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/14.jpg)
Tipos de Obj. (tipos de datos)- de caracteres
CharNchar y Nvarchar2Varchar y Varchar2Long
- Number- Date - Raw y Long Raw - Datos Lob
BlobClob y NclobBfile
- Rowid y Urowid
![Page 15: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/15.jpg)
Tipos de Obj. (triggers)- Partes
Evento o sentencia disparadoraRestricciónAcción
- TiposPor fila o por sentenciaBeforeAfterInstead of
![Page 16: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/16.jpg)
Tipos de Obj. (índices)- B-Tree
B-Tree clusterReverse keyDescendingIndex Organized Table
- Hush cluster- Bitmap- Bitmap join- Function based- Aplication Domain
![Page 17: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/17.jpg)
Tipos de Obj. (constraints)
- Not null
- Unique Key
- Primary Key
- Foreign Key
- Check
![Page 18: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/18.jpg)
Transacciones
- cuándo comieza ?, cuándo termina ?- atomicidad a nivel de sentencia- commit - rollback- savepoints- nombres- integridad referencial
![Page 19: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/19.jpg)
Transacciones (cuando comienza ?)
- Con la primer sentencia DDL/DML
- NO hay “begin transaction”
![Page 20: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/20.jpg)
Transacciones (cuando termina ?)
- Commit
- Rollback sin especificar savepoint
- Sentencia DDL
- El usuario se desconecta (commit)
- Fin anormal (rollback)
![Page 21: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/21.jpg)
Transacciones (atomicidad/sentencia)
- si falla sentencia no implica rollback de toda la transacción.
- savepoints implicitos entre sentencias DML.
![Page 22: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/22.jpg)
Transacciones (int. referencial)
- chequeo luego de sentencia
- posibilidad de diferir el chequeo (DDL)
![Page 23: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/23.jpg)
Transacciones distribuidas- transparencia de escritura
- database links
- two phase commit
- Restricciones :
- no commit por dblink
- no DDL por dblink
- no savepoints por dblink
![Page 24: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/24.jpg)
Transacciones autónomas
- pueden crearse dentro de otra.
- no afectan a su madre
- no ven trabajo sin confirmar de otras
- no en transacciones distribuidas
- “pragma autonomous transaction”
- ej: registro de intento de modificación
![Page 25: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/25.jpg)
Transacciones (niv. De aislamiento)
- Read uncommited
- Read commited (*) (default)
- Repeatable read
- Serializable (*)
- Read-only (propietario) (*)
![Page 26: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/26.jpg)
Transacciones (niv. De aislamiento)
- por transacción (SET TRANSACITION ISOLATION LEVEL ..)
- por sesión (ALTER SESSION SET ISOLATION LEVEL ..)
![Page 27: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/27.jpg)
Backup y recuperación
- Recovery manager
- Sistema operativo
- Export / Import
![Page 28: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/28.jpg)
Backup y recuperación (export / import)
- Multiplataforma: genera archivos binarios
- Import secuencial y lento: genera redo y
undo, reconstruir índices, recompilar, etc.
- Flexible: puedo elegir los objetos
![Page 29: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/29.jpg)
Backup y recuperación (recovery manager)
- Permite backups incrementales
- Independientes del S.O.
![Page 30: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/30.jpg)
Seguridad (autenticación)
- De usuarios (Igual método para todos o no.)- Por S.O.- Por la red (kerberos, clave pública, etc.)- Con la base de datos- Multicapa
- De administradores - Por S.O.- Con archivos de passwords
![Page 31: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/31.jpg)
Seguridad (privilegios)
- De sistema- Existen aprox. 60 diferentes- Ej: crear tablespaces
- De objetos de esquemas - clusters, triggers, indexes y dblinks,
requieren de sistema.
![Page 32: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/32.jpg)
Seguridad (privilegios)
Algunos DDLs pueden requerir privilegios
combinados. Ej: CREATE TRIGGER,
necesita privs sobre la tabla y para poder
crear triggers.
![Page 33: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/33.jpg)
Seguridad (roles)
- Agrupan privilegios
- Se pueden asignar a usuarios o a otros roles
- Es posible asignarles passwords
- Generalmente se corresponden con grupos
de usuarios o con aplicaciones.
- Pertenecen a la BD, no a un esquema.
![Page 34: Cristian Alaniz - Daniel Hielpos](https://reader036.fdocumento.com/reader036/viewer/2022062500/568152fa550346895dc11816/html5/thumbnails/34.jpg)
Seguridad (roles predefinidos)
- CONNECT
- RESOURCE
- DBA
- EXP_FULL_DATABASE
- IMP_FULL_DATABASE