+1 for the books of silverston, this is a must read when implementing such system
btw : the default persons-organization model of Camelot is based on this book On Oct 29, 2:40 pm, Mark Erbaugh <m...@microenh.com> wrote: > On Oct 29, 2010, at 6:12 AM, Dan @ Austria wrote: > > > > > Hi, > > > i have a question to database/design specialist. How can (should!) i > > implement a stock management system in sql-alchemy and python? I get > > the following data from another system via files > > > - movements: bills from a scanner at a cash deck > > - movements: from goods-receipt > > > Of course i have also master data on an per article basis. > > > What i want do is keep charge of the stock available in our warehouse. > > Should i built a warehouse table with > > [ article / amount of article available ] > > > and update the articles with an update statement like UPDATE > > warehouse_table SET amount = amount - (bill amount) where article = > > bill_article ? Would that be a good solution? > > > Is there any literature or reference implementations around? Any hint > > is much apreciated. Although i have written a couple of database > > applications, i never had the probleme to change a field (amount field > > per article) so often. I guess there is a lot of data comming in ... > > I have a book that I have that gives data models, including those for > inventory management is "The Data Model Resource Book, Revised Edition, > Volume 1" by Len Silverston. The models presented are quite complex though > and intended to be refined by the designer by removing complexity that isn't > needed for a given application. One beef I have with the book is that even > though the book is priced higher than many computer books (about $60 US) at > Amazon and comes with a CD-ROM, the schema for the data which is printed in > the book is only available from the CD once you purchase a license (about > $200, if I recall) to unlock it. > > The Revised Edition is copyright 2001. > > More information is athttp://silverston.wiley.com/ > > While you can use SQL statements directly with SQLAlchemy, you should > consider using SA methods. For an example of what you suggest with your SQL > look for the Correlated Updates section in the SQL Expression Language > Tutorial in the SA docs. > > Mark -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.