BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Firebird Vs MySQL

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Man Utd
Guest





PostPosted: Tue Jul 26, 2005 5:06 am    Post subject: Firebird Vs MySQL Reply with quote



I have been working with MySQL for sometime, I used MySQLFront to administer
MySQL.
While using MySQLFront to create MySQL database, I specify the alias name.
Everytime I want to connect from Delphi, I need to specify the host name and
database (ie alias).

However, in Firebird, if I use the tools like IBExpert to create a database,
it has noalias name.
Until I register this database I give it an alias name.
Then I can create another database in different location in my local drive
and register that with the same alias name as the previous one.
This make me confuse as two databases have same alias name.

How do I refer to the individual database in the Delphi component ? Is the
absolute path to refer the database the only way to do?


Back to top
*Lysander*
Guest





PostPosted: Tue Jul 26, 2005 6:41 am    Post subject: Re: Firebird Vs MySQL Reply with quote



In article <42e5c4ce (AT) newsgroups (DOT) borland.com>,
[email]alanpltseNOSPAM (AT) yahoo (DOT) com.au[/email] says...

Quote:
How do I refer to the individual database in the Delphi component ? Is the
absolute path to refer the database the only way to do?

Aliases in IBExpert are only valid for IBExpert. I would not expect them
to be valid within Delphi components.

Have a look at the following files at the root of your firebird server:
- aliases.conf
- firebird.conf (section 'DatabaseAccess')

Then you can use the following connection-string with your components:
(database) = <hostname>:<alias>

Those aliases will be unique.




--
ciao,
André
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Deutsche dBase-Konferenz dBKon 2005 ::: 11. bis 13. November 2005
Deutschsprachige Konferenz zu dBase und anderen Datenbanken
Info: www.dbase-konferenz.de

Back to top
Man Utd
Guest





PostPosted: Mon Aug 01, 2005 11:12 am    Post subject: Re: Firebird Vs MySQL Reply with quote



So how does the <alias> define ? What client tool I can create the database
and give it an alias name ?

Aliases in IBExpert are only valid for IBExpert. I would not expect them
to be valid within Delphi components.

Have a look at the following files at the root of your firebird server:
- aliases.conf
- firebird.conf (section 'DatabaseAccess')

Then you can use the following connection-string with your components:
(database) = <hostname>:<alias>

Those aliases will be unique.




--
ciao,
André
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Deutsche dBase-Konferenz dBKon 2005 ::: 11. bis 13. November 2005
Deutschsprachige Konferenz zu dBase und anderen Datenbanken
Info: www.dbase-konferenz.de


Back to top
*Lysander*
Guest





PostPosted: Mon Aug 01, 2005 6:34 pm    Post subject: Re: Firebird Vs MySQL Reply with quote

In article <42ee02f3 (AT) newsgroups (DOT) borland.com>,
[email]alanpltseNOSPAM (AT) yahoo (DOT) com.au[/email] says...
Quote:
So how does the <alias> define ?
The alias is the name _you_ give to the database in the file

"aliases.conf"

Quote:
What client tool I can create the database
and give it an alias name ?
notepad.exe Smile



But I cannot tell you, how to spell the alias-name correctly in your
delphi-components. You should first tell, _which_ components you are
using and then I'm sure somebody who uses the same components will jump
in and tell you how to spell the alias/databasename.

--
ciao,
André
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Deutsche dBase-Konferenz dBKon 2005 ::: 11. bis 13. November 2005
Deutschsprachige Konferenz zu dBase und anderen Datenbanken
Info: www.dbase-konferenz.de

Back to top
Man Utd
Guest





PostPosted: Wed Aug 03, 2005 4:05 am    Post subject: Re: Firebird Vs MySQL Reply with quote

I am using Zeos component to connect to a Firebird database file, eg.
CompanySales.fdb that was created by someone.
So I put this file in a remote machine.

In order to connect to this firebird database, in the Zeos connection
component, I need to assign the Hostname and Database property.
I can get that connected if I put in my local machine by the following:
Hostname := 'localhost'
Database := 'c:temocompanysales.fdb'

The absolute path is fine, but the problem is how about if I put the
database file in a remote machine ? What should I specify in the Database
property ? Is it still the absoult path ?
Can I assign the Database property using alias as I used in MySQL ?


"*Lysander*" <nobody (AT) nowhere (DOT) com> wrote

In article <42ee02f3 (AT) newsgroups (DOT) borland.com>,
[email]alanpltseNOSPAM (AT) yahoo (DOT) com.au[/email] says...
Quote:
So how does the <alias> define ?
The alias is the name _you_ give to the database in the file

"aliases.conf"

Quote:
What client tool I can create the database
and give it an alias name ?
notepad.exe Smile



But I cannot tell you, how to spell the alias-name correctly in your
delphi-components. You should first tell, _which_ components you are
using and then I'm sure somebody who uses the same components will jump
in and tell you how to spell the alias/databasename.

--
ciao,
André
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Deutsche dBase-Konferenz dBKon 2005 ::: 11. bis 13. November 2005
Deutschsprachige Konferenz zu dBase und anderen Datenbanken
Info: www.dbase-konferenz.de



Back to top
*Lysander*
Guest





PostPosted: Wed Aug 03, 2005 7:05 am    Post subject: Re: Firebird Vs MySQL Reply with quote

In article <42f0429f$1 (AT) newsgroups (DOT) borland.com>,
[email]alanpltseNOSPAM (AT) yahoo (DOT) com.au[/email] says...
Quote:
I can get that connected if I put in my local machine by the
following:
Hostname := 'localhost'
Database := 'c:temocompanysales.fdb'

The absolute path is fine, but the problem is how about if I put the
database file in a remote machine ? What should I specify in the Database
property ? Is it still the absoult path ?
Can I assign the Database property using alias as I used in MySQL ?

Okay, now I think that there could be a problem solved without knowing
ZEOS-components :)

The "remote machine" on which you put the "companysales.fdb"... does it
have also a Firebird server installed?

if the answer is no: install one there, because FB server can _only_
access databases on the same machine as itself. With FB server you can
thus NOT access a database on a network-share!

if the answer is yes:
Hostname := '<hostname>' (of the remote machine!)
Database := '<drive>:<path>companysales.fdb'
(where <drive> must be relative to the fb-server)

for example:
- fb-server on machine "S_999"
- there a data partition "d:Data", shared name = "Data"
- on local system a net-drive "f:" pointing to \S_999Data
- database in "f:companysales.fdb"
your connection then must be "S_999:d:Datacompanysales.fdb"
resolving to a "host"-part "S_999"
and a "database"-part "d:Datacompanysales.fdb"

If you make use of the "aliases.conf" and the corresponding setting in
the "firebird.conf" (recommended!), then it will be more secure and more
easy to use.
Then the "host"-part of your string will be "S_999" and the "database"-
part of your string will be just "companysales" (or whatever you name
your alias).


--
ciao,
André
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Deutsche dBase-Konferenz dBKon 2005 ::: 11. bis 13. November 2005
Deutschsprachige Konferenz zu dBase und anderen Datenbanken
Info: www.dbase-konferenz.de

Back to top
Aage Johansen
Guest





PostPosted: Wed Aug 03, 2005 8:10 pm    Post subject: Re: Firebird Vs MySQL Reply with quote

Man Utd wrote:
Quote:
I am using Zeos component to connect to a Firebird database file, eg.
CompanySales.fdb that was created by someone.
So I put this file in a remote machine.

In order to connect to this firebird database, in the Zeos connection
component, I need to assign the Hostname and Database property.
I can get that connected if I put in my local machine by the following:
Hostname := 'localhost'
Database := 'c:temocompanysales.fdb'

The absolute path is fine, but the problem is how about if I put the
database file in a remote machine ? What should I specify in the Database
property ? Is it still the absoult path ?
Can I assign the Database property using alias as I used in MySQL ?


It could be as simple as prefixing the DatabaseName with the ServerName:
Database := 'THESERVER:c:temocompanysales.fdb'
You can replace the servername with the ip address:
Database := '111.111.111.111:c:temocompanysales.fdb'
(
You could try this with the local database:
Database := 'localhost:c:temocompanysales.fdb'
)



If you define an alias for the db at the server, the connect string can
be simply: 'THESERVER:THEALIAS'.


--
Aage J.

Back to top
Man Utd
Guest





PostPosted: Wed Aug 10, 2005 11:29 pm    Post subject: Re: Firebird Vs MySQL Reply with quote

Is there a db tools can be used to create a database on 'remote' machine, in
my case, and create an alias for this firebird database ?
So that I can set the database property of the Zeos to this alias ?



"Aage Johansen" <aagjohan (AT) offline (DOT) no> wrote

Quote:
Man Utd wrote:
I am using Zeos component to connect to a Firebird database file, eg.
CompanySales.fdb that was created by someone.
So I put this file in a remote machine.

In order to connect to this firebird database, in the Zeos connection
component, I need to assign the Hostname and Database property.
I can get that connected if I put in my local machine by the following:
Hostname := 'localhost'
Database := 'c:temocompanysales.fdb'

The absolute path is fine, but the problem is how about if I put the
database file in a remote machine ? What should I specify in the
Database
property ? Is it still the absoult path ?
Can I assign the Database property using alias as I used in MySQL ?


It could be as simple as prefixing the DatabaseName with the ServerName:
Database := 'THESERVER:c:temocompanysales.fdb'
You can replace the servername with the ip address:
Database := '111.111.111.111:c:temocompanysales.fdb'
(
You could try this with the local database:
Database := 'localhost:c:temocompanysales.fdb'
)



If you define an alias for the db at the server, the connect string can
be simply: 'THESERVER:THEALIAS'.


--
Aage J.



Back to top
Aage Johansen
Guest





PostPosted: Thu Aug 11, 2005 7:06 pm    Post subject: Re: Firebird Vs MySQL Reply with quote

Man Utd wrote:
Quote:
Is there a db tools can be used to create a database on 'remote' machine, in
my case, and create an alias for this firebird database ?
So that I can set the database property of the Zeos to this alias ?


I don't think so. If a client could create an alias on the remote
server it would hurt security. Someone (the dba) has to create the
alias on the server.
If Firebird is running, and the dba hasn't restricted creation of
databases, you can create databases. Otherwise, not.

--
Aage J.


Quote:


"Aage Johansen" <aagjohan (AT) offline (DOT) no> wrote in message
news:42f124e6$1 (AT) newsgroups (DOT) borland.com...

Man Utd wrote:

I am using Zeos component to connect to a Firebird database file, eg.
CompanySales.fdb that was created by someone.
So I put this file in a remote machine.

In order to connect to this firebird database, in the Zeos connection
component, I need to assign the Hostname and Database property.
I can get that connected if I put in my local machine by the following:
Hostname := 'localhost'
Database := 'c:temocompanysales.fdb'

The absolute path is fine, but the problem is how about if I put the
database file in a remote machine ? What should I specify in the

Database

property ? Is it still the absoult path ?
Can I assign the Database property using alias as I used in MySQL ?


It could be as simple as prefixing the DatabaseName with the ServerName:
Database := 'THESERVER:c:temocompanysales.fdb'
You can replace the servername with the ip address:
Database := '111.111.111.111:c:temocompanysales.fdb'
(
You could try this with the local database:
Database := 'localhost:c:temocompanysales.fdb'
)



If you define an alias for the db at the server, the connect string can
be simply: 'THESERVER:THEALIAS'.


--
Aage J.




Back to top
Man Utd
Guest





PostPosted: Tue Aug 16, 2005 7:29 am    Post subject: Re: Firebird Vs MySQL Reply with quote

Sorry, I didn't make the question clear:
For example, if I am responsible for the administration of the Firebird
server, need to create a database on remote machine(Windows or Linux), what
tools can I use?

I want to create the database so that other developer can set the Zeos
component for the properties: host and databasename.

"Aage Johansen" <aagjohan (AT) offline (DOT) no> wrote

Quote:
Man Utd wrote:
Is there a db tools can be used to create a database on 'remote'
machine, in
my case, and create an alias for this firebird database ?
So that I can set the database property of the Zeos to this alias ?


I don't think so. If a client could create an alias on the remote
server it would hurt security. Someone (the dba) has to create the
alias on the server.
If Firebird is running, and the dba hasn't restricted creation of
databases, you can create databases. Otherwise, not.

--
Aage J.




"Aage Johansen" <aagjohan (AT) offline (DOT) no> wrote in message
news:42f124e6$1 (AT) newsgroups (DOT) borland.com...

Man Utd wrote:

I am using Zeos component to connect to a Firebird database file, eg.
CompanySales.fdb that was created by someone.
So I put this file in a remote machine.

In order to connect to this firebird database, in the Zeos connection
component, I need to assign the Hostname and Database property.
I can get that connected if I put in my local machine by the following:
Hostname := 'localhost'
Database := 'c:temocompanysales.fdb'

The absolute path is fine, but the problem is how about if I put the
database file in a remote machine ? What should I specify in the

Database

property ? Is it still the absoult path ?
Can I assign the Database property using alias as I used in MySQL ?


It could be as simple as prefixing the DatabaseName with the ServerName:
Database := 'THESERVER:c:temocompanysales.fdb'
You can replace the servername with the ip address:
Database := '111.111.111.111:c:temocompanysales.fdb'
(
You could try this with the local database:
Database := 'localhost:c:temocompanysales.fdb'
)



If you define an alias for the db at the server, the connect string can
be simply: 'THESERVER:THEALIAS'.


--
Aage J.






Back to top
Aage Johansen
Guest





PostPosted: Tue Aug 16, 2005 7:30 pm    Post subject: Re: Firebird Vs MySQL Reply with quote

Man Utd wrote:
Quote:
Sorry, I didn't make the question clear:
For example, if I am responsible for the administration of the Firebird
server, need to create a database on remote machine(Windows or Linux), what
tools can I use?

The tool I use is a simple plain text editor.



Quote:
I want to create the database so that other developer can set the Zeos
component for the properties: host and databasename.


You would create an alias in aliases.conf
(usually in C:Program FilesFirebirdFirebird_1_5)

with a line like:
THEALIAS = D:DBperfect.fdb

You'll then connect to the database on the remote server THESERVER with
this: THESERVER:THEALIAS
I've haven't really used Zeos, but I think you use a TZConnection
component, and fill in some properties:
HostName = THESERVER
Database = THEALIAS
Maybe you also need to set Port=3050.
I'm just guessing here - sorry.


--
Aage J.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.