1. Using a Database
- Posted by ronaustin at alltel.net Oct 13, 2003
- 532 views
--------------Boundary-00=_6FVPG6G0000000000000 charset="iso-8859-1" I need to write out a file that has a six byte key (an account number) an= d a 500 byte record. The first two fields in the record contain the last nam= e and the first name of a person. I need to be able to recall the person's record either by the account number or the first and last name. There ca= n be several people on a network adding new records and updating existing records. It might be possible that two people try to change the same rec= ord at the same time. The system I am currently using has recording locking = to keep this from happening. I understand the EDS database has file locking which I assume would only allow one person to read and write while the ot= her six or seven computer operators drank coffee.=0D =0D 1. Am I correct in assuming that this is the way the EDS database works?= =0D =0D 2. If so, is it going to be changed. When?=0D =0D 3. If not, how does it work?=0D =0D 4. Should I skip the EDS and use MySQL with a ODBC wrapper?=0D =0D 5. I don't have the slightest idea what I just said in #4 above. I downloaded MySQL and made a database from the command line and that's my experiance with that.=0D =0D Sorry for the long post. --------------Boundary-00=_6FVPG6G0000000000000 Content-Type: Text/HTML; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-= 1"> <META content=3D"IncrediMail 1.0" name=3DGENERATOR> <!--IncrdiXMLRemarkStart> <IncrdiX-Info> <X-FID>FLAVOR00-NONE-0000-0000-000000000000</X-FID> <X-FVER>3.0</X-FVER> <X-CNT>;</X-CNT> </IncrdiX-Info> <IncrdiXMLRemarkEnd--> </HEAD> <BODY style=3D"BACKGROUND-POSITION: 0px 0px; FONT-SIZE: 12pt; MARGIN: 5px= 10px 10px; FONT-FAMILY: Arial" bgColor=3D#ffffff background=3D"" scroll=3D= yes ORGYPOS=3D"0" X-FVER=3D"3.0"> <TABLE id=3DINCREDIMAINTABLE cellSpacing=3D0 cellPadding=3D2 width=3D"100= %" border=3D0> <TBODY> <TR> <TD id=3DINCREDITEXTREGION style=3D"FONT-SIZE: 12pt; CURSOR: auto; FONT-F= AMILY: Arial" width=3D"100%"> <DIV>I need to write out a file that has a six byte key (an account numbe= r) and a 500 byte record. The first two fields in the rec= ord contain the last name and the first name of a person. I need to= be able to recall the person's record either by the account number or th= e first and last name. There can be several people on a network add= ing new records and updating existing records. It might be possible= that two people try to change the same record at the same time. Th= e system I am currently using has recording locking to keep this from hap= pening. I understand the EDS database has file locking which I assu= me would only allow one person to read and write while the other six or s= even computer operators drank coffee.</DIV> <DIV> </DIV> <DIV>1. Am I correct in assuming that this is the way the EDS datab= ase works?</DIV> <DIV> </DIV> <DIV>2. If so, is it going to be changed. When?</DIV> <DIV> </DIV> <DIV>3. If not, how does it work?</DIV> <DIV> </DIV> <DIV>4. Should I skip the EDS and use MySQL with a ODBC wrapper?</DIV> <DIV> </DIV> <DIV>5. I don't have the slightest idea what I just said in #4 abov= e. I downloaded MySQL and made a database from the command line and= that's my experiance with that.</DIV> <DIV> </DIV> <DIV>Sorry for the long post.</DIV> <DIV> </DIV></TD></TR> <TR> <TD id=3DINCREDIFOOTER width=3D"100%"> <TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"100%"> <TBODY> <TR> <TD width=3D"100%"></TD> <TD id=3DINCREDISOUND vAlign=3Dbottom align=3Dmiddle></TD> <TD id=3DINCREDIANIM vAlign=3Dbottom align=3Dmiddle></TD></TR></TBODY></T= --------------Boundary-00=_6FVPG6G0000000000000--
2. Re: Using a Database
- Posted by Robert Craig <rds at RapidEuphoria.com> Oct 13, 2003
- 514 views
ronaustin at alltel.net wrote: > I need to write out a file that has a six byte key (an account > number) and a 500 byte record. The first two fields in the record > contain the last name and the first name of a person. I need to be able > to recall the person's record either by the account number or the first > and last name. EDS only supports one key (in your case the account number). You could search all the records for a matching first and last name. For a few thousand names that would take a fraction of a second. You might want to do a kind of "fuzzy" match on the name, since people don't always provide their names in exactly the same way each time. For greater speed, you could also set up a secondary index fairly easily, but you would have to maintain it yourself. You would create a second table with {first name, last name} as the key. The data would be a sequence of account numbers of people with that name. EDS would then do a fast binary search to find a name. The corresponding account number(s) could then be looked up in the main table using a fast binary search. You'd have to update this table whenever you added or deleted an account from the main table. > There can be several people on a network adding new > records and updating existing records. It might be possible that two > people try to change the same record at the same time. The system I am > currently using has recording locking to keep this from happening. I > understand the EDS database has file locking which I assume would only > allow one person to read and write while the other six or seven computer > operators drank coffee. > > 1. Am I correct in assuming that this is the way the EDS database works? Yes, it currently has only file locking. For many applications that's all you need. i.e. if the process that is writing the database only needs access for a few seconds or less at a time. The other processes can poll until the database is free. One good thing about EDS, especially on the Web, is that it is very lightweight - a database can be opened, read or written, and closed very quickly. > 2. If so, is it going to be changed. When? Probably some day. There hasn't been a huge demand for it yet. > 3. If not, how does it work? > > 4. Should I skip the EDS and use MySQL with a ODBC wrapper? Matthew Lewis could probably answer that. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: Using a Database
- Posted by ronaustin at alltel.net Oct 13, 2003
- 510 views
--------------Boundary-00=_FNZPQL80000000000000 charset="iso-8859-1" =0D =0D -------Original Message-------=0D =0D From: EUforum at topica.com=0D Subject: Re: Using a Database=0D =0D =0D =0D ronaustin at alltel.net wrote:=0D > I need to write out a file that has a six byte key (an account =0D > number) and a 500 byte record. The first two fields in the record =0D > contain the last name and the first name of a person. I need to be able= =0D > to recall the person's record either by the account number or the first= =0D > and last name. =0D =0D EDS only supports one key (in your case the account number).=0D You could search all the records for a matching first and last name.=0D For a few thousand names that would take a fraction of a second.=0D You might want to do a kind of "fuzzy" match on the name, since=0D people don't always provide their names in exactly the same way=0D each time.=0D =0D For greater speed, you could also set up a secondary index=0D fairly easily, but you would have to maintain it yourself.=0D You would create a second table with {first name, last name}=0D as the key. The data would be a sequence of account numbers=0D of people with that name. EDS would then do a fast binary search=0D to find a name. The corresponding account number(s) could then=0D be looked up in the main table using a fast binary search.=0D You'd have to update this table whenever you added or=0D deleted an account from the main table.=0D =0D > There can be several people on a network adding new=0D > records and updating existing records. It might be possible that two =0D > people try to change the same record at the same time. The system I am = =0D > currently using has recording locking to keep this from happening. I =0D > understand the EDS database has file locking which I assume would only = =0D > allow one person to read and write while the other six or seven compute= r =0D > operators drank coffee.=0D > =0D > 1. Am I correct in assuming that this is the way the EDS database works= ?=0D =0D Yes, it currently has only file locking. For many applications that's=0D all you need. i.e. if the process that is writing the database=0D only needs access for a few seconds or less at a time.=0D The other processes can poll until the database is free.=0D One good thing about EDS, especially on the Web, is that=0D it is very lightweight - a database can be opened, read or written,=0D and closed very quickly.=0D =0D > 2. If so, is it going to be changed. When?=0D =0D Probably some day.=0D There hasn't been a huge demand for it yet.=0D =0D > 3. If not, how does it work?=0D > =0D > 4. Should I skip the EDS and use MySQL with a ODBC wrapper?=0D =0D Matthew Lewis could probably answer that.=0D =0D Regards,=0D Rob Craig=0D Rapid Deployment Software=0D http://www.RapidEuphoria.com=0D =0D Thanks for the info. Typically someone would pull up a record and then verify the information was correct before writing it back out. Then ther= e might be further delays because they had to answer the phone, etc., so I couldn't use a file lock. In the past I have built my own locking table which worked ok and I have also used multiple indexes which I had to maintain.=0D =0D I think I will start with EDS and then change to SQL if I have to. Many = of the files I will be using are look-up files that will work okay without being locked.=0D =0D =0D =0D =0D TOPICA - Start your own email discussion group. FREE!=0D =0D =0D =0D =0D =2E=20 --------------Boundary-00=_FNZPQL80000000000000 Content-Type: Text/HTML; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-= 1"> <META content=3D"IncrediMail 1.0" name=3DGENERATOR> <!--IncrdiXMLRemarkStart> <IncrdiX-Info> <X-FID>FLAVOR00-NONE-0000-0000-000000000000</X-FID> <X-FVER></X-FVER> <X-CNT>;</X-CNT> </IncrdiX-Info> <IncrdiXMLRemarkEnd--> </HEAD> <BODY style=3D"BACKGROUND-POSITION: 0px 0px; FONT-SIZE: 12pt; MARGIN: 5px= 10px 10px; FONT-FAMILY: Arial" bgColor=3D#ffffff background=3D"" scroll=3D= yes ORGYPOS=3D"0" X-FVER=3D"3.0"> <TABLE id=3DINCREDIMAINTABLE cellSpacing=3D0 cellPadding=3D2 width=3D"100= %" border=3D0> <TBODY> <TR> <TD id=3DINCREDITEXTREGION style=3D"FONT-SIZE: 12pt; CURSOR: auto; FONT-F= AMILY: Arial" width=3D"100%"> <DIV><BR> </DIV> <DIV id=3DIncrediOriginalMessage><I>-------Original Message-------</I></D= IV> <DIV> </DIV> <DIV id=3Dreceivestrings> <DIV dir=3Dltr style=3D"FONT-SIZE: 11pt" <i><B>From:</B></I> <A href=3D"m= ailto:EUforum at topica.com">EUforum at topica.com</A></DIV> <DIV dir=3Dltr style=3D"FONT-SIZE: 11pt" <i><B>Date:</B></I> Monday, Octo= ber 13, 2003 7:28:12 PM</DIV> <DIV dir=3Dltr style=3D"FONT-SIZE: 11pt" <i><B>To:</B></I> <A href=3D"mai= lto:EUforum at topica.com">EUforum</A></DIV> <DIV dir=3Dltr style=3D"FONT-SIZE: 11pt" <i><B>Subject:</B></I> Re: Using= a Database</DIV></DIV> <DIV> </DIV> <DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The Euphoria Mailing List =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D <BR><BR><BR><A href=3D"mailto:ronaustin@al= ltel.net">ronaustin at alltel.net</A> wrote:<BR>> I need to write out a f= ile that has a six byte key (an account <BR>> number) and a 500 byte r= ecord. The first two fields in the record <BR>> contain the last name = and the first name of a person. I need to be able <BR>> to recall the = person's record either by the account number or the first <BR>> and la= st name. <BR><BR>EDS only supports one key (in your case the account numb= er).<BR>You could search all the records for a matching first and last na= me.<BR>For a few thousand names that would take a fraction of a second.<B= R>You might want to do a kind of "fuzzy" match on the name, since<BR>peop= le don't always provide their names in exactly the same way<BR>each time.= <BR><BR>For greater speed, you could also set up a secondary index<BR>fai= rly easily, but you would have to maintain it yourself.<BR>You would crea= te a second table with {first name, last name}<BR>as the key. The data wo= uld be a sequence of account numbers<BR>of people with that name. EDS wou= ld then do a fast binary search<BR>to find a name. The corresponding acco= unt number(s) could then<BR>be looked up in the main table using a fast b= inary search.<BR>You'd have to update this table whenever you added or<BR= >deleted an account from the main table.<BR><BR>> There can be several= people on a network adding new<BR>> records and updating existing rec= ords. It might be possible that two <BR>> people try to change the sam= e record at the same time. The system I am <BR>> currently using has r= ecording locking to keep this from happening. I <BR>> understand the E= DS database has file locking which I assume would only <BR>> allow one= person to read and write while the other six or seven computer <BR>> = operators drank coffee.<BR>> <BR>> 1. Am I correct in assuming that= this is the way the EDS database works?<BR><BR>Yes, it currently has onl= y file locking. For many applications that's<BR>all you need. i.e. if the= process that is writing the database<BR>only needs access for a few seco= nds or less at a time.<BR>The other processes can poll until the database= is free.<BR>One good thing about EDS, especially on the Web, is that<BR>= it is very lightweight - a database can be opened, read or written,<BR>an= d closed very quickly.<BR><BR>> 2. If so, is it going to be changed. W= hen?<BR><BR>Probably some day.<BR>There hasn't been a huge demand for it = yet.<BR><BR>> 3. If not, how does it work?<BR>> <BR>> 4. Should = I skip the EDS and use MySQL with a ODBC wrapper?<BR><BR>Matthew Lewis co= uld probably answer that.<BR><BR>Regards,<BR>Rob Craig<BR>Rapid Deploymen= t Software<BR><A href=3D"http://www.RapidEuphoria.com">http://www.RapidEu= phoria.com</A></DIV> <DIV> </DIV> <DIV><STRONG><FONT color=3D#ff8000>Thanks for the info. Typically s= omeone would pull up a record and then verify the information was correct= before writing it back out. Then there might be further delays bec= ause they had to answer the phone, etc., so I couldn't use a file lock. &= nbsp; In the past I have built my own locking table which worked ok and I= have also used multiple indexes which I had to maintain.</FONT></STRONG>= </DIV> <DIV><STRONG><FONT color=3D#ff8000></FONT></STRONG> </DIV> <DIV><STRONG><FONT color=3D#ff8000>I think I will start with EDS and then= change to SQL if I have to. Many of the files I will be using are = look-up files that will work okay without being locked.</FONT></STRONG></= DIV> <DIV><BR><BR>--^---------------------------------------------------------= -------<BR>This email was sent to: <A href=3D"mailto:ronaustin at alltel.net= ">ronaustin at alltel.net</A><BR><BR>EASY UNSUBSCRIBE click here: <A href=3D= "http://topica.com/u/?b1dd66.b6KEgr.cm9uYXVz">http://topica.com/u/?b1dd66= =2Eb6KEgr.cm9uYXVz</A><BR>Or send an email to: <A href=3D"mailto:EUforum-= unsubscribe at topica.com">EUforum-unsubscribe at topica.com</A><BR><BR>TOPICA = - Start your own email discussion group. FREE!<BR><A href=3D"http://www.t= opica.com/partner/tag02/create/index2.html">http://www.topica.com/partner= /tag02/create/index2.html</A><BR>--^-------------------------------------= ---------------------------<BR><BR><BR><BR><BR>. </DIV></TD></TR> <TR> <TD id=3DINCREDIFOOTER width=3D"100%"> <TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"100%"> <TBODY> <TR> <TD width=3D"100%"></TD> <TD id=3DINCREDISOUND vAlign=3Dbottom align=3Dmiddle></TD> <TD id=3DINCREDIANIM vAlign=3Dbottom align=3Dmiddle></TD></TR></TBODY></T= --------------Boundary-00=_FNZPQL80000000000000--
4. Re: Using a Database
- Posted by Robert Elia <bobelia200 at netzero.net> Oct 14, 2003
- 525 views
--=======76DB114C======= At 07:52 PM 10/13/03 -0400, you wrote: <snip> > >Thanks for the info. Typically someone would pull up a record and then >verify the information was correct before writing it back out. Then there >might be further delays because they had to answer the phone, etc., so I >couldn't use a file lock. In the past I have built my own locking table >which worked ok and I have also used multiple indexes which I had to maintain. > >I think I will start with EDS and then change to SQL if I have to. Many >of the files I will be using are look-up files that will work okay without >being locked. >--------------------------- Just a thought... You don't necessarily need to keep the file locked while a record is being viewed/modified; just when being read or written. Keep a copy of the original in your program. When a modified record is about to be re-written, re-read it to a temporary sequence and compare it to the original (before modification) to see if it has changed. You might add fields for the ID of the person modifying the record and latest date/time. You could also write that info to a file as an audit trail. Whether this would work depends on the likelihood of an individual record being modified by more than one person at a time. You could even keep a separate database of record numbers currently being edited. By polling this and showing a flag on-screen, an operator, trying to modify a record, would know that someone else is trying to do the same. It sounds like you've been through this before. Bob --=======76DB114C======= Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-43CD1597 Content-Disposition: inline --- --=======76DB114C=======--
5. Re: Using a Database
- Posted by irvm at ellijay.com Oct 14, 2003
- 498 views
On Monday 13 October 2003 10:21 pm, you wrote: > > I need to write out a file that has a six byte key (an account number) and > a 500 byte record. The first two fields in the record contain the last > name and the first name of a person. I need to be able to recall the > person's record either by the account number or the first and last name. > There can be several people on a network adding new records and updating > existing records. It might be possible that two people try to change the > same record at the same time. The system I am currently using has > recording locking to keep this from happening. I understand the EDS > database has file locking which I assume would only allow one person to > read and write while the other six or seven computer operators drank > coffee. > > 1. Am I correct in assuming that this is the way the EDS database works? Yes. Plus you're probably going to have to write your own indexing routines to find by name. Unless the database is very small, you don't want to be reading thru the whole thing for each search. > 2. If so, is it going to be changed. When? ? My guess is, never. There are lots of more capable database engines out there. > 3. If not, how does it work? > > 4. Should I skip the EDS and use MySQL with a ODBC wrapper? Probably, or if you want to just get the job done fast and right, use something like Filemaker. You'd be done in the time it took to write this e-mail, and it has the record locking / simultaneous access problems solved. > 5. I don't have the slightest idea what I just said in #4 above. I > downloaded MySQL and made a database from the command line and that's my > experiance with that. I don't know if the mysql wrapper is complete (or completely debugged). Irv