Re: [SQL] pg & Delphi
On 9/1/07, Dmitry Turin <[EMAIL PROTECTED]> wrote: > Very thanks to all. > Some questions: > > RH> You should be able to connect via ODBC. > I don't know Delphi well (i used only BDE). > What Delphi's object should be used to connect via ODBS > (instead of BDE-components TTable, TDatabase) ? > > JT> Delphi should let you use dlls written in other languages. > JT> So I'd just use libpq.dll. > Similarly, What Delphi's object should be used to connect via libpq.dll > (instead of BDE-components TTable, TDatabase - > i'd like to know all ways to connect Postgres and Delphi)? If I remember correctly, when I was doing MySQL and Delphi (again, it's been years), we didn't use components to talk to the database -- instead, we simply called functions out of libmysql.dll. Were I doing the same thing with PostgreSQL today, I'd call functions directly from libpq.dll. -Josh/eggyknap ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[SQL] PK & FK & Index Question
Hi All, Assume the following have a one-to-one relationship: team_contact team_contact_id (PK) first_name last_name ... team_contact_contacts team_contact_id (FK) home_phone work_phone ... Should I set the latter table's FK also to PK? If so, do I need to set an index on the FK even though it's also the primary key? Alternatively, I could just add a UK contraint to FK and do away with PK, right? Thanks. --Lenard _ Connect to the next generation of MSN Messenger http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
Re: [SQL] PK & FK & Index Questio
On 9/2/07, L D <[EMAIL PROTECTED]> wrote: > Should I set the latter table's FK also to PK? It's sane. > If so, do I need to set an index on the FK even though it's also the primary > key? No need to do so. ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
