[Zope] db newbie

Rik Hoekstra rik.hoekstra@inghist.nl
Thu, 14 Sep 2000 10:23:03 +0200


> >I feel strange, asking such basic questions, but I don't really know
where
> >to get started. I know a little bit about relational databases, but only
a
> >little. I've seen in the zope tutorial that you can send an SQL query to
the
> >database and use it to populate a list, but where do you build the
initial
> >database? I have MS Access. Do I build something in that on my desktop
and
> >upload it somewhere? Do I create a form to create the db from scratch?
>
> Well, I don't think you will find a step-by-step "How do I build a DB and
> use it in Zope", since Zope really does not deal with the issue. If you
> have a Linux box (please tell me you do), you can install postgres and
> follow their instructions of how to get PostGreSQL running. Then you
create
> a database in Linux.
>

Nope, but it is easy, even in Access (you can always move to something
serious later, as long as you stick with standard SQL). Create a database in
Access with the structure you desire (or use something you need)
Install Zope and a database adapter (this is a connector for databases). In
the case of Access that is the ZODBC adapter or the ZJetDA (or something
similar available from the products page on Zope.org).
Different from building something in Access, you'll have to talk to Access
through your Zope installation, using ZSQL Methods as described by Stephan.
To get yourself going you need the ZSQL Guide, available from the Zope site
(http://www.zope.org/Documentation/Guides/ZSQL). There are also some more
specialized guides about inserting data with Zope

Some URLs:
You can also create tables using SQL Methods (i.e. without using Access at
all). See
http://www.zope.org/Members/jshell/ZSQLMethods-CreatingTables

http://www.zope.org/Members/roberth/ZMSSQLServer (about using SQL Server,
but most of it also applies for Access)
http://www.zope.org/Documentation/How-To/SQLInsert (simple inserting data)
and a more thorough treatment of the same subject in
http://www.zope.org/Members/jshell/ZSQLMethods-InsertingData

There is also a plugin product for a SQL Input Wizard (which I have never
used myself) @
http://www.zope.org/Members/zwork/Znolk_SQL_Wizard/Znolk-0.1.3.tgz/

There is more, but this should be enough to get you started

Apart from SQL Methods you'll need ZSearchInterfaces. They are a standard
component (product) in your ZOpe installation. If given a ZSQL query,
they'll construct a search and result form for you automatically. You can
then adapt it to your needs.

All this will take a change in your way of thinking, but once you get it,
you'll get results quickly.

<snip instructions>

>
> I know my instructions are very short, but I don't have enough time to
> write many details, but I want to get you started. BTW, please do yourself
> a favor and do not run anything serious on Windoze and especially Access.
:-

In principle you're right Stephan, but for many of us the choice is already
made... This said, I've had very good experiences with Zope on WinNT (runs
for months on an end without problems even with Access backends. Yes, I
know....)


Hope this gets you started

Rik