Copyright 2007, Information Builders. Slide 1 Cesare Petrizio June, 2008 The File Is Too Large.

Slides:



Advertisements
Similar presentations
Database Relationships in Access As you recall, the data in a database is stored in tables. In a relational database like Access, you can have multiple.
Advertisements

Introduction to Database Systems1 Records and Files Storage Technology: Topic 3.
Copyright 2007, Information Builders. Slide 1 Walter Brengel Information Builders New Jersey User Forum – June 2008 FOCUS to SQL DeMystified.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez-Martínez Electrical and Computer Engineering Department Lecture 8 – File Structures.
Copyright 2007, Information Builders. Slide 1 Walter Brengel & Cesare Petrizio Unintended Consequences or…. Why Did FOCUS Do THAT!
INSERT BOOK COVER 1Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Access 2010 by Robert Grauer, Keith Mast,
Calculate the record size R in bytes.
Copyright 2007, Information Builders. Slide 1 Internals of Retrieval for TABLE/TABLEF/MATCH FILE Cesare Petrizio Information Builders.
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
File Management Chapter 12. File Management A file is a named entity used to save results from a program or provide data to a program. Access control.
Copyright 2007, Information Builders. Slide 1 Modify Internals Cesare Petrizio Information Builders.
Copyright 2007, Information Builders. Slide 1 XFOC Databases: If You Build Them, They will Come Noreen Redden FOCWizard June, 2008.
Chapter 12 File Management
Representing Block and Record Addresses Rajhdeep Jandir ID: 103.
Database Implementation Issues CPSC 315 – Programming Studio Spring 2008 Project 1, Lecture 5 Slides adapted from those used by Jennifer Welch.
Recap of Feb 27: Disk-Block Access and Buffer Management Major concepts in Disk-Block Access covered: –Disk-arm Scheduling –Non-volatile write buffers.
1 File Management Chapter File Management File management system consists of system utility programs that run as privileged applications Input to.
1 DN Copyright © 1998 Information Builders, Inc. Fusion: Migrating from Focus Tim Feetham NORCAL FUSE June 11, 1999.
File Management.
Access Lecture 1 Database Overview and Creating Tables Create an Employee Table.
File Management Chapter 12.
Relational Database Need to Knows. What is a database? Data - is just a pile of numbers or stats. A business "organises" the data to be meaningful and.
Chapter 61 Chapter 6 Index Structures for Files. Chapter 62 Indexes Indexes are additional auxiliary access structures with typically provide either faster.
1 JOIN: Rules, Roles, and Conventions Floria Foote June 2008.
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
Copyright 2007, Information Builders. Slide 1 JOIN, MATCH and MORE– Making the Connections Walter F. Blood Technical Director, FOCUS Division May, 2011.
Week 6 Lecture Normalization
By: M.Nadeem Akhtar1 The Data Base Management System (DBMS) Ch # 09.
Chapter pages1 File Management Chapter 12.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
1 Access for non-experts Link tables Find fields Criteria Join tables Find missing comment lines Understand relational databases (Wow!)
1 FOCUS Internals: Part 1 Update for 7.6.x Renee Teatro FUN Conference August 2008 Internals of Retrieval for TABLE/TABLEF/MATCH FILE.
1 Copyright © 2006, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables.
Copyright © 2004, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables.
Physical Database Design I, Ch. Eick 1 Physical Database Design I About 25% of Chapter 20 Simple queries:= no joins, no complex aggregate functions Focus.
More about Databases. Data Entry through Forms Table View (Data sheet view) is useful for data entry of new records But sometimes customization would.
20 Copyright © Oracle Corporation, All rights reserved. Oracle9 i Extensions to DML and DDL Statements.
©Silberschatz, Korth and Sudarshan11.1Database System Concepts Chapter 11: Storage and File Structure File Organization Organization of Records in Files.
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
 2001 Prentice Hall Business Publishing, Accounting Information Systems, 8/E, Bodnar/Hopwood A field may be a single character or number, or it.
Copyright 2007, Information Builders. Slide 1 JOIN, MATCH and MORE– Making the Connections Walter F. Blood Technical Director, FOCUS Division June, 2009.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
File Storage Organization The majority of space on a device is reserved for the storage of files. When files are created and modified physical blocks are.
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
1 The Master That Tells All Floria Foote Information Builders June 2008.
8 Copyright © 2007, Oracle. All rights reserved. Managing Schema Objects.
1/14/2005Yan Huang - CSCI5330 Database Implementation – Storage and File Structure Storage and File Structure II Some of the slides are from slides of.
Operating Systems Unit 7: – Virtual Memory organization Operating Systems.
SQL/Lesson 7/Slide 1 of 32 Implementing Indexes Objectives In this lesson, you will learn to: * Create a clustered index * Create a nonclustered index.
Variant Indexes. Specialized Indexes? Data warehouses are large databases with data integrated from many independent sources. Queries are often complex.
Physical Database Design I, Ch. Eick 1 Physical Database Design I Chapter 16 Simple queries:= no joins, no complex aggregate functions Focus of this Lecture:
JOIN Syntax and Techniques Noreen Redden Information Builders Copyright 2011, Information Builders. Slide 1.
Copyright 2007, Information Builders. Slide 1 TABLE FILE: The Basics Noreen Redden FOCWizard June, 2008.
Files An operating system, maintains descriptive information about files in a data structure called a file descriptor. NameDeletion control Storage Organization.
Operating Systems Files, Directory and File Systems Operating Systems Files, Directory and File Systems.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. A database is a collection of information organized to provide efficient retrieval. The collected information.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
Storage and File Organization
Module 11: File Structure
Indexing Structures for Files and Physical Database Design
Indexing Goals: Store large files Support multiple search keys
Physical Changes That Don’t Change the Logical Design
CS522 Advanced database Systems
File-System Implementation
Lecture 3: Main Memory.
ICOM 5016 – Introduction to Database Systems
File Organization.
CS703 - Advanced Operating Systems
DBMS Physical Design Physical design is concerned with the placement of data and selection of access methods for efficiency and ongoing maintenance.
Advance Database System
Presentation transcript:

Copyright 2007, Information Builders. Slide 1 Cesare Petrizio June, 2008 The File Is Too Large

Copyright 2007, Information Builders. Slide 2 The File is Too Large Agenda  What Is Too Large?  Partition or Not To Partition  Horizontal Partitioning  Vertical Partitioning  Access File  Intelligent Partitions for Reporting  JOINs and External Indexes  Partitions and MODIFY  XFOCUS alternative

Copyright 2007, Information Builders. Slide 3 Human Resources Database Lots of Employees

Copyright 2007, Information Builders. Slide 4 The File is Too Large Employee File EMPINFO 01 S1 ************** *EMP_ID **I *LAST_NAME ** *FIRST_NAME ** *HIRE_DATE ** * ** *************** ************** I I I I I FUNDTRAN I PAYINFO I SALINFO 02 I U 03 I SH1 08 I SH1 ************** ************** ************** *BANK_NAME * *DAT_INC ** *PAY_DATE ** *BANK_CODE * *PCT_INC ** *GROSS ** *BANK_ACCT * *SALARY ** *NET ** *EFFECT_DATE * *JOBCODE ** *CHECK_NO **I * * * ** * ** ************** *************** *************** ************** **************

Copyright 2007, Information Builders. Slide 5 The File is Too Large Limits for FOCUS/FUSION files  Number of Pages:  FOCUS (512K 4K pages) 2 gig  Number of Segments 64  Number of Indexes + text fields + segments 189  Number of Fields3072  Segment Size (data + pointers) 3968 bytes  Maximum Efficiency  All instances of a single chain fit on a page. What is Too Large? FOCUS Database

Copyright 2007, Information Builders. Slide 6 The File is Too Large Estimating File Size Each Instance is comprised of Data and Pointers Data Type Storage Ann bytes of Storage AnVn Bytes of Storage + 2 bytes for length In 4 bytes Dn.m 8 bytes Fn.m4 bytes Pn.m (n <= 15)8 bytes Pn.m (n > 15)16 bytes Smart Dates4 bytes PLUS Filler to pad Segment to full word (up to 4 bytes) TXn8 byte pointer to separate pages with text data

Copyright 2007, Information Builders. Slide 7 The File is Too Large Estimating File Size  Pointers  4 Bytes consists of:  Type  Page #, Word Offset  Types:  Parent to Real Child  Parent to KU Child  Parent to KM Child  Child to Parent  Forward Chain  Deleted, Free, End-of-Chain

Copyright 2007, Information Builders. Slide 8 The File is Too Large Estimating File Size  Index = I  Internal Index – Updated as File is Updated  Per Entry:  Value  Address of Data Instance  Additional Pages for Access Speed  Pages may be ½ full

Copyright 2007, Information Builders. Slide 9 The File is Too Large Estimating File Size SEGNAME=EMPINFO, SEGTYPE=S1 FIELDNAME=EMP_ID, ALIAS=EID, FORMAT=A9, INDEX=I, $ 9 FIELDNAME=LAST_NAME, ALIAS=LN, FORMAT=A15, $ 15 FIELDNAME=FIRST_NAME, ALIAS=FN, FORMAT=A10, $ 10 FIELDNAME=HIRE_DATE, ALIAS=HDT, FORMAT=YYMD, $ 4 FIELDNAME=DEPARTMENT, ALIAS=DPT, FORMAT=A10, $ 10 FIELDNAME=CURR_SAL, ALIAS=CSAL,FORMAT=D12.2M, $ 8 FIELDNAME=CURR_JOBCODE,ALIAS=CJC, FORMAT=A3, $ 3 FIELDNAME=ED_HRS, ALIAS=OJT, FORMAT=F6.2, $ 4 +1 Pointers: 4 (3 – Parent – to – Child, 1 – Chain) = 16 bytes Data: 63 Bytes + 1 “filler” = 64 bytes Total: 80 bytes (3968 / 80 = 49.6) Instances/Page 49 EX CALCFILE filename EMPINFO 01 S1 ************** *EMP_ID **I *LAST_NAME ** *FIRST_NAME ** *HIRE_DATE ** * ** *************** ************** I I I I I FUNDTRAN I PAYINFO I SALINFO 02 I U 03 I SH1 08 I SH1 ************** ************** ************** *BANK_NAME * *DAT_INC ** *PAY_DATE ** *BANK_CODE * *PCT_INC ** *GROSS ** *BANK_ACCT * *SALARY ** *NET ** *EFFECT_DATE * *JOBCODE ** *CHECK_NO **I * * * ** * ** ************** *************** *************** ************** **************

Copyright 2007, Information Builders. Slide 10 The File is Too Large What to Do?  Change to XFOCUS Database  16K page size  1024 pages per filename  Internal, External or MDI indexes  Partition  Horizontal Partitioning  Partition by SEGMENT  MODIFY / TABLE – No Changes  Vertical Partitioning  Partition by Value  “Intelligent Partitioning”  Only first partition used in MODIFY  May need to use COMBINE for MODIFY  External Index needed for JOIN

Copyright 2007, Information Builders. Slide 11 DN Horizontal Partitioning 2 Copyright © 2001 Information Builders, Inc.

Copyright 2007, Information Builders. Slide 12 The File is Too Large HEmploye File EMPINFO 01 S1 ************** *EMP_ID **I *LAST_NAME ** *FIRST_NAME ** *HIRE_DATE ** * ** *************** ************** I I I I I FUNDTRAN I PAYINFO I SALINFO 02 I U 03 I SH1 08 I SH1 ************** ************** ************** *BANK_NAME * *DAT_INC ** *PAY_DATE ** *BANK_CODE * *PCT_INC ** *GROSS ** *BANK_ACCT * *SALARY ** *NET ** *EFFECT_DATE * *JOBCODE ** *CHECK_NO **I * * * ** * ** ************** *************** *************** ************** **************

Copyright 2007, Information Builders. Slide 13 The File is Too Large ACCESS File Points to the FOCUS Files FILENAME=HEMPLOYE, SUFFIX=FOC,ACCESS=HEMPLOYE,$ SEGNAME=EMPINFO, SEGTYPE=S1 FIELDNAME=EMP_ID, ALIAS=EID, FORMAT=A9, INDEX=I,$... SEGNAME=FUNDTRAN, SEGTYPE=U, PARENT=EMPINFO, LOCATION = FUNDS FIELDNAME=BANK_NAME, ALIAS=BN, FORMAT=A20, $... SEGNAME=PAYINFO, SEGTYPE=SH1, PARENT=EMPINFO FIELDNAME=DAT_INC, ALIAS=DI, FORMAT=MDYY, $... SEGNAME=SALINFO, SEGTYPE=SH1, PARENT=EMPINFO, LOCATION = SALES FIELDNAME=PAY_DATE, ALIAS=PD, FORMAT=MDYY, $... MASTER File

Copyright 2007, Information Builders. Slide 14 The File is Too Large ACCESS File Points to the FOCUS Files MASTER = HEMPLOYE DATA = IBIBJS.HEMPLOYE.FOCUS,$ LOCATION = FUNDS LOCATIONDATA = IBIBJS.FUNDS.DATA,$ LOCATION = SALES LOCATIONDATA = IBIBJS.SALES.DATA,$ ACCESS File

Copyright 2007, Information Builders. Slide 15 DN Vertical Partitioning 2 Copyright © 2001 Information Builders, Inc.

Copyright 2007, Information Builders. Slide 16 The File is Too Large USEmploye File USEMP FOCUS USSALS FOCUS USFUND FOCUS EMPINFO 01 S1 ************** *EMP_ID **I *LAST_NAME ** *FIRST_NAME ** *HIRE_DATE ** * ** *************** ************** I I I I I FUNDTRAN I PAYINFO I SALINFO 02 I U 03 I SH1 08 I SH1 ************** ************** ************** *BANK_NAME * *DAT_INC ** *PAY_DATE ** *BANK_CODE * *PCT_INC ** *GROSS ** *BANK_ACCT * *SALARY ** *NET ** *EFFECT_DATE * *JOBCODE ** *CHECK_NO **I * * * ** * ** ************** *************** *************** ************** **************

Copyright 2007, Information Builders. Slide 17 The File is Too Large CAEmploye File CAEMP FOCUS CASALS FOCUS CAFUND FOCUS EMPINFO 01 S1 ************** *EMP_ID **I *LAST_NAME ** *FIRST_NAME ** *HIRE_DATE ** * ** *************** ************** I I I I I FUNDTRAN I PAYINFO I SALINFO 02 I U 03 I SH1 08 I SH1 ************** ************** ************** *BANK_NAME * *DAT_INC ** *PAY_DATE ** *BANK_CODE * *PCT_INC ** *GROSS ** *BANK_ACCT * *SALARY ** *NET ** *EFFECT_DATE * *JOBCODE ** *CHECK_NO **I * * * ** * ** ************** *************** *************** ************** **************

Copyright 2007, Information Builders. Slide 18 The File is Too Large EUEmploye File EUEMP FOCUS EUSALS FOCUS EUFUND FOCUS EMPINFO 01 S1 ************** *EMP_ID **I *LAST_NAME ** *FIRST_NAME ** *HIRE_DATE ** * ** *************** ************** I I I I I FUNDTRAN I PAYINFO I SALINFO 02 I U 03 I SH1 08 I SH1 ************** ************** ************** *BANK_NAME * *DAT_INC ** *PAY_DATE ** *BANK_CODE * *PCT_INC ** *GROSS ** *BANK_ACCT * *SALARY ** *NET ** *EFFECT_DATE * *JOBCODE ** *CHECK_NO **I * * * ** * ** ************** *************** *************** ************** **************

Copyright 2007, Information Builders. Slide 19 The File is Too Large ACCESS File Points to the FOCUS Files MASTER = HEMPLOYE,$ DATA = c:\ibi\apps\hr\hemploye.foc,$ LOCATION = FUNDS LOCATIONDATA = c:\apps\hr\funds.foc,$ LOCATION = SALES LOCATIONDATA = c:\ibi\apps\hr\sales.foc,$ DATA = c:\ibi\apps\hrca\hemploye.foc,$ LOCATION = FUNDS LOCATIONDATA = c:\ibi\apps\hrca\funds.foc,$ LOCATION = SALES LOCATIONDATA = c:\ibi\apps\hrca\sales.foc,$ DATA = c:\ibi\apps\hreu\hemploye.foc,$ LOCATION = FUNDS LOCATIONDATA = c:\ibi\apps\hreu\funds.foc,$ LOCATION = SALES LOCATIONDATA = c:\ibi\apps\hreu\sales.foc,$ ACCESS File

Copyright 2007, Information Builders. Slide 20 The File is Too Large ACCESS File Points to the FOCUS Files MASTER = HEMPLOYE,$ DATA = c:\ibi\apps\hr\hemploye.foc,$ WHERE=DEPARTMENT EQ ‘MIS’ OR ‘PRODUCTION’,$ LOCATION = FUNDS LOCATIONDATA = c:\apps\hr\funds.foc,$ LOCATION = SALS LOCATIONDATA = c:\ibi\apps\hr\sales.foc,$ DATA = c:\ibi\apps\hrca\hemploye.foc,$ WHERE= DEPARTMENT EQ ‘CANADA’,$ LOCATION = FUNDS LOCATIONDATA = c:\ibi\apps\hrca\funds.foc,$ LOCATION = SALS LOCATIONDATA = c:\ibi\apps\hrca\sales.foc,$ DATA = c:\ibi\apps\hreu\hemploye.foc,$ WHERE=DEPARTMENT EQ ‘EUROPE’,$ LOCATION = FUNDS LOCATIONDATA = c:\ibi\apps\hreu\funds.foc,$ LOCATION = SALS LOCATIONDATA = c:\ibi\apps\hreu\sales.foc,$

Copyright 2007, Information Builders. Slide 21 The File is Too Large Intelligent USE – no ACCESS File -IF &DEPARTMENT NE ‘ALL’ GOTO USESOME; -USEALL USE USEMP AS HEMPLOYE USFUND AS FUNDS USSALS AS SALES CAEMP AS HEMPLOYE CAFUND AS FUNDS CASALS AS SALES EUEMP AS HEMPLOYE EUFUND AS FUNDS EUSALS AS SALES END -GOTO SKIPIT -USESOME USE -SET &PREF = IF &DEPARTMENT EQ ‘CANADA’ THEN ‘CA’ ELSE - IF &DEPARTMENT EQ ‘EUROPE’ THEN ‘EU’ ELSE ‘US’; &PREF|EMP AS HEMPLOYE &PREF|FUND AS FUNDS &PREF|SALS AS SALES END -SKIPIT

Copyright 2007, Information Builders. Slide 22 The File is Too Large Vertical Partition Concerns A Vertical Partitioned Database is not MODIFIED. Only a Single Partition (first in ACCESS file) is Updateable. Solution: Have separate Masters for MODIFY Purposes: COMBINE USEMP AND CAEMP AND EUEMP AS COMBO MODIFY FILE COMBO FIXFORM DEPARTMENT/A10 … IF DEPARTMENT EQ ‘CANADA’ GOTO CANADACASE; IF DEPARTMENT EQ ‘EUROPE’ GOTO EUROPECASE; MATCH EMP_ID … CASE CANADACASE COMPUTE CADEPARTMENT = DEPARTMENT; CAEMP = EMP_ID; … MATCH CAEMP … ENDCASE CASE EUROPECASE COMPUTE EUDEPARTMENT = DEPARTMENT; EUEMP = EMP_ID

Copyright 2007, Information Builders. Slide 23 The File is Too Large Vertical Partition Concerns  Internal Indexes are Separate for each Vertical Partition.  Cannot JOIN to a concatenated file.  Solution:  Keep “archived Data” in several partitions) with External Index (or MDI)  Keep Active Data in separate “modifiable” database  Periodically create new archive partition, and ADD to External index  Use MORE to concatenate active with Archive for reporting.

Copyright 2007, Information Builders. Slide 24 The File is Too Large Vertical Partition Concerns FILE=CUSTOMER,SUFFIX=FOC, DATA=c:\ibi\apps\customer.foc,$ SEGNAME = CSEG,SEGTYPE=S1 FIELD=CUSTOMER_ID,,A9,$ FIELD=CUSTOMER_NAME,,A20,INDEX=I,$ … FILE=ACUSTMER,SUFFIX=FOC, DATA=c:\ibi\apps\customer.foc,$ SEGNAME = CSEG,SEGTYPE=S1 FIELD=CUSTOMER_ID,,A9,$ FIELD=CUSTOMER_NAME,,A20,INDEX=I,$ …  One Customer File Orders for Current Year are “active”.  Find all Orders, Current and Prior for Given Customer Two Masters, Same Dataset CUSTOMER.MAS ACUSTMER.MAS

Copyright 2007, Information Builders. Slide 25 The File is Too Large Vertical Partition Concerns FILE=AORDERS,SUFFIX=FOC, DATA=c:\ibi\apps\aorders.foc,$ SEGNAME = OSEG,SEGTYPE=SH1 FIELD=ORDER_NO,,A9,$ FIELD=CUSTOMER,,A9,INDEX=I,$ FIELD=YEAR, ORDER_YEAR,,YY,$ … FILE=ORDERS,SUFFIX=FOC,$ SEGNAME = OSEG,SEGTYPE=SH1 FIELD=ORDER_NO,,A9,$ FIELD=CUSTOMER,,A9,INDEX=I,$ FIELD = YEAR, ORDER_YEAR,,YY,$ … Two Masters, Multiple Datasets AORDERS.MAS ORDERS.MAS

Copyright 2007, Information Builders. Slide 26 The File is Too Large Vertical Partition Concerns -* External Indexes USE -- MDI specified in ACX USE c:\apps\ord2007 AS ORDERS c:\apps\ord2006 AS ORDERS c:\apps\ord2005 AS ORDERS c:\apps\ordhist AS ORDERS C:\apps\ordidx WITH ORDERS END JOIN CUSTOMER_NUMBER IN CUSTOMER TO ALL CUSTOMER_NUMBER IN ORDERS AS AJ JOIN CUSTOMER_NUMBER IN ACUSTMER TO ALL CUSTOMER_NUMBER IN AORDERS AS BJ TABLE FILE CUSTOMER PRINT … BY CUSTOMER_NUMBER BY HIGHEST ORDER_DATE MORE FILE ACUSTMER END …

Copyright 2007, Information Builders. Slide 27 File is Too Large