1. EDS and SQL
- Posted by Matthew Lewis <MatthewL at KAPCOUSA.COM> Aug 23, 2000
- 519 views
Has anyone worked on writing a SQL engine for use with EDS? The only thing I could see in the archive was Buddy Hylbergs toolbox, which outputs some SQL code. I've come up with some general ideas for how it could be done, but I'd rather build on stuff others have done than redesign the wheel. Here's my basic idea: Within an eds file, an extra table is added: TABLEDEF (or something similar) The key's are the names of the tables, and the data elements contain a sequence which describes the structure and field names for each table: Each field would be described using two sequences: -- The field name -- The contents The contents of the field could be described by either an empty sequence, or by another field name. This way, we could preserve the flexibility of deeply nested sequences, while making it easy to use the data. Example: Suppose table MAIL contains information about people on a mailing list, where the records have the structure: { { "Name", { {"First", {}}, {"Last", {}}, }, { "Address", {"Street", {}}, {"City", {}}, {"State", {}}, {"ZIP", {}} } } Then to refer to a field in a SQL statement (I'm assuming case insensitive): First Name: "name.first" Street: "address.street" Address" "address" etc. Using this method, we should be able to grab a single field, or a more complex, nested sequence of fields. It's also occurred to me that you could use the actual indices of the fields (which, of course requires that you know how they're stored): First name: "[1][1]" State: "[2][3]" or any combination: Last Name: "name.[2]" Zip: "[2].zip" There are lots of ways to implement this scheme, I think. This seems like a good way to make SQL Euphoric, and add tons of power to EDS and Eu. Matt Lewis
2. Re: EDS and SQL
- Posted by Bernie <xotron at PCOM.NET> Aug 23, 2000
- 473 views
On Wed, 23 Aug 2000 11:41:53 -0700, Matthew Lewis <MatthewL at KAPCOUSA.COM> wrote: >Has anyone worked on writing a SQL engine for use with EDS? The only thing >I could see in the archive was Buddy Hylbergs toolbox, which outputs some >SQL code. I've come up with some general ideas for how it could be done, >but I'd rather build on stuff others have done than redesign the wheel. Matt: Did you look at this file. http://www.rapideuphoria.com/emysqlib.zip
3. Re: EDS and SQL
- Posted by Matthew Lewis <MatthewL at KAPCOUSA.COM> Aug 23, 2000
- 484 views
Bernie wrote > > Matt: > > Did you look at this file. > > http://www.rapideuphoria.com/emysqlib.zip > I have, but that uses mysql--which is a 3rd party package, requiring a DLL (that appears to be included). I'd like to be able to use a version of SQL with EDS. Matt
4. Re: EDS and SQL
- Posted by Michael Nelson <MichaelANelson at WORLDNET.ATT.NET> Aug 24, 2000
- 478 views
Matthew Lewis wrote: <snip> > Has anyone worked on writing a SQL engine for use with EDS? </snip> Its not even to pre-alpha yet, but I am working on an Object Euphoria Database Engine. This is an ambitious project and it is an open question when I can be ready to release anything. Planned features are: 1. Fields with arbitrarily complex subfields accessible by dot notation. 2. Data typing of fields--field may be required to contain data of any Euphoria type or user-defined type. 3. Indexes for fast search/sort on any field or fields. 4. Links between tables with referential integrity. 5. A SQL-like query language. 6. Other data manipulation methds. I suspect #5 will be implemented as a script interpreter which translates EuSQL into direct data manipulation methods (#6)--which would also be available to the user for those who prefer them. The advantage of using Object Euphoria is that all the structural data can be read in when the database is opened and maintained and manipulated by OOP objects. The OOP approach will automate the handling of indexes and all the complex bookkeeping that goes into a database being accessed in this fashion--much more is required than in simple EDS where key searches are highly optimized but searches on non-key fields requires a sequential search. The disadvantage is the OOP overhead--my hope is the fast search and sort on non-key fields will make up for this and speed will be nearly as good as EDS. I would be glad to correspond with you or anyone about this--it is likely that many ideas about the structure of the EDS database will be applicable to both OOP and non-OOP implementations these design concepts. -- Mike Nelson MichaelANelson at worldnet.att.net
5. Re: EDS and SQL
- Posted by budmeister1 at JUNO.COM Aug 24, 2000
- 475 views
>Has anyone worked on writing a SQL engine for use with EDS? The only thing >I could see in the archive was Buddy Hylbergs toolbox, which outputs some >SQL code. I've come up with some general ideas for how it could be done, >but I'd rather build on stuff others have done than redesign the wheel. I was working on the beginnings of an SQL engine for EDS called EQUAL, but I didn't really get very far on it (due to lack of time). But, I'm in college now, so maybe I'll have some more spare time to put into it. Now that EDS 0.5 has been out for a while, it seems like this would be the time to do it. If you're interested in helping with it, I'd be more than happy to work with you :) The same offer goes out to anyone else interested also. Btw, does anyone have suggestions for improvements/fixes to the EDS Toolbox? ----->Buddy budmeister1 at juno.com http://tenbux.iwarp.com/
6. Re: EDS and SQL
- Posted by Irv <irv at ELLIJAY.COM> Aug 24, 2000
- 467 views
- Last edited Aug 25, 2000
On Thu, 24 Aug 2000, budmeister1 at JUNO.COM wrote: > Btw, does anyone have suggestions for improvements/fixes to the EDS > Toolbox? I've tried several times to download it, and finally succeeded. Here's what I have been getting: Forbidden Host: [206.155.143.63] You do not have permission to access http://tenbux.iwarp.com/files/edstb13.zip Data files must be stored on the same site they are linked from. Thank you for using Freeservers What does it mean, "Data files must be stored on the same site"? Irv
7. Re: EDS and SQL
- Posted by Jim <futures8 at PCOLA.GULF.NET> Aug 25, 2000
- 469 views
Irv, I've had the same access problem. How did you finally succeed in downloading the EDS ToolBox? Jim Irv wrote: > On Thu, 24 Aug 2000, budmeister1 at JUNO.COM wrote: > > > Btw, does anyone have suggestions for improvements/fixes to the EDS > > Toolbox? > > I've tried several times to download it, and finally succeeded. > Here's what I have been getting: > > Forbidden > > Host: [206.155.143.63] > > You do not have permission to access http://tenbux.iwarp.com/files/edstb13.zip > > Data files must be stored on the same site they are linked from. > > Thank you for using Freeservers > > What does it mean, "Data files must be stored on the same site"? > Irv
8. Re: EDS and SQL
- Posted by irv <irv at ELLIJAY.COM> Aug 25, 2000
- 480 views
On Fri, 25 Aug 2000, you wrote: > Irv, > > I've had the same access problem. How did you finally succeed in downloading > the EDS ToolBox? > > Jim > With Lynx (of all things) Irv
9. Re: EDS and SQL
- Posted by Matthew Lewis <MatthewL at KAPCOUSA.COM> Aug 30, 2000
- 488 views
> -----Original Message----- > From: budmeister1 at JUNO.COM > > I was working on the beginnings of an SQL engine for EDS called EQUAL, > but I > didn't really get very far on it (due to lack of time). But, I'm in > college > now, so maybe I'll have some more spare time to put into it. > Now that EDS > 0.5 > has been out for a while, it seems like this would be the > time to do it. > > If you're interested in helping with it, I'd be more than > happy to work > with > you :) The same offer goes out to anyone else interested also. > > Btw, does anyone have suggestions for improvements/fixes to the EDS > Toolbox? > How far along have you gotten with your SQL engine? I've made some progress with my code. It's much more robust than the original version I put up on the user contributions page. Inner, right and left joins all seem to work now, and you can also sort using 'order by' commands. Some of the restrictions I had originally are gone. In your select statement, you don't have to include the fields that are being joined, and there is no need to keep fields from the same table together. My to do list (not necessarily in this order) looks something like this: * calculated fields * more complicated 'WHERE' statements (nested 'AND's and 'OR's) * append, update, union queries The latest (v0.2a) is at: Matt Lewis