schema design best practice...schema design best practice skills – organize your tables, linkage...

38
www.grantadesign.com Schema Design Best Practice

Upload: others

Post on 12-Jun-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

www.grantadesign.com

Schema Design Best Practice

Page 2: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Schema Design Best Practice

Skills

– organize your tables, linkage

and hierarchy for optimum

efficiency, display, capabilities

and traceability

– choose the appropriate attribute

types for your data

Understanding

– The objectives that guide

decisions when you design a

GRANTA MI database

Learning Objectives for this session

Page 3: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

What is Schema?

• Data organization

• Objects that enable:

– Capabilities

▪ e.g. Standard Names needed for FEA export

– User experience

▪ e.g. search masks, report templates

Folders

Tables

Database

MI:Admin

Page 4: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Database Design

Page 5: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Database Design in GRANTA MI

• Relational database design (e.g. SQL)

– Formal database normalisation rules

Source: Wikipedia article “Database normalization”

• GRANTA MI database design

– Best practice guidelines, influenced by GRANTA MI capabilities

– Encapsulated in GRANTA MI Templates

Page 6: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

GRANTA MI Schema Design Aspects

• Efficiency & maintainability

– reduce duplication and make easy to maintain

• Display

– can data be understood with little training and

interpretation?

• Capabilities

– can the database support our business processes?

• Traceability

– “how was this design allowable made?”

– “where did this alloy batch come from?”

Efficient & maintainable

Display

Capabilities

Traceability

Page 7: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

GRANTA MI Schema Design Aspects

GRANTA MI

Database Schema

Efficient & maintainable

Display

Capabilities

TraceabilityData Types

Hierarchy

Tables & Links

DecisionsObjectives

Page 8: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

www.grantadesign.com

Tables & Links

Page 9: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Tables and Links

• Introduction to Tables and Links

– what data do I need to store?

– how is that data linked?

Tables & Links

?

Page 10: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Tables and Links

• Example: Materials in Medical Devices Reference Tables & Links

Demo

Page 11: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Tables and Links

• Examples: Composite Template Tables & Links

Page 12: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Tables and Links

• Examples: AM Template Tables & Links

Page 13: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Tables and Links

• Tables store “similar data”

– how similar? For example…

merge?

Page 14: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Tables: Fatigue / Tensile Test Data

Reasons to split

Key attributes are different→ Avoid long datasheets

(user experience for editing / attribute

search / charts / reports)

Reasons to merge

Many attributes are the same→ Avoid attribute duplication in schema

(Ease of maintenance when creating

new attributes, managing importers…)

Efficient & maintainable

Display

Page 15: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Tables: Fatigue / Tensile Test Data

Reasons to split

Clearer, separate traceability paths→ Never mix up types of test data

Reasons to merge

Compare and combine data easily

Traceability Capabilities

Page 16: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Tables: Fatigue / Tensile Test Data

Reasons to split

Find missing tests by browsing the

hierarchy “shape”

Reasons to merge

Query all test data with an

attribute search

CapabilitiesDisplay

Page 17: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Tables: Dealing with Large Schemas

Reasons to merge

Too many tables can overwhelm users…

…but we can mitigate this with:

• Good naming conventions

• Good homepage with schema diagram

• Profiles

• Explore views

Display

Page 18: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Links

• Usually represent workflow / flow of data Tables & Links

MI:Training Metals

Metals

Pedigree

Traceability

Statistical

Data

Design Data

Test Data

Demo

Page 19: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Links

• Which link type?

1. Static record links

2. Smart record links

3. Data links

4. Tabular attribute

5. Tabular attribute + Associated Records

Record A

Attribute i

Attribute ii

Attribute iii

Record B

Attribute i

Attribute ii

Attribute iii

Record C

Attribute i

Attribute ii

Attribute iii

Table 1

Record Y

Attribute i

Attribute ii

Attribute iii

Record Z

Attribute i

Attribute ii

Attribute iii

Table 2

Advantages:

• Don’t need rules to set up

• Search on attributes in linked tables

Disadvantages:

• Need active maintenance if record values change

• Record-to-record only

• Can’t export

Use for:

• Linking records where rules are complex, or not well defined

• Linking is static

• Where records are imported, and auto-linking can be used

Page 20: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Links

• Which link type?

1. Static record links

2. Smart record links

3. Data links

4. Tabular attribute

5. Tabular attribute + Associated Records

Advantages:

• Never need populating or updating

• Search on attributes in linked tables

• Multi-attribute linking criteria (up to 3)

Disadvantages:

• Only simple linking rules (A=B AND C=D)

• Record-to-record only

Use for:

• Linking records where rules are well defined

• When records are created manually (in MI:Viewer or MI:Explore)

• When linking values may change often

I want test records to

always link to the

pedigree record with

the same batch

number

Record A

Batch: 1

Attribute ii

Attribute iii

Record B

Batch: 2

Attribute ii

Attribute iii

Record C

Batch: 3

Attribute ii

Attribute iii

Test data

Record Y

Batch: 3

Attribute ii

Attribute iii

Record Z

Batch: 1

Attribute ii

Attribute iii

Pedigree

Page 21: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Links

• Which link type?

1. Static record links

2. Smart record links

3. Data links

4. Tabular attribute

5. Tabular attribute + Associated Records

Advantages:

• Data-to-data or data-to-record

• See linked data values

Disadvantages:

• Static only

• Linked values not searchable

• No access via Scripting Toolkits

Use for:

• Data value sourcing; reference citations (populate on import)

Record A

Attribute i

Attribute ii

Attribute iii

Record B

Attribute i

Attribute ii

Attribute iii

Record C

Attribute i

Attribute ii

Attribute iii

Table 1

Record Y

Attribute i

Attribute ii

Attribute iii

Record Z

Attribute i

Attribute ii

Attribute iii

Table 2

Page 22: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Links

• Which link type?

1. Static record links

2. Smart record links

3. Data links

4. Tabular attribute

5. Tabular attribute + Associated Records

Advantages:

• Logical, clear display of linked data

• Blend linked and local data

• Search on linked (or local) values*

Disadvantages:

• Very simple linking rules (1 attribute)

• Data storage heavy (every row is a hidden record)

• Can’t add to record list in this form (see #5)

Use for:

• Test summaries, substance queries, complex material pedigrees… *from MI 11

Record A

Record B

Attribute i

Attribute ii

Attribute iii

Record C

Attribute i

Attribute ii

Attribute iii

Table 1

Record Y

Attr. i: PQRS

Attribute ii

Attribute iii

Record Z

Attr. i: TUV

Attribute ii

Attribute iii

Table 2

Table i

PQRS

TUV

Page 23: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Links

• Which link type?

1. Static record links

2. Smart record links

3. Data links

4. Tabular attribute

5. Tabular attribute + Associated Records

Advantages:

• Can add to record list

• Multiple hops in 1 click

e.g. design data → statistical data → raw test data

• Reverse links

Disadvantages:

• All the disadvantages of tabular data (data heavy, simple linking rules)

• Conceptually complex

• Depend on (multiple) record IDs being properly filled in

Use for:

• Test summaries, substance queries, complex material pedigrees…

• Alternative to smart links

Record A

Record B

Attribute i

Attribute ii

Attribute iii

Record C

Attribute i

Attribute ii

Attribute iii

Table 1

Record Y

Attr. i: PQRS

Attribute ii

Attribute iii

Record Z

Attr. i: TUV

Attribute ii

Attribute iii

Table 2

Table i

PQRS

TUV

Page 24: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

www.grantadesign.com

Hierarchy

Page 25: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Hierarchy: Organisation

• How best to organize my records?– How do your users think the data should

be categorized?

▪ Company standard?

– For reference data, Granta borrows conventions from standards organization

▪ e.g. MMPDS by section

?

What if we

can’t decide?

Page 26: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Hierarchy: Organisation

• Alternative: set up MI:Explore for end-users

– they will not see hierarchyHierarchy

Filters

replace

hierarchy

Page 27: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Hierarchy

• Grouping records to be used together

– generate reports (add to list)

– analyse records in MatAnalyzer

– manipulate records in MI:Toolbox

Capabilities

Hierarchy

Page 28: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Hierarchy

• Can be used purely for access control

– permission-basedHierarchy

Capabilities

Page 29: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Hierarchy: How Deep?

• Easy to browse…

Fast browsing

(well designed)

Slow browsing

(too shallow)

vs.

Aim for 5 – 20 records per folder

Hierarchy

Display

vs.

Slow browsing

(too deep)

Page 30: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

www.grantadesign.com

Data Types

Page 31: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Data Types

Category Data type Abbreviation Units?

Numerical Integer INT

Point PNT ✓

Range RNG ✓

Text Short text STXT

Long text LTXT

Discrete DCT

Functional Float functional FDA ✓

Equation and Logic MAFN ✓

Discrete functional FDD

Media Picture PIC

Hyperlink HYP

File (embedded media) FIL

Other Logical LOG

Date DAT

Tabular TABL ✓

Data Types

Page 32: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Simple numerical data

Yes

No

Yes

No

Range

Multi-value Point

Yes

Integer

Point

No

Requires units?

Multiple values?

Must be a whole number

Min – Max or open range?

Yes

Point

No

Numerical Data Decision Tree

Page 33: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Text data

Yes

Discrete

Precise searching required?

e.g. values will be used for linking or

autoplacement

No

>256 characters?Flexible formatting?

Yes Long Text

No

Finite set of values? Yes

No

Short Text

Text Data Decision Tree

Page 34: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Graphical data

Yes

No

Equations and Logic

Functional

Data is summarized as an equation?

P Data is searchableP Data can be comparedP More than one parameterP Y-axis, x-axis &.or other parameters have unitsP Data can be plotted or viewed as a tableP Some parameters are descriptors (i.e. Test Data / Fitted Data)

Graphical Data Decision Tree

Page 35: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Media data

Yes

No

Yes

File

Hyperlink

No

Regularly updated on

server / website?

>5MB?

Content should be searchable?

Yes

File

No

PictureImage file type?

(*.jpg, *.png, etc)Yes

No

Media Data Decision Tree

Page 36: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

CONFIDENTIAL

Data Model Guide

• Detailed reference for data structure, schema objects and features

• Release via My Granta in December 2018 (and within MI 12)

Page 37: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

GRANTA MI Monthly Online Training Archive

Find previous sessions by logging in to My Granta:

https://mygranta.grantadesign.com/TrainingVideos

Page 38: Schema Design Best Practice...Schema Design Best Practice Skills – organize your tables, linkage and hierarchy for optimum efficiency, display, capabilities and traceability –

Training schedule

http://www.grantadesign.com/products/mi/training.htm

Next training is November 13 –

Track Materials Business Processes in MI:Workflow