Giter Site home page Giter Site logo

datashaper's Introduction

Datashaper Flow

  1. Analyse

  2. Replicate

  3. Analyse:

Requirements:

  1. Performance issue is always for a singular query, thus the datashape related to those tables should be replicated without retreving data.
  2. Upper limit on the number of tables = 10
  3. Table skew on defined fk should be replicated
  4. Intersecting child record shape should be replicated

Example scenarios

Person to Project: A person can belong to many project A Project can have many person working in it Thus m-n relationship

Input:

PERSON DEPARTMENT
department_id department_id_fk

output:

1 3 2 . . . . .
</result>

algorithm :

find total number of parent, write to xml find total number of child, write to xml for record in the parent table: find its child records get number of child for a parent record from the result set. Make an XML entity object with parent record id, count of child make a map of parent pk --> meta object
make a map of child --> parent

for every child in the map: if(number_of_parents(child)> 1 ) for every parent that it is associated to child parent.unique - 1

for every parent metaobject write metaboject

  1. Replication:

populate all the table with count records for every result: for every record: update unique in random balck list uniques update intersecting in random

Types of fk

Table to same table table to intersection table table to table x 2
table to child table

features: column density of fk columns average child number, show oddities

Now generates some kind of analytic information on a fk

AAAEAbAAEAAAADNAAB--> |AAAEAfAAEAAAADlAAB|AAAEAfAAEAAAADlAAC
AAAEAbAAEAAAADOAAD--> |AAAEAfAAEAAAADlAAD
AAAEAbAAEAAAADNAAC--> |AAAEAfAAEAAAADlAAA
AAAEAbAAEAAAADOAAC--> |AAAEAfAAEAAAADlAAG|AAAEAfAAEAAAADlAAJ
AAAEAbAAEAAAADNAAW--> |AAAEAfAAEAAAADlAAF
AAAEAbAAEAAAADNABM--> |AAAEAfAAEAAAADlAAH|AAAEAfAAEAAAADlAAI
AAAEAbAAEAAAADNAAO--> |AAAEAfAAEAAAADlAAE

-->-->-->-->-->-->--
Child --> Parent
AAAEAfAAEAAAADlAAF--> |AAAEAbAAEAAAADNAAW
AAAEAfAAEAAAADlAAG--> |AAAEAbAAEAAAADOAAC
AAAEAfAAEAAAADlAAD--> |AAAEAbAAEAAAADOAAD
AAAEAfAAEAAAADlAAE--> |AAAEAbAAEAAAADNAAO
AAAEAfAAEAAAADlAAJ--> |AAAEAbAAEAAAADOAAC
AAAEAfAAEAAAADlAAH--> |AAAEAbAAEAAAADNABM
AAAEAfAAEAAAADlAAI--> |AAAEAbAAEAAAADNABM
AAAEAfAAEAAAADlAAB--> |AAAEAbAAEAAAADNAAB
AAAEAfAAEAAAADlAAC--> |AAAEAbAAEAAAADNAAB
AAAEAfAAEAAAADlAAA--> |AAAEAbAAEAAAADNAAC


<Results>
	<Result id=" AAAEAbAAEAAAADNAAB" table="Employees" >
		<count>2</count>
		<unique>2</unqiue>
		<shared>0</shared>
	</Result>
	<Result id=" AAAEAbAAEAAAADOAAD" table="Employees" >
		<count>1</count>
		<unique>1</unqiue>
		<shared>0</shared>
	</Result>
	<Result id=" AAAEAbAAEAAAADNAAC" table="Employees" >
		<count>1</count>
		<unique>1</unqiue>
		<shared>0</shared>
	</Result>
	<Result id=" AAAEAbAAEAAAADOAAC" table="Employees" >
		<count>2</count>
		<unique>2</unqiue>
		<shared>0</shared>
	</Result>
	<Result id=" AAAEAbAAEAAAADNAAW" table="Employees" >
		<count>1</count>
		<unique>1</unqiue>
		<shared>0</shared>
	</Result>
	<Result id=" AAAEAbAAEAAAADNABM" table="Employees" >
		<count>2</count>
		<unique>2</unqiue>
		<shared>0</shared>
	</Result>
	<Result id=" AAAEAbAAEAAAADNAAO" table="Employees" >
		<count>1</count>
		<unique>1</unqiue>
		<shared>0</shared>
	</Result>
</Results>

datashaper's People

Watchers

James Cloos avatar Akhil Raj R avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.