Submitted to :

Submitted by:


MBA-IB 3rd sem
Roll no: 17


and Mac . make-to-stock. support for multiple tax structures. . fully integrated accounting.INTRODUCTION OpenMFG (usually abbreviated "OMFG") is an open source based. infinite-level bills of material. and CRM enterprise software solution.and is internationalized (multicurrency. accounts receivable and payable. shipping) CRM (universal address book. support for make-to-order. Linux. order entry. incident management. Buffer Management-TOC) OpenRPT open source report writer OpenMFG runs on Windows. other advanced warehouse features) Manufacturing (work orders. Built with the open source PostgreSQL database. breeder bills of material. and the open source Qt framework from Trolltech for C++. to-do lists. opportunity management. bank reconciliation. repetitive) Planning (Manufacturing Requirements Planning-MRP. and multilingual translation packs maintained by a global community). financial reporting) Sales (quotes. receiving. from xTuple. vendor reporting) Product Definition (items. multiple locations. project management) Purchasing (purchase orders. Master Production Scheduling-MPS. ERP. it provides functionality for a range of businesses and industries. general ledger. sales reporting. costing) Inventory (multiple facility. bills of operations. OpenMFG is licensed under the "xTuple Commercial End User License". It includes the following modules:          Accounting (multi-company.

It lets application developers target all major operating systems (Windows.customer relationship management. or function. and Mac. The company utilizes open source technologies.this allows for a client that looks and feels exactly the same on Windows. VARs. called PL/pgSQL. rich graphical user interface (GUI) client . file handling.a financial account being credited or debited. all get the source code and have the ability to contribute back to the base application. etc. trigger.Overview OpenMFG is a manufacturing-centric enterprise resource planning solution which includes functionality to cover business processes for multiple manufacturing segments. All the business logic resides in the procedural language of the open source database PostgreSQL. and desktop office productivity software. wireless devices. providing the application programmer with a single. development partners). The Qt library encapsulates the different APIs of different operating systems. Mac) with a single application source code. common API for all operating systems. . or an order being taken . Qt provides a platform-independent API to all central platform functionality: GUI. Whenever any kind of transaction is taking place in the system . and accounting. allowing for a variety of client interfaces and scalability unbound by client-side limitations. The primary interface today is a full. Linux/Unix. a piece of inventory being moved. Linux/Unix. The OpenMFG Community (customers. and an open source development philosophy to offer its customers a hybrid open source/proprietary solution. from Trolltech. OpenMFG Server/Business Logic The OpenMFG application make heavy use of Postgres' embedded procedural language. Technology The two tier design of the OpenMFG intentionally places the burden of transaction processing on the server . headquartered in Norway. xTuple partners and customers have developed various alternative interfaces to access the Postgres backend database. The native C APIs are encapsulated in a set of object-oriented C++ classes. Qt is a C++ toolkit for application development. OpenMFG GUI Client The GUI client is written in Qt. including Web portals. This approach makes it relatively easy for other client software besides the OpenMFG graphical client to access business functionality. networking.that is happening in a Postgres stored procedure.specifically the database server. database access.

[13] It is free and open source software. released under the terms of the PostgreSQL License. securely and supporting best practices. by its extensive standard SQL support and available migration tools. supports functions and stored procedures. . starting with OS X 10. and other expandability. Solaris. such as for Oracle. and retrieve it later. PostgreSQL implements the majority of the SQL:2011 standard. by its extensibility that can emulate many through some built-in and third-party open source compatibility extensions. be it those on the same computer or those running on another computer across a network (including the Internet). Mac OS X.PostgreSQL PostgreSQL. Recent versions also provide replication of the database itself for security and scalability. FreeBSD. often simply "Postgres". as requested by other software applications.7 Lion. PostgreSQL is developed by the PostgreSQL Global Development Group. triggers. provides immunity to dirty reads and fullserializability. has updateable views and materialized views. PostgreSQL is cross-platform and runs on many operating systems including Linux. is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standardscompliance. has the server as its standard default database in the server edition. a diverse group of many companies and individual contributors. And if proprietary extensions had been used. PostgreSQL supports migration from them. It can handle workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users. is ACIDcompliant and transactional (including most DDL statements) avoiding locking issues using multiversion concurrency control (MVCC). As a database server. and Microsoft Windows. In addition to the possibility of working with the major proprietary and open source databases.[10] and has a large number of extensions written by third parties. a permissive free software license. foreign keys. handles complex SQL queries using many indexing methods that are not available in other databases. its primary function is to store data. The vast majority of Linux distributions have it available in supplied packages.[11][12] and PostgreSQL client tools in the desktop edition.

Yu and Chen released the code on the web.[18] These features included the ability to define types and to fully describe relationships – something used widely before but maintained entirely by the user. By 1993 the great number of users began to overwhelm the project with requests for support and features. The new project. In July 1996. coordinating via the Internet. Berkeley.[19] Starting in 1986. Postgres used many of the ideas of Ingres. The first open-source version was released on August 1. and added support for multiple storage managers and an improved query engine. With the participation of Bruce Momjian and Vadim B. aimed to add the fewest features needed to completely support types. In 1982 the leader of the Ingres team.History PostgreSQL evolved from the Ingres project at the University of California. and could retrieve information in related tables in a natural way using rules.0 in January 1997. Michael Stonebraker. But developers of open-source software could obtain copies and develop the system further. He returned to Berkeley in 1985 and started a post-Ingres project to address the problems with contemporary database systems that had become increasingly clear during the early 1980s. 1996. left Berkeley to make a proprietary version of Ingres. but not its code. then version 2 with a re-written rules system in June 1990. After releasing version 4 — primarily a cleanup — the project ended. the database "understood" relationships. Version 3. Mikheev. released in 1991. and by 1988 had a prototype Networking Services provided the first non-university development server for the open-source development effort. Since then a group of database developers and volunteers around the world has maintained the software. all available under its free and open-source . In Postgres. the POSTGRES team published a number of papers describing the basis of the system. again re-wrote the rules system. The Postgre SQL project continues to make major releases (approximately annually) and minor "bugfix" releases. because Berkeley had released Postgres under an MIT-style license. The first PostgreSQL release formed version 6. creating Postgres95. POSTGRES. work began to stabilize the code inherited from Berkeley. Berkeley graduate students Andrew Yu and Jolly Chen replaced the Ingres-based QUEL query language interpreter with one for the SQL query language. In 1996 the project was renamed to PostgreSQL to reflect its support for SQL. Marc Fournier at Hub. In 1994. The team released version 1 to a small number of users in June 1989.

Beginning from version 9. the durability of a transaction (whether it is asynchronous or synchronous) can be specified per-database. where earlier versions would only allow that after promoting them to be a new master. consistency. includes built-in binary replication. Prior to PostgreSQL 9.0. requesting Serializable provided the same isolation level as Repeatable Read. This can be useful for work loads that do not require such guarantees. Because PostgreSQL is immune to dirty reads. Repeatable Read and Serializable.1. durability) principles in an efficient manner. isolation.0 also introduced the ability to run read-only queries against these replicated slaves. PostgreSQL also includes built-in synchronous replication that ensures that. allowing changes to be made without being visible to other transactions until the changes are committed. and open-source programmers at large. Multiversion concurrency control (MVCC) PostgreSQL manages concurrency through a system known as multiversion concurrency control (MVCC). and ensures the database maintains the ACID (atomicity. This largely eliminates the need for read locks. per-user. and may not be wanted for all data as it will have some negative effect on . support companies.1 and later support full serializability via the serializable snapshot isolation (SSI) technique. which gives each transaction a "snapshot" of the database. Earlier replication software that allowed similar read scaling normally relied on adding replication triggers to the master. Version 9. PostgreSQL offers three levels of transaction isolation: Read Committed. Unlike other database systems. requesting a Read Uncommitted transaction isolation level provides read committed instead. per-session or even pertransaction. Storage and replication Replication PostgreSQL. Code comes from contributions from proprietary Postgre SQL License. This allows splitting read traffic among multiple nodes efficiently. beginning with version 9. for each write transaction. the master waits until at least one slave node has written the data to its transaction log.1. introducing additional load onto it. PostgreSQL 9. based on shipping the changes (write-ahead logs) to slave systems asynchronously.

. which only index part of a SymmetricDS multi-master. but discouraged because they cannot be recovered after a crash or power loss. multi-tier replication Indexes PostgreSQL includes built-in support for regular B-tree and hash indexes. These remain useful even after introduction of the expanded core capabilities. A similar project is called Postgres-XL and is available under the Mozilla Public License. This allows a smaller index to be created. instead of simply the value of a column. can be created by adding a WHERE clause to the end of the CREATE INDEX statement. it falls to the next in line. user-defined index methods can be created. Indexes in PostgreSQL also support the following features:   Expression indexes can be created with an index of the result of an expression or function. A list of synchronous standby servers can be specified in the configuration which determines which servers are candidates for synchronous replication.performance due to the requirement of the confirmation of the transaction reaching the synchronous standby. Partial indexes. The first in the list which is currently connected and actively streaming is the one that will be used as the current synchronous server. When this fails. Postgres-XC which is based on PostgreSQL provides scalable synchronous multi-master replication. and two types of inverted indexes: generalized search trees (GiST) and generalized inverted indexes (GIN). Synchronous multi-master replication is currently not included in the PostgreSQL core.1 is licensed under the same license as PostgreSQL. There are also several asynchronous trigger-based replication packages for PostgreSQL. The community has also written some tools to make managing replication clusters easier. Hash indexes are implemented. There can be a mixture of synchronous and asynchronous standby servers. part of SkyTools (developed by Skype) Bucardo multi-master replication (developed by Backcountry. although this is quite an involved process.[22] available in version 1. such as repmgr. In addition. for situations where binary replication of an entire database cluster is not the appropriate approach:    Slony-I Londiste.

New objects are created in whichever valid schema (one that presently exists) is listed first in the search path. Data types A wide variety of native data types are supported. This is achieved without exhaustive matching of values. contains the special schema name of "$user".2 and above. char) Binary Date/time (timestamp/time with/without timezone. or close objects or locations with geospatial data. nor is it possible to create a "symbolic link" pointing to another schema or object. If such a schema is not found. interval) Money Enum Bit strings Text search type . Schemas effectively act like namespaces. allowing objects of the same name to co-exist in the same database. it then proceeds to the next schema. it would first look for a schema also named "dave" when referring to any objects). by default. date. all objects (with the exception of roles and tablespaces) are held within a schema. Schemas are analogous to directories in a file system. varchar. including:          Boolean Arbitrary precision numerics Character (text. The planner is capable of using multiple indexes together to satisfy complex queries. index-only scans often allow the system to fetch data from indexes without ever having to access the main table.  As of PostgreSQL 9. if the user "dave" were connected.g. k-nearest neighbors (k-NN) indexing (also referred to KNN-GiST) provides efficient searching of "closest values" to that specified. Schemas In PostgreSQL. which can be configured on a database or role level. By default. databases are created with the "public" schema.1. using temporary in-memory bitmap index operations. A "search_path" determines the order in which schemas are checked on unqualified objects (those without a prefixed schema). but any additional schemas can be added. except that they cannot be nested. which first looks for a schema named after the connected database user (e. useful to finding similar words. and the public schema isn't mandatory. The search path.  In PostgreSQL 9.

time stamps (with and without time zone) and dates. big integers. Custom range types can be created to make new types of ranges available.2 and up) In addition. right of etc. a data type that represents a range of data can be used which are called range types. which is the same as any other data type but with optional constraints defined by the creator of that domain. or float ranges using the float data type as a base. users can create their own data types which can usually be made fully indexable via PostgreSQL's GiST infrastructure.2. This means any data entered into a column using the domain will have to conform to whichever constraints were defined as part of the domain. Range types support inclusive and exclusive range boundaries using the [] and () characters respectively.g. containment.g. including:  Casts  Conversions  Data types  Domains . The built-in range types available include ranges of integers. Starting with PostgreSQL 9. (e. Examples of these include the geographic information system (GIS) data types from the PostGIS project for PostgreSQL. '[4.9)' represents all integers starting from and including 4 up to but not including 9. User-defined objects New types of almost all objects inside the database can be created. such as IP address ranges using the inet type as a base. any point in time between 10:00 am and 11:00 am). These can be discrete ranges (e. Geometric primitives IPv4 and IPv6 addresses CIDR blocks and MAC addresses XML supporting XPath queries UUID JSON (versions 9.g. including text and composite types) up to 1 GB in total storage size.) Range types are also compatible with existing operators used to check for overlap.         Composite HStore (an extension enabled key-value store within Postgres) Arrays (variable length and can be of any data type. decimal numbers. all integer values 1 to 10) or continuous ranges (e. There is also a data type called a "domain".

including aggregate functions and window functions  Indexes including custom indexes for custom types  Operators (existing ones can be overloaded)  Procedural languages Inheritance Tables can be set to inherit their characteristics from a "parent" table.1)  Online backup  Point-in-time recovery. Other types of constraints (unique. such as a file system. primary key. and even join multiple data sources together. Inheritance provides a way to map the features of generalization hierarchies depicted in Entity Relationship Diagrams (ERD) directly into the PostgreSQL database. All check constraints and not-null constraints on a parent table are automatically inherited by its children. or a web service. Inheritance can be used to implement table partitioning. implemented using write-ahead logging  In-place upgrades with pg_upgrade for less downtime (supports upgrades from 8. table constraints are not currently inheritable. i. unless data is selected from the parent table using the ONLY keyword. using either triggers or rules to direct inserts to the parent table into the proper child tables. Interfaces . As of 2010 this feature is not fully supported yet—in particular. Functions. column constraints.3. PostgreSQL can link to other systems to retrieve data via foreign data wrappers (FDWs). SELECT * FROM ONLY parent_table . Adding a column in the parent table will cause that column to appear in the child table. and foreign key constraints) are not inherited.e. and row checks  Binary and textual large-object storage  Tablespaces  Per-column collation (from 9.1. This means regular database queries can use these data sources like regular tables. These can take the form of any data source. Data in child tables will appear to exist in the parent tables. Other storage features  Referential integrity constraints including foreign key constraints.x and later) Control and connectivity Foreign data wrappers As of version 9. another RDBMS.

. PostgreSQL has built-in support for three procedural languages:  Plain SQL (safe). which resembles Oracle's PL/SQL procedural language and SQL/PSM. These functions can be used to buildtriggers (functions invoked upon modification of certain data) and custom aggregate functions. Some languages like Perl provide both safe and unsafe versions. but bugs in code can crash and potentially corrupt the database.  C (unsafe). but can also access sources external to the database. External interfaces include:  libpqxx: C++ interface  PostgresDAC: PostgresDAC (for Embarcadero RadStudio/Delphi/CBuilder XE-XE3)  DBD::Pg: Perl DBI driver  JDBC: JDBC interface  Lua: Lua interface  Npgsql: .  PL/pgSQL (safe).js interface  pgoledb: OLEDB interface  psqlODBC: ODBC interface  psycopg2: Python interface (also used by HTSQL)  pgtclng: Tcl interface  pyODBC: Python library  php5-pgsql: PHP driver based on libpq  postmodern: A Common Lisp interface Procedural languages Procedural languages allow developers to extend the database with custom subroutines (functions). often called stored procedures.NET data provider  ST-Links SpatialKit: Link Tool to ArcGIS  node-postgres: Node. Simpler SQL functions can get expanded inline into the calling (SQL) query. Procedural languages can also be invoked without defining a function. using the "DO" command at SQL level. Procedures written in "unsafe" languages can only be created bysuperusers. Languages are divided into two groups: "Safe" languages are sandboxed and can be safely used by any user. Functions written in C offer the best performance. Most built-in functions are written in C.PostgreSQL has several interfaces available and is also widely supported among programming language libraries. because they allow bypassing the database's security restrictions. Built-in interfaces include libpq (PostgreSQL's official C application interface) and ECPG (an embedded C system). which saves function call overhead and allows the query optimizer to "see inside" the function. which allows loading custom shared libraries into the database.

1 can have rules. There are external projects to add support for many other languages. Views in versions prior to 9. Python and Tcl. Such a system prevents the need for continuous polling by applications to see if anything has yet changed. along with the user-specified channel and an optional payload. JDBC.1. Three language extensions are included with PostgreSQL to supportPerl. to mark a particular event occurring. Multiple triggers are fired in alphabetical order. A session can issue a NOTIFY command. Many of the connectors for PostgreSQL provide support for this notification system (including libpq. or more properly. "Query Re-Write Rules".js) so it can be used by external applications. an INSERT statement might activate a trigger that checks if the values of the statement are valid. JavaScript (PL/V8). triggers can be per-column and conditional. triggers can also invoke functions written in other languages like PL/Python or PL/Perl. PostgreSQL allows procedural languages to be loaded into the database through extensions. As of PostgreSQL 9. Other sessions are able to detect these events by issuing a LISTEN command. in that messages are not sent until the transaction they were sent from is committed. psycopg and node. This eliminates the problem of messages being sent for an action being performed which is then rolled back. Npgsql. In addition to calling functions written in the native PL/pgSQL. Most triggers are only activated by either INSERT or UPDATE statements. Notifications are fully transactional. Triggers are fully supported and can be attached to tables. LISTEN and UNLISTEN commands. For example. including Java. In PostgreSQL 9. This functionality can be used for a wide variety of purposes.In addition. in that UPDATE triggers can target specific columns of a table. though. triggers can be attached to views by utilising the INSTEAD OF condition. are attached to a table/class and "Re-Write" the . such as letting other sessions know when a table has updated or for separate applications to detect when a particular action has been performed. Triggers Triggers are events triggered by the action of SQL DML statements. .0 and above. and reducing unnecessary overhead. Rules Rules allow the "query tree" of an incoming query to be rewritten. and triggers can be told to execute under a set of conditions as specified in the trigger's WHERE clause. Asynchronous notifications PostgreSQL provides an asynchronous messaging system that is accessed through the NOTIFY. which can listen to a particular channel. Rules.

schema or table levels.incoming DML (select. Embedding works also with C++ but it does not recognize all C++ constructs. and can also allow/prevent the creation of new objects at the database. even with that configuration option) Domains Savepoints Two-phase commit TOAST (The Oversized-Attribute Storage Technique) is used to transparently store large table attributes (such as big MIME attachments or XML messages) in a separate area. and cross joins Sub-selects  Correlated sub-queries Regular expressions[29] Common table expressions and writable common table expressions Encrypted connections via TLS (current versions do no use vulnerable SSL. Query ReWrite occurs after DML statement parsing. Embedded SQL is implemented using preprocessor. Other querying features              Transactions Full text search Views  Materialized views  Updateable views  Recursive views Inner. A role is generally regarded to be a user (a role that can log in). Permissions can be granted or revoked on any object down to the column level. update. with automatic compression. . or a group (a role which other roles are members of). outer (full. Then code is run through ECPG preprocessor. but before query planning. Security Security within the database is managed on a per-role-basis. SQL code is first written embedded into C code. Then code can be compiled using a C compiler. insert. left and right). and/or delete) into one or more queries that either replace the original DML statement or execute in addition to it. which replaces SQL with calls to code library.

BENIFITS OF ERP SOFTWARE 1. ident and certificate methods can also use a specified "map" file that lists which users matched by that authentication system are allowed to connect as a specific database user. This utilises PostgreSQL's SECURITY LABEL feature. PostgreSQL natively supports a broad number of external authentication mechanisms including:           password (either MD5 or plain-text) GSSAPI SSPI Kerberos ident (maps O/S user name as provided by an ident server to database user name) peer (maps local user name to database user name) LDAP  Active Directory RADIUS certificate PAM The GSSAPI. which determines what connections are allowed. These methods are specified in the cluster's host-based authentication configuration file (pg_hba. which authentication system will be enforced. 2. This could mean easy management of new processes. departments. Kerberos. With an ERP system. This allows control over which user can connect to which database. and whether the connection must use TLS. where they can connect from (IP address/IP address range/domain socket). and more. That means adding new functionality to the system as the business needs change is easy.1) provides an additional layer of security by integrating with SELinux.The sepgsql extension (provided with PostgreSQL as of version 9. peer. this possibility is eliminated as reporting . Improved reporting: Much of the inefficiency in operational work stems from improper reporting.conf). SSPI. Scalability: An ERP system is easily scalable.

demand forecasting.follows an automated template system. This makes the entire human resource chain more efficient. Data quality: As compared with manual record-keeping or other traditional approaches. allowing various departments to access information seamlessly. better business decisions can be reached. Better supply chain: Having the right ERP system in place means improved procurement. Improved data access: Controlling data access properly is always a challenge in organizations. Business analytics: Having high-quality data allows businesses to use the power of intelligent analytics tools to arrive at better business decisions. many good ERP systems have built-in analytics functionality to allow easier data analysis. Lower cost of operations: An ERP system introduces fundamental innovations in managing resources. With an ERP system. inventory. 4. this challenge is overcome with the use of advanced user management and access control. 9. the most important and recurring regulatory requirements can be built right into the system. 5. Reduced complexity: Perhaps the most elegant argument in the favor of ERP systems is that they reduce the complexity of a business and introduce a neatly designed system of workflows. an ERP system improves data quality by improving the underlying processes. 8. etc. which is indispensable to lowering costs. which eliminates delays and thus reduces cost of operations. essentially improving the entire supply chain and making it more responsive. Better CRM: A direct benefit of using a good ERP system is improved customer relations as a result of better business processes. 3. 10. As a result. . Regulatory compliance: Having the system in control means organizations can better comply with regulations. Further.. For instance. 7. 6. In fact. use of mobility allows real-time collection of data.