1. Databases
- Posted by behaviorself at netzero.net Mar 19, 2001
- 569 views
------=_NextPart_000_0020_01C0B0AD.C94A62A0 charset="iso-8859-1" Hi everyone, OK, I'm a newbie so this might sound like a silly question, but I'm = writing a Win32 program that keeps track of the installations that our = contractors do, and I'm having a little trouble with the main database. = I'm using Notepad for some smaller databases, but I'm wondering if it = will handle a much larger one. We normally run about 10 crews, who do = up to 20 installs each per week. Each install would occupy one line of = the database (at least I think it will--like I said, I don't know much = about this) and will look somthing like this: Date, Installer #, Customer name, install price, take-up price, = furniture charge, steps, trip charge, other,=20 Or, more accurately: 3/19/01, JimBob Smith, Joe Nobody, 88.00, 22.00, 24.00, 36.00, 20.00, = 15.00,=20 I'm wondering if all install data should be saved to one big database = (and, if so, how I can look up entries by date and Installer name) or if = it would be better to save them to several smaller ones (eg: one per = installer, or one per week). Thanks ------=_NextPart_000_0020_01C0B0AD.C94A62A0 charset="iso-8859-1" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> question, but I'm writing a Win32 program that keeps track of the = installations=20 that our contractors do, and I'm having a little trouble with the main=20 database. I'm using Notepad for some smaller databases, but I'm = wondering=20 if it will handle a much larger one. We normally run about 10 = crews, who=20 do up to 20 installs each per week. Each install would occupy one = line of=20 the database (at least I think it will--like I said, I don't know much = about=20 this) and will look somthing like this:</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Date, Installer #, Customer name, = install price,=20 take-up price, furniture charge, steps, trip charge, other, = </FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Or, more accurately:</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>3/19/01, JimBob Smith, Joe Nobody, = 88.00, 22.00,=20 24.00, 36.00, 20.00, 15.00, </FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>I'm wondering if all install data = should be saved=20 to one big database (and, if so, how I can look up entries by date and = Installer=20 name) or if it would be better to save them to several smaller ones (eg: = one per=20 installer, or one per week).</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV> ------=_NextPart_000_0020_01C0B0AD.C94A62A0--
2. Re: Databases
- Posted by Irv Mullins <irvm at ellijay.com> Mar 19, 2001
- 521 views
--Boundary_(ID_wRhjsurCGFMiAib89iq2OA) ----- Original Message ----- From: behaviorself at netzero.net To: EUforum Sent: Monday, March 19, 2001 7:15 PM Subject: Databases Hi everyone, OK, I'm a newbie so this might sound like a silly question, but I'm writing a Win32 program that keeps track of the installations that our contractors do, and I'm having a little trouble with the main database. I'm using Notepad for some smaller databases, but I'm wondering if it will handle a much larger one. We normally run about 10 crews, who do up to 20 installs each per week. Each install would occupy one line of the database (at least I think it will--like I said, I don't know much about this) and will look somthing like this: Date, Installer #, Customer name, install price, take-up price, furniture charge, steps, trip charge, other, Or, more accurately: 3/19/01, JimBob Smith, Joe Nobody, 88.00, 22.00, 24.00, 36.00, 20.00, 15.00, I'm wondering if all install data should be saved to one big database (and, if so, how I can look up entries by date and Installer name) or if it would be better to save them to several smaller ones (eg: one per installer, or one per week). We have a Euphoria database (written before EDS was available, so it uses just plain Euphoria) which handles 50 workers and ~600 customers who might each have between zero and 150 jobs each month, generally there are about 2,000 jobs in a given month. The speed is fine, and the data itself takes up around half a meg => 1 meg, so it's no problem to back up. . This has been running flawlessly for nearly two years now.It consists of 4 files, workmen, customers, jobs, and prices (a table of price schedules). Here's an example of looking up a customer by code #. "CurrentFoundSet" may either be the entire customer database, or a subset thereof, as a result of a previous search: for i = 1 to length(CurrentFoundSet) do if CurrentFoundSet[i][custCode] = code then return i -- returns the position of that customer in the current set end if end for return 0 -- if not found end function Here's a routine to match names, where a search for smith would turn up Smith Barney J.M. Smith Smithson & Barker.... object result -- returns a list of possible matching customer records result = {} -- create an empty list to hold matching records ReadCustomerFile() -- get entire file name = '*' & upper(name) & '*' -- add wildcard characters to search pattern, uppercase it for i = 1 to length(Customers) do -- iterate thru the customer list if wildcard_match(name,upper(Customers[i][custName])) -- found a match then result = append(result,Customers[i]) -- add customer to the results list end if end for return result end function These are probably not the most efficent routines, if so, someone on this list will be sure to let me know. Nevertheless, they are fast enough for my purposes. If I were writing this over again today, I would use EDS, because it would simplify things, and all the data tables could be contained in a single file. Regards, Irv Mullins --Boundary_(ID_wRhjsurCGFMiAib89iq2OA) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=iso-8859-1" http-equiv=Content-Type> <META content="MSHTML 5.00.2614.3500" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A href="mailto:behaviorself at netzero.net" title=behaviorself at netzero.net>behaviorself at netzero.net</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A href="mailto:EUforum at topica.com" title=EUforum at topica.com>EUforum</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, March 19, 2001 7:15 PM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Databases</DIV> <DIV><BR></DIV><PRE> >>>>> The Euphoria Mailing List <<<<< <DIV><FONT face=Arial size=2>Hi everyone,</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>OK, I'm a newbie so this might sound like a silly question, but I'm writing a Win32 program that keeps track of the installations that our contractors do, and I'm having a little trouble with the main database. I'm using Notepad for some smaller databases, but I'm wondering if it will handle a much larger one. We normally run about 10 crews, who do up to 20 installs each per week. Each install would occupy one line of the database (at least I think it will--like I said, I don't know much about this) and will look somthing like this:</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>Date, Installer #, Customer name, install price, take-up price, furniture charge, steps, trip charge, other, </FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>Or, more accurately:</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>3/19/01, JimBob Smith, Joe Nobody, 88.00, 22.00, 24.00, 36.00, 20.00, 15.00, </FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>I'm wondering if all install data should be saved to one big database (and, if so, how I can look up entries by date and Installer name) or if it would be better to save them to several smaller ones (eg: one per installer, or one per week).</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>We have a Euphoria database (written before EDS was available, so it uses just plain Euphoria)</FONT></DIV> <DIV><FONT face=Arial size=2>which handles 50 workers and ~600 customers who might each have between zero and 150 jobs each month, generally there are about 2,000 jobs in a given month. The speed </FONT><FONT face=Arial size=2>is fine, and the data itself takes up</FONT><FONT face=Arial size=2> around half a meg => 1 meg, so it's no problem to back up.</FONT></DIV> <DIV><FONT face=Arial size=2>.</FONT></DIV> <DIV><FONT face=Arial size=2>This has been running flawlessly for nearly two years now.It consists of 4 files,</FONT></DIV> <DIV><FONT face=Arial size=2>workmen, customers, jobs, and prices (a table of price schedules). </FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>Here's an example of looking up a customer by code #. "CurrentFoundSet" </FONT></DIV> <DIV><FONT face=Arial size=2>may either be the entire customer database, or a subset thereof, as a result of</FONT></DIV> <DIV><FONT face=Arial size=2>a previous search:</FONT></DIV> <DIV><FONT face=Arial i = 1 to length(CurrentFoundSet) do<BR> if CurrentFoundSet[i][custCode] = code then<BR> return i -- returns the position of that customer in the current set<BR> end if<BR>end for<BR>return 0 -- if not found<BR>end function</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>Here's a routine to match names, where a search for smith would turn up</FONT></DIV> <DIV><FONT face=Arial size=2>Smith Barney</FONT></DIV> <DIV><FONT face=Arial size=2>J.M. Smith</FONT></DIV> <DIV><FONT face=Arial size=2>Smithson & Barker....</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial result -- returns a list of possible matching customer records<BR>result = {} -- create an empty list to hold matching records<BR><BR>ReadCustomerFile() -- get entire file<BR>name = '*' & upper(name) & '*' -- add wildcard characters to search pattern, uppercase it<BR>for i = 1 to length(Customers) do -- iterate thru the customer list<BR> if wildcard_match(name,upper(Customers[i][custName])) -- found a match<BR> then result = append(result,Customers[i]) -- add customer to the results list<BR> end if<BR>end for</FONT></DIV> <DIV><FONT face=Arial size=2><BR>return result<BR>end function</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>These are probably not the most efficent routines, if so, someone on this list will be sure to </FONT></DIV> <DIV><FONT face=Arial size=2>let me know. Nevertheless, they are fast enough for my purposes. If I were writing this over </FONT></DIV> <DIV><FONT face=Arial size=2>again today, I would use EDS, because it would simplify things, and all the data tables </FONT></DIV> <DIV><FONT face=Arial size=2>could be contained in a single file.</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>Regards,</FONT></DIV> <DIV><FONT face=Arial size=2>Irv Mullins</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV> </DIV></BLOCKQUOTE> --Boundary_(ID_wRhjsurCGFMiAib89iq2OA)--
3. Re: Databases
- Posted by Irv Mullins <irvm at ellijay.com> Mar 19, 2001
- 516 views
--Boundary_(ID_HECmS2ZbfHUP1EetnOKGTw) ----- Original Message ----- From: Irv Mullins What a mess! That'll teach me to use Windows to post source code.Irv if CurrentFoundSet[i][custCode] = code then return i -- returns the position of that customer in the current set end ifend forreturn 0 -- if not foundend function --Boundary_(ID_HECmS2ZbfHUP1EetnOKGTw) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=iso-8859-1" http-equiv=Content-Type> <META content="MSHTML 5.00.2614.3500" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A href="mailto:irvm at ellijay.com" title=irvm at ellijay.com>Irv Mullins</A> </DIV> <BLOCKQUOTE style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"><PRE><DIV><FONT face=Arial do<BR length(CurrentFoundSet) to i="1">What a mess! That'll teach me to use Windows to post source code.</FONT></DIV><DIV><FONT face=Arial>Irv</FONT></DIV><DIV><FONT face=Arial do<BR length(CurrentFoundSet) to i="1"></FONT> </DIV><DIV><FONT face=Arial do<BR length(CurrentFoundSet) to i="1"></FONT> </DIV><DIV><FONT face=Arial do<BR length(CurrentFoundSet) to i="1"> if </FONT><FONT face=Arial do<BR length(CurrentFoundSet) to i="1"> CurrentFoundSet[i][custCode] = code then<BR> return i -- returns the position of that customer in the current set<BR> end Newsletters, Tips and Discussions on Topics You Choose. <A href="http://www.topica.com/partner/tag01">http://www.topica.com/partner/tag01</A></PRE></BLOCKQUOTE> --Boundary_(ID_HECmS2ZbfHUP1EetnOKGTw)--
4. Re: Databases
- Posted by Irv Mullins <irv at ELLIJAY.COM> Feb 17, 2000
- 583 views
On Wed, 16 Feb 2000, Prasanta. wrote: > Hi to all, > > I am new to Euphoria Language and enjoying programming in it. Has anybody in > this community used > euphoria with any database ? Can anybody tell me how to do that in WIN32 > environment? > Any help is appreciated. There is a rather old and incomplete dbase III library which can read, write and create dbase files on the Euphoria website. This library cannot do index files, and has no provision for deleting records. Someone posted a fairly complete Euphoria wrapper for mysql recently, but seems to have dropped out of sight. Since it is relatively simple and fast to use Euphoria itself to handle small amounts of data (whatever fits in memory) I suspect there isn't likely to be much real effort to achieve database connectivity. Regards, Irv