Coder Social home page Coder Social logo

norm's Introduction

What is NORM?

NORM stands for No ORM framework. NORM is not a PosgreSQL extention, not a library, and not a set of functions.

NORM is a methodology which allows object-oriented applications to interact with relational databases directly, without involving any ORM. Why do we want to avoid ORM? Because it negatively impacts application performance.

This meethodology was developed by Hettie Dombrovskaya and Boris Novikov and was fully impolemented at Braviant Holidings, Chicago IL.

What's in the repo?

The purpose of this repo is to provide a working example of the usage of NORM methodology.

TOC:

  • The doc directory contains: a list of publications on NORM and a ppt of the presentation from SOFSEM 2020 conference, where NORM was first officially announced.Take a look to find out why NORM was developed, and what are the advantages of this approach.
  • The sql directory contains a working example of NORM usage. Take a look to see to build PostgreSQL types and functions using NORM technology.
  • To install this example, run the _load.all file from the sql directory
  • See file sql\examples.sql for usage

Quick Start

Watch the video below from PostgresBuild2020 Conference, online

PostgresBuild 2020 recording

More on the NORM example

create_tables.sql creates three tables: account, phone and email and some lookiups.

initial_data_insert.sql does exactly what you think it does

array_transport.sql creates an array_transport funcion. That is the only function you need to save for future use, if you want to try the NORM approach in your company.

account_pkg.sql presents the NORM approach. In our approach, we combine the UDT definitions and corresponding functions into one file, which we call a package, referencing Oracle packages.

It includes types definitions, account_create function, account_search_by_id for simple search and account_search for complex search on the combination of criteria. The matching "select" functions convert the output into JSON converted to text for data transfer purposes.

Please refer to the presentation to learn why we are doing the transformation as a separate step.

Finally,the account_update function performs the update of complex object. In addition to update, it can also insert and delete detailed objects.

Note, that both insert and update functions also return new/modified object(s)

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.