Top Banner
MODULE 2 DATABASE INSTALLATION AND CONFIGURATION Section 3: Database Design 1 I T E C 4 5 0 F a l l 2 0 1 2
40

Module 2 Database Installation and Configuration

Feb 25, 2016

Download

Documents

dora

Module 2 Database Installation and Configuration. Section 3: Database Design. Phase Of Database Design. DB Design. Conceptual Database Design The process of constructing a model of the information used in an enterprise, independent of all physical considerations Logical Database Design - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Module 2  Database Installation and Configuration

ITEC 450

1

MODULE 2 DATABASE INSTALLATION AND CONFIGURATIONSection 3: Database Design

Fall 2012

Page 2: Module 2  Database Installation and Configuration

2

ITEC 450

PHASE OF DATABASE DESIGNFall 2012

Page 3: Module 2  Database Installation and Configuration

3

ITEC 450

DB DESIGN

Conceptual Database Design The process of constructing a model of the

information used in an enterprise, independent of all physical considerations

Logical Database Design The process of constructing a model of the

information used in an enterprise based on a specific data model, but independent of a particular DBMS and other physical considerations.

Physical Database Design The process of producing a description of the

implementation of the database on secondary storage; it describes the storage structures and access methods used to archieve efficient access to the data

Fall 2012

Page 4: Module 2  Database Installation and Configuration

4

ITEC 450

PHASE 2: CONCEPTUAL DB DESIGNDBMS-independent high-level data model Conceptual schema design

Characteristics: expressiveness, simplicity and understandability, minimalism, diagrammatic representation, formality

Approaches: centralized vs. view integration Outcome: E-R schema

Transaction design (application ) Technique: identify input/out and functional behavior Categories: retrieval, update, and mixed

Fall 2012

Page 5: Module 2  Database Installation and Configuration

5

ITEC 450

ENTITY RELATIONSHIP MODELSteps to create E-R model: Create entities Identify key attributes Relate each entity via relationships Add detailed attributes Define cardinality Verify all business operations

Fall 2012

Page 6: Module 2  Database Installation and Configuration

6

ITEC 450

ENTITY RELATIONSHIP MODEL

Entity TypesAn object or concept that is identified by the enterprise as having an independent existence

AttributesA property of an entity or a relationship type

Relationship TypesA meaningful association among entity types

Fall 2012

Page 7: Module 2  Database Installation and Configuration

7

ITEC 450

NORMALIZATION

Normalization A technique for producing a set of relations with desirable

properties, given the data requirements of an enterprise UNF is a table that contains one or more repeating groups

1NF is a relation in which the intersection of each row and column contains one and only one value

2NF is a relation that is in 1NF and every non-primary-key attribute is fully functionally dependent on the primary key.

3NF is a relation that is in 1NF, 2NF in which no non-primary-key attribute is transitively dependent on the primary key

BCNF is a relation in which every determinant is a candidate key

4NF is a relation that is in BCNF and contains no trivial multi-valued dependency

5NF is a relation that contains no join dependency

Fall 2012

Page 8: Module 2  Database Installation and Configuration

8

ITEC 450

PHASE 4: LOGICAL DB DESIGN System-independent mapping

From DBMS-independent EER to relational models Tailoring the schemas to a specific DBMS

Define data types Create specific constraints

Result of this phase: DDL statements that specify the conceptual and external level schemas (not physical design parameters yet)

Fall 2012

Page 9: Module 2  Database Installation and Configuration

9

ITEC 450CHARACTERISTICS OF RELATIONAL MODEL

Fall 2012

Page 10: Module 2  Database Installation and Configuration

10

ITEC 450

PHASE 5: PHYSICAL DB DESIGN Choosing specific storage structures

Storage configuration File organization

Designing access paths Indexing, clustering, and hashing

Criteria Response time Space utilization Transaction throughput

Fall 2012

Page 11: Module 2  Database Installation and Configuration

11

ITEC 450

PHYSICAL DESIGN PROCESSFall 2012

Attribute data typesPhysical record descriptions (doesn’t always match logical design)File organizationsIndexes and database architecturesQuery optimization

Leads to

DecisionsNormalized relationsVolume estimatesAttribute definitionsResponse time expectationsData security needsBackup/recovery needsIntegrity expectationsDBMS technology used

Inputs

Page 12: Module 2  Database Installation and Configuration

12

ITEC 450

FILE ORGANIZATION PRINCIPLES Fast data retrieval High throughput for I/O Efficient use of storage space Protection from failures or data loss Accommodating growth

Fall 2012

Page 13: Module 2  Database Installation and Configuration

13

ITEC 450

INDEXED FILE ORGANIZATIONS Index is a data structure used to

determine the location of rows in a file for quick retrieval

Indexing design: B-tree index – a keyed, treelike index structure Bitmap index – a separate string of zeros and ones

used for a column with a very small number of distinct values

Hash Index – a transformed key value using a hash algorithm

Fall 2012

Page 14: Module 2  Database Installation and Configuration

ITEC 450

14

MODULE 2 DATABASE INSTALLATION AND CONFIGURATIONSection 4: Oracle Database Creation

Fall 2012

Page 15: Module 2  Database Installation and Configuration

15

ITEC 450ASSIGNMENT 3-1-1: DO NOT CREATE A STARTER DATABASE DURING INSTALLATION

Fall 2012

Page 16: Module 2  Database Installation and Configuration

16

ITEC 450

ENTERPRISE EDITIONFall 2012

Page 17: Module 2  Database Installation and Configuration

17

ITEC 450

SUMMARY OF INSTALLATIONFall 2012

Page 18: Module 2  Database Installation and Configuration

18

ITEC 450

CREATING DATABASEFall 2012

Page 19: Module 2  Database Installation and Configuration

19

ITEC 450CREATING DATABASE

Fall 2012

Page 20: Module 2  Database Installation and Configuration

20

ITEC 450CREATING DATABASE

Fall 2012

Page 21: Module 2  Database Installation and Configuration

21

ITEC 450

DBCA CREATION DEMOFall 2012

Page 22: Module 2  Database Installation and Configuration

22

ITEC 450

CHOOSING CONFIGURATION

Important configuration tasks: Choose a database type

Transactional, data warehouse, or hybrid How should the database be managed?

OEM Grid Control or OEM Database Control Decide on the DBA authentication method Select a storage mechanism

OS, ASM, or raw devices Decide on the file management method

Specified or set using OMF Set the initial parameters (init.ora)

Fall 2012

Page 23: Module 2  Database Installation and Configuration

23

ITEC 450

DBA AUTHENTICATION METHODS

The DBA authentication method encompasses the method used to validate logon of users with the SYSDBA or SYSOPER role SYSDBA: ADMIN role and can CREATE DATABASE SYSOPER: has system privileges to start up, shut

down, and back up the database, and modify database components

Two authentication methods: OS authentication Password file authentication

Fall 2012

Page 24: Module 2  Database Installation and Configuration

24

ITEC 450OPERATING SYSTEM (OS)

AUTHENTICATION

User logs without specifying user name/password

To set up OS authentication, follow these steps:1. Create OS user for the DBA2. Unix only: Create an OSDBA group3. Optional: Create an OSOPER group4. Set the initialization parameter

REMOTE_LOGIN_PASSWORDFILE to NONE5. Assign OS user to OSDBA or OSOPER group6. Create Oracle user in DB with same name

To log on to SQL*Plus using OS authentication:sqlplus /nologCONNECT /@ORACLASS AS SYSDBA

Fall 2012

Page 25: Module 2  Database Installation and Configuration

25

ITEC 450

PASSWORD FILE AUTHENTICATION

Encrypted file contains user names and passwords

To set up password file authentication:Create a new password file (orapwd)

Windows: PWD<sid>.ORA, in ORACLE_HOME\database

Unix: orapw<sid>.ora, typically in ORACLE_HOME/dbs

1. REMOTE_LOGIN_PASSWORD FILE = EXCLUSIVE2. Log on to DB with SYSDBA privileges3. Create the new DBA user name if needed4. Grant SYSDBA or SYSOPER privilege to user

Fall 2012

Page 26: Module 2  Database Installation and Configuration

26

ITEC 450

INITIALIZATION PARAMETERSFall 2012

Page 27: Module 2  Database Installation and Configuration

27

ITEC 450

INITIALIZATION PARAMETERSFall 2012

Page 28: Module 2  Database Installation and Configuration

28

ITEC 450

INITIALIZATION PARAMETERSFall 2012

Page 29: Module 2  Database Installation and Configuration

29

ITEC 450

CREATING DATABASEFall 2012

To create a database you can use: Database Configuration Assistant (DBCA tool) CREATE DATABASE command

You can use the DBCA tool to generate scripts for creating a database manually You can use these scripts if you have multiple

consistent databases to create at different sites CREATE DATABASE gives you greater

flexibility but unnecessary complexity with settings You do need to be familiar with its syntax

Page 30: Module 2  Database Installation and Configuration

30

ITEC 450

DBCA – CHOOSE TEMPLATEFall 2012

Page 31: Module 2  Database Installation and Configuration

31

ITEC 450DBCA – NAME DATABASE

NOTE: FILL GLOBAL DATABASE NAME ONLY, SID WILL BE FILLED AUTOMATICALLY. YOU WILL USE A DIFFERENT SID FOR YOUR ASSIGNMENT. Fall 2012

Page 32: Module 2  Database Installation and Configuration

32

ITEC 450

DBCA – DBA PASSWORDSNOTE: HERE IS SYS AND SYSTEM PASSWORD DEFINED. Fall 2012

Page 33: Module 2  Database Installation and Configuration

33

ITEC 450

DBCA – ADD SAMPLE SCHEMASFall 2012

Page 34: Module 2  Database Installation and Configuration

34

ITEC 450DBCA – STORAGE

NOTE: HERE IS THE PLACE TO DELETE REDO LOG GROUP 3

Fall 2012

Page 35: Module 2  Database Installation and Configuration

35

ITEC 450

DBCA – CREATE DATABASEFall 2012

Page 36: Module 2  Database Installation and Configuration

36

ITEC 450

DBCA – DATABASE CREATEDFall 2012

Page 37: Module 2  Database Installation and Configuration

37

ITEC 450

PHYSICAL DATABASE STRUCTUREInitialization and Administration files under:

C:\app\Administrator\product\11.2.0\dbhome_1\admin\orcl450

Network files under: C:\app\Administrator\product\11.2.0\dbhome_1\

network\admin

Main types of files – data files, control files, redo log files.

Initialization files – init.ora, SPFILE Network files – tnsnames.ora, listener.ora Administration files – alert.log, trace files

Fall 2012

Page 38: Module 2  Database Installation and Configuration

38

ITEC 450STARTING AND STOPPING THE

INSTANCE AND DATABASE To shut down a running database using

SQL*Plus:1. Start a Command Prompt window (or shell)2. Start up SQL*Plus without logging: sqlplus

/nolog3. Connect as SYS with SYSDBA

CONNECT SYS/<password>@trial01 AS SYSDBA4. Type SHUTDOWN IMMEDIATE and press Enter

Database closed.Database dismounted.ORACLE instance shut down.

There are four options for SHUTDOWN: NORMAL, TRANSACTIONAL, IMMEDIATE, ABORT

Fall 2012

Page 39: Module 2  Database Installation and Configuration

39

ITEC 450STARTING AND STOPPING THE

INSTANCE AND DATABASE To start DB, change step 4 in previous slide:

STARTUP PFILE=ORACLE_BASE\admin\trial01\pfile\inittrial01.ora

PFILE parameter needed if you have not created the SPFILE

STARTUP options: NOMOUNT, MOUNT, OPEN, PFILE

Fall 2012

Page 40: Module 2  Database Installation and Configuration

40

ITEC 450

THE ALERT LOG AND TRACE FILES

The alert log is essential because it will contain all the essential information for the smooth running of your database All critical errors will be written to the alert log

Trace files contain more detailed log and tracing information about general processing Trace files can be used to track down problems

not causing critical failures, generally using special tools E.g. , TKPROF

Note: Some of the slides are from Oracle 10g Database Administrator: Implementation and Administration by Gavin Powell and Carol McCullough-Dieter

Fall 2012