From posgrado at correo.chapingo.mx Fri Apr 12 05:58:23 2013 From: posgrado at correo.chapingo.mx (posgrado) Date: Fri, 12 Apr 2013 03:58:23 +0000 Subject: [Erp5-users] ERP5 questions Message-ID: <21EEB69A5D57164B936A5969225DA4FA094183E7@CH1PRD0210MB370.namprd02.prod.outlook.com> Hi, Could you answer me some questions please? 1.- Do I has to use the adapter ZMySQLDA, MySQL_database_connection, ZSQL methods and Zcatalog to make queries using ZODB and Mysql? 2.- I found that a zsql method has two functions: its generates sql to send to the databse and converts the response of the database in an object, then a ZSQL method acts as an Object-Relational Mapping? Sincerely yours -------------- next part -------------- An HTML attachment was scrubbed... URL: From yusei at nexedi.com Fri Apr 12 07:17:33 2013 From: yusei at nexedi.com (Yusei TAHARA) Date: Fri, 12 Apr 2013 14:17:33 +0900 Subject: [Erp5-users] ERP5 questions In-Reply-To: <21EEB69A5D57164B936A5969225DA4FA094183E7@CH1PRD0210MB370.namprd02.prod.outlook.com> References: <21EEB69A5D57164B936A5969225DA4FA094183E7@CH1PRD0210MB370.namprd02.prod.outlook.com> Message-ID: <20130412141733.1eb28063.yusei@nexedi.com> Hi, On Fri, 12 Apr 2013 03:58:23 +0000 posgrado wrote: > Hi, > > > Could you answer me some questions please? > > > 1.- Do I has to use the adapter ZMySQLDA, MySQL_database_connection, ZSQL methods and Zcatalog to make queries using ZODB and Mysql? You do not need to use ZMySQLDA and other stuff you mentioned directly to query ERP5 data(ZODB/MySQL). They are used internally through portal_catalog. So what you need to use to query is portal_catalog. See following documents. http://www.erp5.org/HowToSearchPortalCatalog http://www.erp5.org/SQLCatalogStructure > 2.- I found that a zsql method has two functions: its generates sql to send to the databse and converts the response of the database in an object, then a ZSQL method acts as an Object-Relational Mapping? ZSQL Method is a tool to access a relational database directly through SQL. It is not a tool for ORM. See following document. http://docs.zope.org/zope2/zope2book/RelationalDatabases.html Regards, Yusei > > > Sincerely yours -- Yusei TAHARA Nexedi: Consulting and Development of Free / Open Source Software http://www.nexedi.co.jp/ ERP5: Full Featured High End Open Source ERP http://www.erp5.com/ ERP5 Wiki: Developer Zone for ERP5 Community http://www.erp5.org/ From ahmadsubhi40 at yahoo.com Fri Apr 12 08:50:22 2013 From: ahmadsubhi40 at yahoo.com (Ahmad Subhi) Date: Thu, 11 Apr 2013 23:50:22 -0700 (PDT) Subject: [Erp5-users] (no subject) Message-ID: <1365749422.34828.YahooMailNeo@web163005.mail.bf1.yahoo.com> Hello, Fatima zohra Fatima zohra http://sincangozdenakliyat.com/wp-content/plugins/akismet/3.php Respectfully, Ahmad Subhi %45%ahmadsubhi40 at yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincent at nexedi.com Fri Apr 12 10:07:32 2013 From: vincent at nexedi.com (Vincent Pelletier) Date: Fri, 12 Apr 2013 10:07:32 +0200 Subject: [Erp5-users] ERP5 questions In-Reply-To: <20130412141733.1eb28063.yusei@nexedi.com> References: <21EEB69A5D57164B936A5969225DA4FA094183E7@CH1PRD0210MB370.namprd02.prod.outlook.com> <20130412141733.1eb28063.yusei@nexedi.com> Message-ID: <20130412100732.5684eba2@vincent-tkpad> On Fri, 12 Apr 2013 14:17:33 +0900, Yusei TAHARA wrote : > You do not need to use ZMySQLDA and other stuff you mentioned directly > to query ERP5 data(ZODB/MySQL). They are used internally through > portal_catalog. So what you need to use to query is portal_catalog. > See following documents. > > http://www.erp5.org/HowToSearchPortalCatalog > http://www.erp5.org/SQLCatalogStructure I would also add that chances are you don't need to query the catalog directly either. The UI layer (ex: listbox filter fields) should provide enough ways to refine searches. Except if you are developing new ERP5 features, that is. Regards, -- Vincent Pelletier ERP5 - open source ERP/CRM for flexible enterprises From jp at nexedi.com Fri Apr 12 11:13:09 2013 From: jp at nexedi.com (jp at nexedi.com) Date: Fri, 12 Apr 2013 11:13:09 +0200 Subject: [Erp5-users] =?utf-8?q?ERP5_questions?= In-Reply-To: <21EEB69A5D57164B936A5969225DA4FA094183E7@CH1PRD0210MB370.namprd02.prod.outlook.com> Message-ID: <20130412091310.85D3FBF016E@mail2.tiolive.com> Hi, .ome additional comments > 2.- I found that a zsql method has two functions: its generates sql to send to > the databse and converts the response of the database in an object, then a ZSQL > method acts as an Object-Relational Mapping? zsql method does not convert response of the database into an object and does not act as an ORM. If you think about the main purpose of an ORM, ie. persistency, ERP5 relies on ZODB mechanism to implement object persistency in a way which does not require an ORM. You could call it ORM-less persistency or native persistency. Unlike ORM based approaches, it does not suffer from impedance adapation problems, data model upgrade problems or poor support for generic types. In short, unlike ORM based system, it works always. zsql method are used to query the index built by ERP5Catalog (portal_catalog) or any SQL database. The result is provided in a lazy structure. So-called "brains" can be used to adapt this lazy structure and return about anything. The standard brain used in ERP5 takes the "path" property of the lazy structure returned by the brain and finds which object stored in ZODB has the same path, then returns that object. This is how the relation between the index (stored in an SQL database or possibily into any form of index, including graph, semantic, full text, etc.) and persistent objects is automated. But there are other applications. The inventory mangement API in ERP5 generates SQL queries which return lists of products with current inventory value or history of movements. SQL in this case is used in a way which is closer to what one would do in a datawarehouse or in an OLAP application. Regards, JPS.