conducting the oracle job interview it manager guide for oracle0.ppt

99
 Database Management Systems & Programming Database Management Systems & Programming Faculty of Information & Media Studies Faculty of Information & Media Studies Summer 2000 Summer 2000 LIS 558 - Week 2 Entity Relationship Modeling I

Upload: tariqbashir

Post on 07-Jul-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 1/99

Database Management Systems & ProgrammingDatabase Management Systems & Programming

Faculty of Information & Media StudiesFaculty of Information & Media StudiesSummer 2000Summer 2000

LIS 558 - Week 2Entity Relationship Modeling I

Page 2: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 2/99

Class Outline Class Outline

Database ModelsDatabase ModelsDatabase Design ProblemsDatabase Design Problems

Conceptual Design MethodologyConceptual Design Methodologyrea!rea!

Purpose of Data ModelingPurpose of Data Modeling"ntity#$elationship Design"ntity#$elationship Design"#$ %erminology"#$ %erminology"ntity#$elationship Method " amples"ntity#$elationship Method " amples

Page 3: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 3/99

Database Models Database Models

' data model is the relati(ely simple representation)' data model is the relati(ely simple representation)usually graphic) of comple real#*orld data structures+usually graphic) of comple real#*orld data structures+It represents data structures and their characteristics)It represents data structures and their characteristics)relations) constraints) and transformations+relations) constraints) and transformations+

%he database designer usually employs data models as%he database designer usually employs data models ascommunications tools to facilitate the interaction amongcommunications tools to facilitate the interaction amongthe designer) the applications programmer) and the endthe designer) the applications programmer) and the enduser+user+

' good database is the foundation for good applications+' good database is the foundation for good applications+

Page 4: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 4/99

Database Models Database Models

%*o Categories of Database Models%*o Categories of Database Models, Conceptual models Conce

ptual models focus on the logical naturefocus on the logical natureof the data representation+ %hey areof the data representation+ %hey areconcerned *ithconcerned *ith *hat *hat is represented ratheris represented ratherthanthan ho* ho* it is represented+it is represented+

, Implementation models Im

plementation models place the emphasisplace the emphasisonon ho* ho* the data are represented in thethe data are represented in thedatabase or ondatabase or on ho* ho* the data structures arethe data structures areimplemented+implemented+

Page 5: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 5/99

Database Models Database Models

%hree %ypes of Implementation%hree %ypes of ImplementationDatabase ModelsDatabase Models

, Hierarchical database modelHierarchical database model

, et!ork database modelet!ork database model

, Relational database modelRelational database model

Page 6: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 6/99

' -ierarchical Structure' -ierarchical Structure

Page 7: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 7/99

Database Models Database Models

-ierarchical Database Model-ierarchical Database Model, "asic Str#ct#re"asic Str#ct#re

. Collection of records logically organi/ed toCollection of records logically organi/ed toconform to the upside#do*n tree hierarchical1conform to the upside#do*n tree hierarchical1structure+structure+

. %he top layer is percei(ed as the parent of the%he top layer is percei(ed as the parent of thesegment directly beneath it+segment directly beneath it+

. %he segments belo* other segments are the%he segments belo* other segments are thechildren of the segment abo(e them+children of the segment abo(e them+

. ' tree structure is represented as a hierarchical' tree structure is represented as a hierarchicalpath on the computer s storage media+path on the computer s storage media+

Page 8: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 8/99

Database Models Database Models

-ierarchical Database Model-ierarchical Database Model, $d%antages$d%antages

. Conceptual simplicityConceptual simplicity

. Database securityDatabase security

. Data independenceData independence

. Database integrityDatabase integrity

. "fficiency dealing *ith a large database"fficiency dealing *ith a large database

, &isad%antages&isad%antages. Comple implementationComple implementation. Difficult to manageDifficult to manage. 3ac!s structural independence3ac!s structural independence. 'pplications programming and use comple ity'pplications programming and use comple ity. Implementation limitationsImplementation limitations. 3ac! of standards3ac! of standards

Page 9: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 9/99

Database Models Database Models

4et*or! Database Model4et*or! Database Model, "asic Str#ct#re"asic Str#ct#re

. SetSet ## ' relationship is called a set+ "ach set is## ' relationship is called a set+ "ach set iscomposed of at least t*o record types5 an o*nercomposed of at least t*o record types5 an o*nerparent1 record and a member child1 record+parent1 record and a member child1 record+

. ' set is represents a 65M relationship bet*een the' set is represents a 65M relationship bet*een theo*ner and the member+o*ner and the member+

Page 10: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 10/99

' 4et*or! Database Model' 4et*or! Database Model

Page 11: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 11/99

Database Models Database Models

4et*or! Database Model4et*or! Database Model, $d%antages$d%antages

. Conceptual simplicityConceptual simplicity

. -andles more relationship types-andles more relationship types. Data access fle ibilityData access fle ibility

. Promotes database integrityPromotes database integrity

. Data independenceData independence

. Conformance to standardsConformance to standards, &isad%antages&isad%antages

. System comple itySystem comple ity

. 3ac! of structural independencem3ac! of structural independencem

Page 12: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 12/99

"(olution of Conceptual Data Models"(olution of Conceptual Data Models

Page 13: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 13/99

%he "(olution of Conceptual Data Models %he "(olution of Conceptual Data Models

Common characteristics re7uired forCommon characteristics re7uired fordata models5data models5, ' data model must sho* some degree of' data model must sho* some degree of

conceptual simplicity *ithout compromisingconceptual simplicity *ithout compromisingthe semantic completeness+the semantic completeness+, ' data model must represent the real' data model must represent the real

*orld as closely as possible+*orld as closely as possible+

, %he representation of the real#*orld%he representation of the real#*orldtransformations beha(ior1 must be intransformations beha(ior1 must be incompliance *ith the consistency andcompliance *ith the consistency andintegrity characteristics of any dataintegrity characteristics of any data

model+model+

Page 14: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 14/99

Database Models Database Models

$elational database$elational database, Codd) "+F+ 68901+ ' relational model for largeCodd) "+F+ 68901+ ' relational model for large

shared data ban!s+shared data ban!s+ C'CM C'CM ) 6: ;1) :99#<9+) 6: ;1) :99#<9+. First relational prototype # I M sFirst relational prototype # I M s system=$ system=$ . Other (ariants) e+g+) I4>$"S # ?C) er!eleyOther (ariants) e+g+) I4>$"S # ?C) er!eley. 68<: I M released D 268<: I M released D 2

$elational databases re7uired considerable$elational databases re7uired considerable

computing resources not feasible until mid#computing resources not feasible until mid#68<0s168<0s1

. lo* end 'ccess) Parado ) d ase) Fo Pro) Clipper1lo* end 'ccess) Parado ) d ase) Fo Pro) Clipper1

. high end D 2) Oracle) Sybase) Informi ) I4>$"Shigh end D 2) Oracle) Sybase) Informi ) I4>$"Scommercial1commercial1

Page 15: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 15/99

$elational Database defined5$elational Database defined5, 3ogical database model that treats data as if they are3ogical database model that treats data as if they are

stored in separate t*o#dimensional but related tablesstored in separate t*o#dimensional but related tables

, "ach table consists of data elements describing a"ach table consists of data elements describing acommon theme among *hich is one or more1 elementscommon theme among *hich is one or more1 elementsthat uni7uely describes each record in the tablethat uni7uely describes each record in the table

, %ables are related as long as t*o tables share a%ables are related as long as t*o tables share acommon data elementcommon data element

, Information in these tables cam be combined on an as#Information in these tables cam be combined on an as#needed basis to get ans*ers to 7ueries and generateneeded basis to get ans*ers to 7ueries and generatecomple reportscomple reports

Database Models Database Models

Page 16: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 16/99

'd(antages'd(antages, Mechanisms for minimi/ing data redundancy and inconsistencyMechanisms for minimi/ing data redundancy and inconsistency, 3ogical database design is separated from physical aspects3ogical database design is separated from physical aspects, $elati(ely program#data independent$elati(ely program#data independent, Management of data for access) manipulation) and securityManagement of data for access) manipulation) and security, Fle ible mechanisms for generating reports and 7ueriesFle ible mechanisms for generating reports and 7ueries, Program de(elopment and maintenance costs are reducedProgram de(elopment and maintenance costs are reduced, Data can be accessed in a multiplicity of *ays *ithin andData can be accessed in a multiplicity of *ays *ithin and

amongst organi/ationsamongst organi/ations

Disad(antagesDisad(antages, "ase of use # many untrained people create and use databases"ase of use # many untrained people create and use databases

*ithout considering its design # usually incorporate many*ithout considering its design # usually incorporate manyerrorserrors

, Processing resources re7uiredProcessing resources re7uired

Database Models Database Models

ut @6 problem is stillut @6 problem is stilldata redundancy and inconsistencyAdata redundancy and inconsistencyA

Page 17: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 17/99

%he $elational Database Model %he $elational Database Model

Agents

Clients Entertainers

EngagementsEntertainer styles

, represented by tables li!e spreadsheets1represented by tables li!e spreadsheets1, tables are lin!ed *ith soft*are pointerstables are lin!ed *ith soft*are pointers, unli!e earlier systems) all three types of relationships can beunli!e earlier systems) all three types of relationships can be

representedrepresented, accommodates the design of larger databases that in(ol(eaccommodates the design of larger databases that in(ol(e

comple relationships and intricate manipulationscomple relationships and intricate manipulations

Instruments

Page 18: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 18/99

3in!ing $elational %ables3in!ing $elational %ables

Page 19: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 19/99

Database Models Database Models

"ntity#$elationship Data Model"ntity#$elationship Data Model, It is one of the most *idely acceptedIt is one of the most *idely accepted

graphical data modeling tools+graphical data modeling tools+

, It graphically represents data as entitiesIt graphically represents data as entitiesand their relationships in a databaseand their relationships in a databasestructure+structure+

, It complements the relational data modelIt complements the relational data modelconcepts+concepts+

Page 20: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 20/99

Database Models Database Models

"#$ model is commonly used to5"#$ model is commonly used to5, %ranslate different (ie*s of data among%ranslate different (ie*s of data among

managers) users) and programmers to fitmanagers) users) and programmers to fitinto a common frame*or!+into a common frame*or!+

, Define data processing and constraintDefine data processing and constraintre7uirements to help us meet there7uirements to help us meet thedifferent (ie*s+different (ie*s+

, -elp implement the database+-elp implement the database+

Page 21: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 21/99

Database Models Database Models

"ntity $elationship Data Model"ntity $elationship Data Model, "asic Str#ct#re"asic Str#ct#re

. "#$ models are normally represented in an"#$ models are normally represented in an

entity relationship diagram entity relationship diagram ER&ER&1+1+. 'n'n entity entity is represented by a rectangle+is represented by a rectangle+. "ach entity is described by a set of attributes+"ach entity is described by a set of attributes+

'n'n attribute attribute describes a particulardescribes a particularcharacteristics of the entity+characteristics of the entity+

. '' relationship relationship is represented by a diamondis represented by a diamondconnected to the related entities+connected to the related entities+

Page 22: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 22/99

Database Models Database Models

%hree %ypes of $elationships%hree %ypes of $elationships, 'ne-to-many relationships ()*M+'ne-to-many relationships ()*M+

. ' painter paints many different paintings) but each one' painter paints many different paintings) but each oneof them is painted by only that painter+of them is painted by only that painter+

, P'I4%"$ 61 paints P'I4%I4> M1P'I4%"$ 61 paints P'I4%I4> M1

, Many-to-many relationships (M* +Many-to-many relationships (M* +. 'n employee might learn many Bob s!ills) and each Bob'n employee might learn many Bob s!ills) and each Bob

s!ill might be learned by many employees+s!ill might be learned by many employees+, "MP3O "" M1 learns S I33 41"MP3O "" M1 learns S I33 41

, 'ne-to-one relationships ()*)+'ne-to-one relationships ()*)+. "ach store is managed by a single employee and each"ach store is managed by a single employee and each

store manager employee1 only manages a single store+store manager employee1 only manages a single store+, "MP3O "" 61 manages S%O$" 61"MP3O "" 61 manages S%O$" 61

Page 23: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 23/99

$elationship Depiction5 %he "$D$elationship Depiction5 %he "$D

Page 24: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 24/99

Database Models Database Models

"ntity#$elationship Data Model"ntity#$elationship Data Model, $d%antages$d%antages

. " ceptional conceptual simplicity" ceptional conceptual simplicity

. Eisual representationEisual representation

. "ffecti(e communication tool"ffecti(e communication tool

. Integrated *ith the relational database modelIntegrated *ith the relational database model

, &isad%antages&isad%antages. 3imited constraint representation3imited constraint representation. 3imited relationship representation3imited relationship representation. 4o data manipulation language4o data manipulation language

. 3oss of information content3oss of information content

Page 25: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 25/99

Introduction to Database Design Introduction to Database Design

Database schema defines database s structure)Database schema defines database s structure)tables) relationships) domains) and constraint rulestables) relationships) domains) and constraint rules,ables,ables, OO IS 4) %itle) 'uthID) PubID) Price1OO IS 4) %itle) 'uthID) PubID) Price1

, P? 3IS-"$ PubID) Pub4ame) PubPhone1P? 3IS-"$ PubID) Pub4ame) PubPhone1, '?%-O$ 'uthID) 'uth4ame) 'uthPhone1'?%-O$ 'uthID) 'uth4ame) 'uthPhone1RelationshipsRelationships, "ach boo! is published by one and only one publisher"ach boo! is published by one and only one publisher, "ach publisher publishes one or more boo!s"ach publisher publishes one or more boo!s

&omains (set o %al#es in a col#mn+&omains (set o %al#es in a col#mn+, Physical description e+g+) set of integers 0 888881Physical description e+g+) set of integers 0 888881

.onstraints (b#siness r#les+.onstraints (b#siness r#les+, Price cannot be less than /eroG 'uthor phone field cannotPrice cannot be less than /eroG 'uthor phone field cannot

be left blan!be left blan!

Page 26: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 26/99

%ables hold the data%ables hold the dataDatabase design is the process of separatingDatabase design is the process of separatinginformation into multiple tables that areinformation into multiple tables that arerelated to each otherrelated to each otherSingle table designs *or! only for theSingle table designs *or! only for thesimplest of situationssimplest of situations'nomalies 'nomalies often arise in single table designsoften arise in single table designsas a result of inserting) deleting) or updatingas a result of inserting) deleting) or updatingrecordsrecords

Database %erminology Database %erminology

Page 27: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 27/99

tabletable // ileile // relationrelation

%able %able

?sers (ie* their data in t*o#dimensional tables+?sers (ie* their data in t*o#dimensional tables+

Page 28: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 28/99

col#mncol#mn // ieldield // attrib#teattrib#te

Field Field

%he fields *ithin records contain data+ Data *ithin a field%he fields *ithin records contain data+ Data *ithin a fieldmust be of the same data type+ "ach field *ithin a tablemust be of the same data type+ "ach field *ithin a tablemust ha(e a uni7ue name+ Order of fields is unimportant+must ha(e a uni7ue name+ Order of fields is unimportant+

Page 29: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 29/99

ro!ro! // recordrecord // t#plet#ple

$ecord $ecord

' record is a group of related fields of information about a' record is a group of related fields of information about asingle instance of one obBect or e(ent in a database+single instance of one obBect or e(ent in a database+

%ables consist of /ero) one) or more records+%ables consist of /ero) one) or more records+Order of ro*s is unimportant+Order of ro*s is unimportant+

Page 30: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 30/99

Data Dictionary and the System Catalog Data Dictionary and the System Catalog

Data dictionary contains metadata to pro(ideData dictionary contains metadata to pro(idedetailed accounting of all tables *ithin thedetailed accounting of all tables *ithin thedatabase+database+

System catalog is a (ery detailed system dataSystem catalog is a (ery detailed system datadictionary that describes all obBects *ithindictionary that describes all obBects *ithinthe database+the database+, System catalog is a system#created database *hoseSystem catalog is a system#created database *hose

tables store the database characteristics andtables store the database characteristics andcontents+contents+

, System catalog tables can be 7ueried Bust li!e anySystem catalog tables can be 7ueried Bust li!e anyother tables+other tables+

, System catalog automatically produces databaseSystem catalog automatically produces databasedocumentation+documentation+

Page 31: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 31/99

Sample Data Dictionary Sample Data Dictionary

Page 32: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 32/99

eys eys

' !ey helps define entity relationships+' !ey helps define entity relationships+

%he !ey s role is based on a concept !no*n as%he !ey s role is based on a concept !no*n asdetermination) *hich is used in the definition ofdetermination) *hich is used in the definition of

functional dependence+functional dependence+. %he attribute is functionally dependent on ' if '%he attribute is functionally dependent on ' if '

determines +determines +

. 'n attribute that is part of a !ey is !no*n as a !ey attribute+'n attribute that is part of a !ey is !no*n as a !ey attribute+

. ' multi#attribute !ey is !no*n as a composite !ey+' multi#attribute !ey is !no*n as a composite !ey+

. If the attribute 1 is functionally dependent on a compositeIf the attribute 1 is functionally dependent on a composite!ey '1 but not on any subset of that composite !ey) the!ey '1 but not on any subset of that composite !ey) theattribute 1 is fully functionally dependent on '1+attribute 1 is fully functionally dependent on '1+

Page 33: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 33/99

eys eys

Controlled redundancy shared commonControlled redundancy shared commonattributes1 ma!es the relational database *or!+attributes1 ma!es the relational database *or!+

%he primary !ey of one table appears again as%he primary !ey of one table appears again asthe lin! foreign !ey1 in another table+the lin! foreign !ey1 in another table+

If the foreign !ey contains either matchingIf the foreign !ey contains either matching

(alues or nulls) the table s1 that ma!e use of(alues or nulls) the table s1 that ma!e use ofsuch a foreign !ey are said to e hibitsuch a foreign !ey are said to e hibitreferential integrityreferential integrity 00

Page 34: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 34/99

Inde es Inde es

'n inde is composed of an inde !ey and a set'n inde is composed of an inde !ey and a setof pointers+of pointers+

Page 35: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 35/99

$elational Database eys $elational Database eys

Page 36: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 36/99

Integrity $ules Integrity $ules

Page 37: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 37/99

%ables%ablesHueriesHueriesFormsForms$eports$eportsModulesModules

Database Components Database Components

Page 38: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 38/99

MaBor Components of a Database 'pplicationMaBor Components of a Database 'pplication

:+ Huery# as!s 7uestions

6+ Form# data entry 2+ $eport# summari/es & prints

+ Program # used to automate a database

J+ Menu # organi/es components

Page 39: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 39/99

%hree le(els of representation%hree le(els of representation, e ternale ternal # user (ie*s of data# user (ie*s of data, conceptualconceptual # abstract description of data# abstract description of data, internalinternal # physical implementation# physical implementation

access methods) indeaccess methods) indeconstruction) data construction) data structuresstructures

Starting point for designKStarting point for designK, Conceptual general description *hich is thenConceptual general description *hich is then

represented in terms of the data contained in therepresented in terms of the data contained in thedatabasedatabase

Conceptual le(el is primary focus of thisConceptual le(el is primary focus of thiscoursecourse

3e(els of Database $epresentation 3e(els of Database $epresentation

Page 40: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 40/99

' 3ogical Eie* of Data ' 3ogical Eie* of Data

$elational database model s structural and$elational database model s structural anddata independence enables us to (ie* datadata independence enables us to (ie* datalogically logically rather thanrather than physically physically ++

%he logical (ie* allo*s a simpler file concept%he logical (ie* allo*s a simpler file conceptof data storage+of data storage+

%he use of logically independent tables is%he use of logically independent tables iseasier to understand+easier to understand+

3ogical simplicity yields simpler and more3ogical simplicity yields simpler and moreeffecti(e database design methodologies+effecti(e database design methodologies+

Page 41: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 41/99

Lhat is $elational Database DesignK Lhat is $elational Database DesignK

$elational Database Summary$elational Database Summary, logical database model that treats data as iflogical database model that treats data as if

they are stored in separate but related tablesthey are stored in separate but related tables

, %ables are related as long as t*o tables share%ables are related as long as t*o tables sharecommon data elementcommon data element

, Information in these tables can be combinedInformation in these tables can be combined

on an as#needed basis to retrie(e ans*ers toon an as#needed basis to retrie(e ans*ers to7ueries and to generate comple reports7ueries and to generate comple reports

Page 42: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 42/99

Lhat is $elational Database DesignK Lhat is $elational Database DesignK

Page 43: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 43/99

Page 44: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 44/99

Database Design Problems Database Design Problems

4umerous anomalies can arise during the4umerous anomalies can arise during thedesign of databasesdesign of databases

, $edundancy$edundancy, Multi#(alued problemsMulti#(alued problems, ?pdate anomalies?pdate anomalies,

Insertion anomaliesInsertion anomalies

, Deletion anomaliesDeletion anomalies

Page 45: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 45/99

Database Design Problems Database Design Problems

$edundancy$edundancy, unnecessary repetition of dataunnecessary repetition of data

Page 46: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 46/99

Database Design Problems Database Design Problems

Multi#(alued problemsMulti#(alued problems, e+g+) 6 # 'dd multiple ro*s) one for each (aluee+g+) 6 # 'dd multiple ro*s) one for each (alue

, Data about a boo! must be repeated for as many timesData about a boo! must be repeated for as many timesas there are authors of a boo! also creates redundancy1as there are authors of a boo! also creates redundancy1

Page 47: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 47/99

Database Design Problems Database Design Problems

Multi#(alued problemsMulti#(alued problems, e+g+) 2 # 'dd multiple columns) one for each (aluee+g+) 2 # 'dd multiple columns) one for each (alue

, -o* many columns for authors must be included in the-o* many columns for authors must be included in thedesign empty fields *aste space too1Kdesign empty fields *aste space too1K

Page 48: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 48/99

Database Design Problems Database Design Problems

Multi#(alued problemsMulti#(alued problems, e+g+) : # Include all author s names in a single fielde+g+) : # Include all author s names in a single field

, -o* do you search for a single author s name or create an-o* do you search for a single author s name or create analphabetical list of authorsalphabetical list of authors

Page 49: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 49/99

Database Design Problems Database Design Problems

?pdate 'nomalies?pdate 'nomalies, %o update an author s telephone) each%o update an author s telephone) each

instance must be changedinstance must be changed

, if *e miss an item or enter it incorrectlyif *e miss an item or enter it incorrectly*e create an unreliable table*e create an unreliable table, sometimes pre(ious errors propagatesometimes pre(ious errors propagate

errors furthererrors further

b bl

Page 50: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 50/99

Database Design Problems Database Design Problems

?pdate 'nomalies?pdate 'nomalies, e+g+) Consider the authore+g+) Consider the author 'usten 'usten in the follo*ing table+in the follo*ing table+

Lhat happens if *e change her telephone numberKLhat happens if *e change her telephone numberK

PropagationPropagationof "rrorof "rror

b bl

Page 51: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 51/99

Database Design Problems Database Design Problems

Insertion anomaliesInsertion anomalies, Lhat happens if *e *ant to enter informationLhat happens if *e *ant to enter information

regarding a publisher for *hom *e do not ha(eregarding a publisher for *hom *e do not ha(eboo! informationKboo! informationK

, Do *e addDo *e add null (aluesnull (alues for the other fieldsKfor the other fieldsK

D b D i P bl

Page 52: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 52/99

Database Design Problems Database Design Problems

Deletion anomaliesDeletion anomalies, Lhat happens if *e delete all the boo!Lhat happens if *e delete all the boo!

entries for a gi(en publisherKentries for a gi(en publisherK

b blD b D i P bl

Page 53: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 53/99

Database Design Problems Database Design Problems

?se of the relational database model remo(es?se of the relational database model remo(essome database anomaliessome database anomaliesFurther remo(al of database anomalies reliesFurther remo(al of database anomalies relieson a structured techni7ue calledon a structured techni7ue called normali/ation normali/ation Proper use of foreign !eys is crucial toProper use of foreign !eys is crucial toe ercising data redundancy controle ercising data redundancy controlPresence of some of these anomalies isPresence of some of these anomalies issometimes Bustified in order to enhancesometimes Bustified in order to enhanceperformanceperformance

Cl O liCl O li

Page 54: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 54/99

Class Outline Class Outline

Database ModelsDatabase ModelsDatabase Design ProblemsDatabase Design ProblemsDesign " erciseDesign " ercise

rea!rea!

Database Design MethodologyDatabase Design MethodologyPurpose of Data ModelingPurpose of Data Modeling

"ntity#$elationship Design"ntity#$elationship Design"#$ %erminology"#$ %erminology"ntity#$elationship Method " amples"ntity#$elationship Method " amples

Page 55: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 55/99

A good designer combines the art of design with the science of design. A good designer combines the art of design with the science of design.

Characteristics of a Database designer Characteristics of a Database designer

no*ledge of the problem you are trying to sol(eno*ledge of the problem you are trying to sol(eCommunication s!ills # e tensi(e discussions *ith usersCommunication s!ills # e tensi(e discussions *ith users'nalytical aptitude # !eep in mind the broad goals e(en'nalytical aptitude # !eep in mind the broad goals e(en*hile poring o(er the smallest details*hile poring o(er the smallest detailsImpertinence # 7uestion e(erythingAImpertinence # 7uestion e(erythingAImpartiality # find best solutionImpartiality # find best solution$ela constraints # assume anything is possible$ela constraints # assume anything is possible

Pay attention to details and definitionsPay attention to details and definitions$eframing # iterati(ely analy/e in ne* *ay # be creati(eA$eframing # iterati(ely analy/e in ne* *ay # be creati(eA

Page 56: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 56/99

1.1. Define the problem and define databaseDefine the problem and define databaseobBecti(esobBecti(es

2+2+ 'naly/e current database) assess user'naly/e current database) assess userre7uirements) and create data modelre7uirements) and create data model

:+:+ Design data structures tables) fields) fieldDesign data structures tables) fields) fieldspecifications) establish !eys1specifications) establish !eys1

J+J+ "stablish table relationships"stablish table relationships++ Clarify business rules critical to databaseClarify business rules critical to database

design e+g+) re7uired fields) (alidation rules1design e+g+) re7uired fields) (alidation rules1;+;+ Determine and establish user (ie*s of dataDetermine and establish user (ie*s of data9+9+ $e(ie* data integrity and reiterate design$e(ie* data integrity and reiterate design

methodologymethodology

Conceptual Design Methodology Conceptual Design Methodology

Page 57: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 57/99

Statement of Purpose Statement of Purpose

6+6+Declare a specific purpose for the database toDeclare a specific purpose for the database tofocus and guide its de(elopmentfocus and guide its de(elopmente+g+) %he purpose of the 'll#Star %alent database is toe+g+) %he purpose of the 'll#Star %alent database is tomaintain the data *e use in support of the entertainmentmaintain the data *e use in support of the entertainmentser(ices *e pro(ide to our clientele+N ser(ices *e pro(ide to our clientele+N

2+2+'rticulate goals & obBecti(es that define'rticulate goals & obBecti(es that definespecific tas!sspecific tas!s

Le need to maintain complete entertainer information+N Le need to maintain complete entertainer information+N Le need to maintain complete customer information+N Le need to maintain complete customer information+N Le need to trac! all customer#entertainer boo!ings+N Le need to trac! all customer#entertainer boo!ings+N Le need to maintain financial records of both paymentsLe need to maintain financial records of both payments

from customers and payments to entertainers+N from customers and payments to entertainers+N

Page 58: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 58/99

'ssessment of ?ser $e7uirements5 'ssessment of ?ser $e7uirements5 Lhat is analy/edK Lhat is analy/edK

inter(ie* transcriptsinter(ie* transcriptsmeeting minutesmeeting minutes

obser(ational notesobser(ational notesbusiness mission andbusiness mission andstrategy statementsstrategy statements7uestionnaire results7uestionnaire results

document analysesdocument analyses, business formsbusiness forms, reportsreports

, flo* chartsflo* charts, presentationspresentations, computer#generatedcomputer#generated

outputoutput, training manualstraining manuals, consultant reportsconsultant reports, Bob descriptions Bob descriptions

Page 59: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 59/99

'ssessment of ?ser $e7uirements5 'ssessment of ?ser $e7uirements5 Specific re7uirements Specific re7uirements

Lhat are subBects=obBects for the businessKLhat are subBects=obBects for the businessKLhat characteristics describe each obBectKLhat characteristics describe each obBectKLhat uni7ue characteristic distinguishes each obBectLhat uni7ue characteristic distinguishes each obBectfrom other obBects of the same typeKfrom other obBects of the same typeK-o* do you use this data e+g) summary reports1K-o* do you use this data e+g) summary reports1KO(er *hat period of time are you interested in this dataKO(er *hat period of time are you interested in this dataK

're all instances of each obBect the sameK're all instances of each obBect the sameKLhat e(ents occur that imply associations bet*eenLhat e(ents occur that imply associations bet*een(arious obBectsK(arious obBectsKIs each acti(ity or e(ent al*ays handled the same *ay orIs each acti(ity or e(ent al*ays handled the same *ay orare there special circumstancesKare there special circumstancesK

Goals of analysis of user requirements: collect a list of business goals,Goals of analysis of user requirements: collect a list of business goals,entities to track, a database schema, and sample report outputs.entities to track, a database schema, and sample report outputs.

Page 60: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 60/99

$ules for Conducting ?ser Inter(ie*s $ules for Conducting ?ser Inter(ie*s

Create a 7uiet) stress#free en(ironmentG set a limit of si peopleCreate a 7uiet) stress#free en(ironmentG set a limit of si people-a(e an agenda # pro(ide it to participants ahead of time-a(e an agenda # pro(ide it to participants ahead of timeFocus on the problem at handG maintain control of the inter(ie*Focus on the problem at handG maintain control of the inter(ie*Conduct separate inter(ie*s for users and managementConduct separate inter(ie*s for users and management

Identify the decision ma!erIdentify the decision ma!er'(oid technical Bargon'(oid technical BargonSho* concern for user needsSho* concern for user needs>i(e e(eryone e7ual and undi(ided attention>i(e e(eryone e7ual and undi(ided attentionLrite do*n e(erything *here it can be seen by participantsLrite do*n e(erything *here it can be seen by participants"ncourage blue s!y thin!ing"ncourage blue s!y thin!ing'rbitrate disputes'rbitrate disputes

eep the pace of the inter(ie* mo(ingeep the pace of the inter(ie* mo(ingDon t foreclose your options too soonDon t foreclose your options too soon

Page 61: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 61/99

Data Modeling Data Modeling

' model is a simplified representation usually a graphic1' model is a simplified representation usually a graphic1of a comple obBect in reality to ma!e it understandableof a comple obBect in reality to ma!e it understandableIf the elements in the model are correctly associated *ithIf the elements in the model are correctly associated *ithelements in reality) the model can be used to sol(eelements in reality) the model can be used to sol(e

problems in reality e+g+) engineer s model to determine aproblems in reality e+g+) engineer s model to determine abridge s *eight toleranceG if the model is incorrect+++1bridge s *eight toleranceG if the model is incorrect+++1an "$ model is integrated set of concepts that describesan "$ model is integrated set of concepts that describesdata) relationships bet*een data) and the constraints ondata) relationships bet*een data) and the constraints onthe data as they are used *ithin a specific organi/ation the data as they are used *ithin a specific organi/ation G aG adata model renders organi/ation s users 1 (ie* of obBectsdata model renders organi/ation s users 1 (ie* of obBectsand=or e(ents and their associationsand=or e(ents and their associations"$ model is a blueprint from *hich a *ell#structured"$ model is a blueprint from *hich a *ell#structureddatabase is createddatabase is created"$ models are independent of details of implementation"$ models are independent of details of implementation

Page 62: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 62/99

Purpose of Data Modeling Purpose of Data Modeling

-igh le(el description-igh le(el description, integrated set of concepts that describes data)integrated set of concepts that describes data)

relationships bet*een data) and the constraints on therelationships bet*een data) and the constraints on thedata as they are used *ithin a specific organi/ationdata as they are used *ithin a specific organi/ation

Eie* of obBects or e(entsEie* of obBects or e(ents, data model renders organi/ation s users 1 (ie* ofdata model renders organi/ation s users 1 (ie* of

obBects and=or e(ents and their associationsobBects and=or e(ents and their associations

$epresentation of data in a simplified$epresentation of data in a simplifiedfashion that ma!es it understandablefashion that ma!es it understandableOnce established) database design isOnce established) database design isrelati(ely straightfor*ardrelati(ely straightfor*ard

Page 63: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 63/99

"#$ Modeling Concepts "#$ Modeling Concepts

'b1ects

Entities

Relationships

$ttrib#tes

Relationship,ype

&egree

al#es

&omains

) * )

) *

M *

Mandatory

'ptional

.onnecti%ity

3articipation

Rec#rsi%e

"inary

,ernary

-ary

.ardinality

Page 64: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 64/99

"ntities "ntities

"ntity"ntity, Something that can be identified in the usersSomething that can be identified in the users

en(ironment about *hich *e *ant to store dataGen(ironment about *hich *e *ant to store dataGtypically is a nountypically is a noun

, "ntities or obBects must ha(e occurrences that can"ntities or obBects must ha(e occurrences that canbe uni7uely identifiedbe uni7uely identified, Identified by an organi/ation or its usersIdentified by an organi/ation or its users, Consists of tangible or intangible obBects or e(entsConsists of tangible or intangible obBects or e(ents

"ntity Instance"ntity Instance, ' single entity occurrence or instance *ithin a' single entity occurrence or instance *ithin a

collection of entitiescollection of entities

e+g+) S%?D"4% is an entityG 'nnie 'bel is an entitye+g+) S%?D"4% is an entityG 'nnie 'bel is an entity

instance as are ob ro*n and Cathy Chen+instance as are ob ro*n and Cathy Chen+ S,4&E , S,4&E ,

Page 65: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 65/99

'ttributes 'ttributes

properties that describe characteristics of anproperties that describe characteristics of anentity # assumed all instances of a gi(en entityentity # assumed all instances of a gi(en entityha(e the same attributesha(e the same attributes, use atomic attributes) those that cannot be di(ideduse atomic attributes) those that cannot be di(ided

further e+g+) not composite attributes e+g+) use last namefurther e+g+) not composite attributes e+g+) use last name& first name) not name1& first name) not name1

, dodo notnot use deri(ed attributes attributes that can beuse deri(ed attributes attributes that can becalculated using other attributesG e+g+) age1calculated using other attributesG e+g+) age1

, use single (alue attributes not multi#(alued e+g+)use single (alue attributes not multi#(alued e+g+)medication6) medication2) etc+1medication6) medication2) etc+1

, multi#(alued attributes) if they ha(e their o*n importantmulti#(alued attributes) if they ha(e their o*n important

attributes should be ele(ated to entitiesattributes should be ele(ated to entitiese+g+) attributes of thee+g+) attributes of theentity S%?D"4% mightentity S%?D"4% mightinclude name) address)include name) address)etc+etc+

birth datebirth datefirst namefirst name

last namelast namephotophotophone @phone @

S,4&E , S,4&E ,

Page 66: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 66/99

Identifiers Identifiers

"ach entity occurrence has a"ach entity occurrence has a uni7ueuni7ue identifieridentifier%he identifier is an attribute or group of attributes1%he identifier is an attribute or group of attributes1that describes or identifies each entity occurrencethat describes or identifies each entity occurrence'n identifier should be uni7ue to each occurrence'n identifier should be uni7ue to each occurrence$eferred to as a primary !ey in relational models$eferred to as a primary !ey in relational models

S,4&E , S,4&E ,

e+g+) in the list of potential attributese+g+) in the list of potential attributesof the entity S%?D"4%) the identifierof the entity S%?D"4%) the identifiercould be Student 4umber+could be Student 4umber+

StudentID) +++StudentID) +++

Page 67: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 67/99

$elationships $elationships

'ssociation or connection bet*een t*o or'ssociation or connection bet*een t*o ormore entitiesmore entities, ?sually a (erb?sually a (erb

, -'S#' is also a common relationship-'S#' is also a common relationship"MP3O ""#has a#D"P"4D"4%1"MP3O ""#has a#D"P"4D"4%1, "#$ model also contains relationship classes"#$ model also contains relationship classes

S%?D"4% S%?D"4% takestakes .'4RSE.'4RSE

StudentID) +++StudentID) +++ CourseID) +++CourseID) +++

Page 68: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 68/99

Degree of $elationship5 inary Degree of $elationship5 inary

In a binary relationship) t*o entities are associated+In a binary relationship) t*o entities are associated+%his is the most common degree of relationship+%his is the most common degree of relationship+

%$IP%$IP D"P'$%M"4% D"P'$%M"4%

takestakes!orks!orks

oror

E'C'%IO4"$E'C'%IO4"$ "MP3O """MP3O ""

Page 69: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 69/99

Page 70: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 70/99

Degree of $elationship5 ?nary 0$ecursi(e1 Degree of $elationship5 ?nary 0$ecursi(e1

In a recursi(e relationship) one entity is associated *ithIn a recursi(e relationship) one entity is associated *ithitself+itself+

playsplays

%"'M%"'M

re7uiresre7uires

CO?$S"CO?$S"

Page 71: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 71/99

$ relationship can e6ist bet!een$ relationship can e6ist bet!eenocc#rrences o the same entity setocc#rrences o the same entity set

$ecursi(e $elationships $ecursi(e $elationships

Page 72: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 72/99

I l t ti f th M54 $ i(I l t ti f th M54 $ i(

Page 73: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 73/99

Implementation of the M54 $ecursi(e Implementation of the M54 $ecursi(e P'$% Contains P'$%N $elationship P'$% Contains P'$%N $elationship

Page 74: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 74/99

Implementation of the M54 CO?$S" $e7uires Implementation of the M54 CO?$S" $e7uires CO?$S"N $ecursi(e $elationship CO?$S"N $ecursi(e $elationship

Page 75: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 75/99

Implementation of the 65M "MP3O "" ManagesImplementation of the 65M "MP3O "" Manages"MP3O ""N $ecursi(e $elationship "MP3O ""N $ecursi(e $elationship

Page 76: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 76/99

.hild.hild

EmployeeEmployee

M#sicianM#sician

One#to#Many

One#to#One

Many#to#Many

1 M

M

1

N

1

Connecti(ity Connecti(ity

Connecti(ity describes constraints on relationshipConnecti(ity describes constraints on relationshipalso referred to as ma imum cardinalityN1also referred to as ma imum cardinalityN1

4umber of instances of entity that can or must1 be4umber of instances of entity that can or must1 beassociated *ith each instance of entity 'associated *ith each instance of entity '

rents

has

sings

,oy,oy

' ice' ice

SongSong

Page 77: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 77/99

$epresenting M54 binary relationships $epresenting M54 binary relationships

M54 relationships are represented by t*o 65MM54 relationships are represented by t*o 65Mrelationships+relationships+the relationship is itself an entity) called a compositethe relationship is itself an entity) called a compositeentity rectangle around the diamond1entity rectangle around the diamond1%he composite entity often has its o*n attributes%he composite entity often has its o*n attributes

.L$SS.L$SSenrolls inenrolls inM N

.L$SS.L$SSenrolls inenrolls inM M

DateDate Mar!Mar!

1 1

S,4&E , S,4&E ,

S,4&E , S,4&E ,

Page 78: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 78/99

Page 79: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 79/99

Occurrences Diagram Occurrences Diagram

Pictorial mapping of the occurrences bet*een t*o entitiesPictorial mapping of the occurrences bet*een t*o entitiesassists in understanding connecti(ity and cardinalityassists in understanding connecti(ity and cardinality

. ) , )

. 2 , 2

. 7 , 7

. ,

. 5 , 5

. 9 , 9 A child may rent between 0 and 3 toys; a toy may only be rented by 0 A child may rent between 0 and 3 toys; a toy may only be rented by 0

or 1 child. One child may rent many toys (1 !)or 1 child. One child may rent many toys (1 !)

Page 80: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 80/99

$elationship Participation $elationship Participation

'lso referred to as minimum cardinalityN'lso referred to as minimum cardinalityNMandatory ParticipationMandatory Participation, 'n instance of a gi(en entity must definitely match an'n instance of a gi(en entity must definitely match an

instance of a second entityinstance of a second entity, e+g+) each student must enroll in e actly one coursee+g+) each student must enroll in e actly one course

Optional ParticipationOptional Participation, 'n instance of a gi(en entity does not necessarily'n instance of a gi(en entity does not necessarilyparticipate in the relationshipparticipate in the relationship

, lo*er bound of cardinality is /erolo*er bound of cardinality is /ero, e+g+) a faculty member teaches /ero) one) or t*oe+g+) a faculty member teaches /ero) one) or t*o

coursescourses

makesmakes)

MEM"ERMEM"ER &' $,I'&' $,I'

'3,I' $LM$ &$,'R:(0,N) (1,1)

a member may or may not ma"e a donation but a donation must bea member may or may not ma"e a donation but a donation must beassociated with a member associated with a member

Page 81: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 81/99

From the C?S%OM"$ perspecti(e5From the C?S%OM"$ perspecti(e5. a customer may ma!e many orders M orders of 65Ma customer may ma!e many orders M orders of 65M

connecti(ity1connecti(ity1. a customer does not necessarily ma!e orders optionala customer does not necessarily ma!e orders optional

participation of orders) cardinality is 0)411participation of orders) cardinality is 0)411

From the O$D"$ perspecti(e5From the O$D"$ perspecti(e5. an order is made by associated *ith1 one and only onean order is made by associated *ith1 one and only one

customer 6 customer of 65M connecti(ity1customer 6 customer of 65M connecti(ity1. an order must be made by associated *ith1an order must be made by associated *ith1 a customera customer

mandatory participation) cardinality is 6)611mandatory participation) cardinality is 6)611

" ample5 Customers & Orders " ample5 Customers & Orders

'R&ER'R&ERmakesmakes11 MM

(0,N)(0,N) (1,1)(1,1)

.4S,'MER.4S,'MER

Page 82: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 82/99

" ample5 Customers & Orders " ample5 Customers & Orders

parent tablerelated

table

common field

"ntity#$elationship Design"ntity#$elationship Design

Page 83: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 83/99

ntity#$elationship Design y $ p g

First step # de(elop a list of entities andFirst step # de(elop a list of entities andattributes that are of interest to theattributes that are of interest to theenterpriseenterprise

"ntities or obBects must ha(e occurrences"ntities or obBects must ha(e occurrencesthat can be uni7uely identifiedthat can be uni7uely identified

"#$ Design consists of determining entities)"#$ Design consists of determining entities)attributes) relationships) relationship types)attributes) relationships) relationship types)

le(el of participation in relationships)le(el of participation in relationships)identifiers) and then dra*ing an "#$ Diagramidentifiers) and then dra*ing an "#$ Diagram

"#$ Diagram model1 is a blueprint from *hich"#$ Diagram model1 is a blueprint from *hicha *ell#structured database is createda *ell#structured database is created

Page 84: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 84/99

Steps in "ntity#$elationship Modeling Steps in "ntity#$elationship Modeling

)0 Identi y entities)0 Identi y entities20 Identi y relationships20 Identi y relationships70 &etermine relationship type70 &etermine relationship type

0 &etermine le%el o participation0 &etermine le%el o participation

50 $ssign an identi ier or each entity50 $ssign an identi ier or each entity90 &ra! completed E-R diagram90 &ra! completed E-R diagram9+ Deduce a set of preliminary s!eleton tables along *ith a9+ Deduce a set of preliminary s!eleton tables along *ith a

proposed primary !ey for each table using rules pro(ided1proposed primary !ey for each table using rules pro(ided1<+ De(elop a list of all attributes of interest not already<+ De(elop a list of all attributes of interest not already

listed and systematically assign each to a table in such alisted and systematically assign each to a table in such a*ay to achie(e a :4F design i+e+) no repeating groups) no*ay to achie(e a :4F design i+e+) no repeating groups) nopartial dependencies) and no transiti(e dependencies1partial dependencies) and no transiti(e dependencies1

Page 85: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 85/99

"#$ Method " ample5 3ibrary Database "#$ Method " ample5 3ibrary Database

Step 6+ Identify entity typesStep 6+ Identify entity types

34"LISHER34"LISHER$4,H'R$4,H'R "'';"'';

Step 2+ Identify relationshipsStep 2+ Identify relationships

$4,H'R$4,H'R "'';"'';!rites!rites

34"LISHER34"LISHER "'';"'';p#blishep#blishess

Page 86: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 86/99

3ibrary Database3ibrary Database 0cont2d1 0cont2d1

Step :+ Determine relationship type+ 's!5Step :+ Determine relationship type+ 's!5, "ach boo! is *ritten by ho* many authorsK "ach author *rites ho* many boo!sK"ach boo! is *ritten by ho* many authorsK "ach author *rites ho* many boo!sK, "ach boo! may be authored by /ero anonymous1) one) or more than one author and each author"ach boo! may be authored by /ero anonymous1) one) or more than one author and each author

may *rite /ero) one) or more than one boo!+ %he relationship type is many#to#many or5may *rite /ero) one) or more than one boo!+ %he relationship type is many#to#many or5

$4,H'R "'';!ritesM N

34"LISHER "'';p#blishe

s

M1

• For P? 3IS-"$#publishes# OO ) each publisher publishesFor P? 3IS-"$#publishes# OO ) each publisher publishes

/ero) one) or more boo!s and each boo! is published by e actly/ero) one) or more boo!s and each boo! is published by e actlyone publisher+ %he relationship type is one#to#many *hereone publisher+ %he relationship type is one#to#many *hereOO S is on the many side and P? 3IS-"$ is one the one side+OO S is on the many side and P? 3IS-"$ is one the one side+

Page 87: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 87/99

3ibrary Database3ibrary Database 0cont2d1 0cont2d1

Step J+ Determine le(el of participationStep J+ Determine le(el of participation, Since each boo! does not ha(e to be authored anonymous1 andSince each boo! does not ha(e to be authored anonymous1 and

since each author does not ha(e to *rite a boo! may ma!e CD1since each author does not ha(e to *rite a boo! may ma!e CD1the le(el of participation is optional for both sides of thethe le(el of participation is optional for both sides of therelationship ofrelationship of '?%-O$#*rites# OO '?%-O$#*rites# OO combinationcombination

N$4,H'R "'';!rites

M

(0, N) (0, N)

1 N34"LISHER "'';p#blishe

s

• For theFor the P? 3IS-"$#publishes# OO P? 3IS-"$#publishes# OO combination) the le(el ofcombination) the le(el ofparticipation for P? 3IS-"$ is optional publishers do notparticipation for P? 3IS-"$ is optional publishers do notnecessarily ha(e to publish a boo!) perhaps ne*sletters1 andnecessarily ha(e to publish a boo!) perhaps ne*sletters1 andthe le(el of participation for the OO side is mandatory eachthe le(el of participation for the OO side is mandatory eachboo! must ha(e a publisher1boo! must ha(e a publisher1

(0, N) (1,1)

Page 88: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 88/99

3ibrary Database3ibrary Database 0cont2d1 0cont2d1

Step + 'ssign an identifier for each entityStep + 'ssign an identifier for each entity, 'uthorID) IS 4) PublisherID'uthorID) IS 4) PublisherID

Step ;+ Dra* completed "#$ diagramStep ;+ Dra* completed "#$ diagram

34"LISHER

$4,H'R "'';!rites

p#blishes

AuthorID, ...

IS !, ...

"ublisherID, ...

N

1

NM(0,N) (0,N) (1,1)

(0,N)

Page 89: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 89/99

3ibrary Database3ibrary Database 0cont2d1 0cont2d1

Step ;+ Dra* completed "#$ diagram # resol(eStep ;+ Dra* completed "#$ diagram # resol(eM54 relationshipsM54 relationships

AuthorID, ... IS !, ... AuthorID,IS !, ...

$4,H'R "'';!ritesM 1

(0,N) (0,N)

34"LISHER

p#blishes

"ublisherID, ...

M

1

(1,1)

(0,N)

1 M

(1,1) (1,1)

Page 90: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 90/99

"#$ Modeling5 ?ni(ersity " ample "#$ Modeling5 ?ni(ersity " ample

' database is to be set up to record information about' database is to be set up to record information aboutfaculty) the courses they teach) and the students *hofaculty) the courses they teach) and the students *hota!e courses+ Some courses are taught by teams ofta!e courses+ Some courses are taught by teams offaculty members+faculty members+

, Step 6+ Identify entity typesStep 6+ Identify entity types

S%?D"4% S%?D"4% F'C?3%F'C?3% CO?$S"CO?$S"

F'C?3%F'C?3% CO?$S"CO?$S"teachesteaches

S%?D"4% S%?D"4% CO?$S"CO?$S"ta!esta!es

, Step 2+ Identify relationshipsStep 2+ Identify relationships

Page 91: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 91/99

?ni(ersity " ample?ni(ersity " ample 0cont2d1 0cont2d1

Step :+ Determine relationship type+ 's!5Step :+ Determine relationship type+ 's!5. "ach faculty member teaches ho* many coursesK"ach faculty member teaches ho* many coursesK. "ach course is taught by ho* many facultyK"ach course is taught by ho* many facultyK. "ach student ta!es ho* many coursesK"ach student ta!es ho* many coursesK. "ach course is ta!en by ho* many studentsK"ach course is ta!en by ho* many studentsK

, ?se occurrences diagram to (isuali/e relationship?se occurrences diagram to (isuali/e relationshipbet*een entitiesbet*een entities

FF66 CC66

FF22 CC22

FF:: CC::

FFJJ CCJJ

FF CC

SS 66 CC66

SS 22 CC22

SS :: CC::

SS JJ CCJJ

SS CC

Page 92: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 92/99

?ni(ersity " ample?ni(ersity " ample 0cont2d1 0cont2d1

Step :+ Determine $elationship type cont d1Step :+ Determine $elationship type cont d1, For F'C?3% #teaches#CO?$S" *e are told each facultyFor F'C?3% #teaches#CO?$S" *e are told each faculty

member teaches /ero) one) or t*o courses+ Le are told somemember teaches /ero) one) or t*o courses+ Le are told somecourses are taught by /ero) one) t*o) or three faculty+ %his is acourses are taught by /ero) one) t*o) or three faculty+ %his is amany#to#many relationship+many#to#many relationship+

F'C?3%F'C?3% CO?$S"CO?$S"teachesteachesM N

, For S%?D"4%#ta!es#CO?$S" each student enrols in one to siFor S%?D"4%#ta!es#CO?$S" each student enrols in one to sicourses and each course is ta!en by /ero or up to :0 students+courses and each course is ta!en by /ero or up to :0 students+%his too is a many#to#many relationship+%his too is a many#to#many relationship+

S%?D"4% S%?D"4% CO?$S"CO?$S"ta!esta!esM N

Page 93: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 93/99

?ni(ersity " ample?ni(ersity " ample 0cont2d1 0cont2d1

Step J+ Determine le(el of participationStep J+ Determine le(el of participation, F'C?3% #teaches#CO?$S" # le(el of participation is optional) sinceF'C?3% #teaches#CO?$S" # le(el of participation is optional) since

sometimes Faculty do not ha(e to teach e+g+) sabbatical1G similarly) a coursesometimes Faculty do not ha(e to teach e+g+) sabbatical1G similarly) a coursemay not ha(e anyone interested in teaching itmay not ha(e anyone interested in teaching it

<$.4L,: .'4RSEM N

F'C?3%F'C?3% CO?$S"CO?$S"teachesteachesM N

(0,2) (0,3)

, S%?D"4%#ta!es#CO?$S" # le(el of participation is mandatoryS%?D"4%#ta!es#CO?$S" # le(el of participation is mandatorysince students must ta!e at least one courseG a course)since students must ta!e at least one courseG a course)ho*e(er) may or may not ha(e students ta!ing itho*e(er) may or may not ha(e students ta!ing it

S%?D"4% S%?D"4% CO?$S"CO?$S"ta!esta!esNM

(1,6) (0,30)

Page 94: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 94/99

?ni(ersity " ample?ni(ersity " ample 0cont2d1 0cont2d1

Step + 'ssign an identifier for each entityStep + 'ssign an identifier for each entity, FacultyID) CourseID) StudentIDFacultyID) CourseID) StudentIDStep ;+ Dra* completed "#$ diagramStep ;+ Dra* completed "#$ diagram

#ourseID#ourseID , ..., ...

CO?$S"CO?$S" S%?D"4% S%?D"4% ta!en byta!en byStudentIDStudentID , ..., ...

F'C?3%F'C?3%

taught bytaught by

$acultyID$acult yID, ..., ...

MM

NN

MM NN

(0,30)(0,30) (1,6)(1,6)

(0,2)(0,2)

(0,3)(0,3)

Page 95: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 95/99

?ni(ersity " ample?ni(ersity " ample 0cont2d1 0cont2d1

ou are no* told that in addition to the relationships gi(en) eachou are no* told that in addition to the relationships gi(en) eachstudent is assigned a faculty ad(isor *ho gi(es direction instudent is assigned a faculty ad(isor *ho gi(es direction inchoosing courses+choosing courses+?se occurrences diagram to (isuali/e relationship bet*een entities?se occurrences diagram to (isuali/e relationship bet*een entitiesLe are told each student is ad(ised by e actly one facultyLe are told each student is ad(ised by e actly one facultyad(isor+ Le can assume that each faculty member ad(ises /ero)ad(isor+ Le can assume that each faculty member ad(ises /ero)

one) or more students+ %his means the additional relationship isone) or more students+ %his means the additional relationship isof type one#to#many or 65M+of type one#to#many or 65M+%he S%?D"4% is on the many side of the relationship and must be%he S%?D"4% is on the many side of the relationship and must bead(ised therefore) faculty is mandatory to studentG F'C?3% onad(ised therefore) faculty is mandatory to studentG F'C?3% onthe one side of the relationship may or may not ha(e a student)the one side of the relationship may or may not ha(e a student)therefore student is optional to faculty+therefore student is optional to faculty+

S%?D"4% S%?D"4% F'C?3%F'C?3% ad(isesad(ises1 M

(0,N) (1,1)

Page 96: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 96/99

?ni(ersity " ample?ni(ersity " ample 0cont2d1 0cont2d1

Step ;+ Dra* completed "#$ diagramStep ;+ Dra* completed "#$ diagram

F'C?3%F'C?3%

CO?$S"CO?$S"S%?D"4% S%?D"4% ta!esta!es #ourseID, ...

StudentID, ...

$acultyID, ...

a d ( i s e s

a d ( i s e s

1

M

1

M

1

M

(1,6) (0,30) (0,3)

(0,2)(0,N)

(1,1)

M 1

1

M

(1,1)

(1,1)

(1,1) (1,1)

taughttaughtbyby

Page 97: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 97/99

"(aluation of the "#$ Model "(aluation of the "#$ Model

?sing data models to conceptuali/e the design of a?sing data models to conceptuali/e the design of adatabase sa(esdatabase sa(es timetime andand moneymone y because a completed "#$because a completed "#$diagram is the actual blueprint of the database+ Itsdiagram is the actual blueprint of the database+ Itscomposition must reflect an organi/ation s operationscomposition must reflect an organi/ation s operationsaccurately if the database is to meet that organi/ation saccurately if the database is to meet that organi/ation sdata re7uirements+data re7uirements+%he completed "#$ diagram also lets the designer%he completed "#$ diagram also lets the designercommunicatecommunicate more precisely *ith those *ho commissionedmore precisely *ith those *ho commissionedthe database design+ It s easier to correct design fla*s atthe database design+ It s easier to correct design fla*s atthe data modeling stage+the data modeling stage+Do not confuse entities and relationships *ith actualDo not confuse entities and relationships *ith actualtables+ %he transformation or decomposition of "#$tables+ %he transformation or decomposition of "#$models *ill be discussed *ithin the ne t fe* *ee!s+models *ill be discussed *ithin the ne t fe* *ee!s+"#$ modeling is an iterati(e process+ "(en *hen complete)"#$ modeling is an iterati(e process+ "(en *hen complete)"$ models generally do not pro(ide a complete picture"$ models generally do not pro(ide a complete picture

e+g+) business rules cannot al*ays be sho*n1) therefore)e+g+) business rules cannot al*ays be sho*n1) therefore)

much additional documentation is necessary+much additional documentation is necessary+

Page 98: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 98/99

Lee! 2 # " ercises 6#2Lee! 2 # " ercises 6#2

Lee! 'fter 4e t Lee! 'fter 4e t

Page 99: Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

8/18/2019 Conducting the Oracle Job Interview It Manager Guide for Oracle0.ppt

http://slidepdf.com/reader/full/conducting-the-oracle-job-interview-it-manager-guide-for-oracle0ppt 99/99

More entity#relationship modelingMore entity#relationship modelinge ercisese ercises

%ransformation of "#$ Models%ransformation of "#$ Models

$ead $ob Chapter J$ead $ob Chapter J

Complete 'dams!i s tutorial :Complete 'dams!i s tutorial :