• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Database and EO Modeller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Database and EO Modeller


  • Subject: Re: Database and EO Modeller
  • From: Paul Lynch <email@hidden>
  • Date: Tue, 4 Apr 2006 19:35:19 +0100


On 4 Apr 2006, at 19:13, David LeBer wrote:

On 4-Apr-06, at 1:58 PM, Jeffrey Pearson wrote:

Thanks to all (David and Paul) for the resource suggestions. I ordered the books from Amazon...just a fyi: it was under $20 for both of them!!!!

Also, I bought and have the videos. I have watched most of the first one. Quick question. This app I am creating uses existing data in an existing database. I was using straight java and jdbc to connect and try to read from those table. After viewing the video, it looks like I am going to be much happier if I copy off the tables, use EOModeler to actually create the tables in the db and then import the data. It looks like some invisible plumbing is set up by using EOModeler to generate the database tables.

I don't think you will need to do this.

You really don't need to do this.

For most database structures, just do what David suggests and let EOModeler give you your model. The only thing it adds, and this is dependent on the driver, is the EO_PK_TABLE.

Now, there is something to be aware of, and this isn't explained too well in the docs. EOF likes databases to follow it's own, mostly undocumented, rules of good behaviour. There are ways around all of these, but it helps to know the rules to start with.

Every table should have a primary key, and it will only automatically manage keys if they are types it likes - numbers of any sort, basically (plus some special cases). If you make a string field your primary key, well, you can, but it's up to you to manage it.

When you create relationships, it only likes one-to-one relationships where the foreign key is the primary key of the related table (which is dumb, but it's an EOF rule).

I think those are the main expectations EOF has that don't conform to common database design principles. Oh, and it works better (for automatic creation of names, nothing major) if your table names are singular, and not plural (so Person, not Persons).

Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Database and EO Modeller (From: Jeffrey Pearson <email@hidden>)
 >Re: Database and EO Modeller (From: David LeBer <email@hidden>)

  • Prev by Date: Re: Database and EO Modeller
  • Next by Date: Re: Database and EO Modeller
  • Previous by thread: Re: Database and EO Modeller
  • Next by thread: Re: Database and EO Modeller
  • Index(es):
    • Date
    • Thread