On Thu, Jul 10, 2008 at 8:20 AM, Heston James
<[EMAIL PROTECTED]> wrote:
>
> Good afternoon guys,
>
> I'm brand new to SQLAlchemy as of about 2 minutes ago, I have a couple
> of starter questions that I wanted to run past you, with any luck
> they'll be simple for you to answer.
>
> After looking through the quick tutorial, which showed me just about
> all I need to know http://www.sqlalchemy.org/docs/05/ormtutorial.html
> it talks about connecting to an in memory sqllite database using a
> connection string like so:
>
> create_engine('sqlite:///:memory:', echo=True)
>
Here is a list of possible connection strings. Its more towords
turbogears way but it will get you started.
http://lucasmanual.com/mywiki/TurboGears#head-8457721059b18a5f2264f8484082deb5b294d27a

Here is sqlalchemy:
http://www.sqlalchemy.org/docs/05/dbengine.html#dbengine_establishing

(ps. could you guys add the connection strings to you docs I have
listed them in the top link. I've mentioned this before but I guess it
wasn't added to you official docs back then.)

And you should read over:
http://www.rmunn.com/sqlalchemy-tutorial/tutorial.html


> How would I connect to a local MySQL database? The database I'm
> working with is already designed and built, which leads me onto my
> next question:
>
> In the tutorial documentation it talks about 'Defining and Creating a
> Table'. Is this something which need only be done when we're working
> with an in-memory database? or do I have to define my database schema
> even if its a pre-existing mysql database? or does SQLAlchemy
> introspect it or something?

You auto load the existing database.


>
> My thrid and final question is about the persistance of composed
> objects. If I save an object using sql alchamy, I see it also saves
> the objects children. Is this done in a transaction by default? if the
> save process on one of its children fails will it all be rolled back?
> or is this something I have to specify seperatly?
>
> Thanks guys, once I know those little items I'm sure I'll be able to
> get up and running pretty swiftly.
>
> Cheers,
>



Lucas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to