Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On 03/03/2013 07:27 AM, Dan Lewis wrote:
On 03/03/2013 10:09 AM, John R. Sowden wrote:
Why do the Libreoffice powers that be define dbase/xbase as a flat file database, not a relational database. The below definitions from the Base Intro documentation demonstrate what I am saying:

*Flat databases*

A flat database contains one or more tables, each containing one or more fields. Each table is completely independent of all the other tables in the database. For example, I have an address database with seven tables in it. One has my family's contacts, another has my business contacts, and another has my wife's family contacts. While some contacts are contained in more than one table, different tables may not have the same information about the same person.

dBase is a flat database program. LibreOffice and several database programs can also create flat databases.

*Relational databases*

Relational databases contain one or more tables with one or more relationships; each relaltionship is defined by a pair of fields. One field of each pair belongs to one table and the second field belongs to the same or a different table. Where relationships exist between fields in the same or different tables, a flat database could still be used, but it provides no mechanism for defining the relationship. Instead the same data must be entered in both fields, making data entry errors more likely. A well designed relational database requires the data to be entered only once, reducing possible errors.

dbase is a relational database per the above definition. I link 2 tables with 1 field so I can refer to data in the second database so data does not have to bbe entered multiple times. In our alarm monitoring station, when a police dept. changes its phone number, we change 1 field in 1 database. Hundreds of subscriber records refer to that field to populate the data screen. It seems that LO ptb either have a problem with dbase/xbase, or they are (were) uninformed of the facts.

John Sowden
(been programming in dBase II (under cp/m), Foxbase, Foxpro (under DOS) since 1981)
Good, someone who can provide some information! How far back has dBase been able to create and use relational databases? I ask because until OOo 1.1.15, Base created databases in dBase format. With the switch to using HSQLDB and embedded databases, Base could work with relational databases. Base could also work with dBase but only as a flat database. So, how would you suggest this section you quote be written to make it accurate? What are some good examples of flat databases?

--Dan

dBase II (there was never a dbase I. The closest was Vulcan which was written with our tax dollars at the Jet Propulsion Laboratory.) was originally a relational database. The original 3 ring binder manual said "Assembly Language Relational Database" on the cover. It only supported 2 open databases (now called tables). dBase calls its elements fields and records. An example of a 'flat" database is a name and address file. It's not linked to anything, so if you had a city field, and had 25 addresses in Cupertino, and the city got 10 million from Apple to change the name to "Apple City", you would have to change the city field in 25 records. If it were a relational database, and you set up a link between the citycode field in the main database and the citycode field in a cities database, then all of the addresses in Cupertino would have a code in the city field ('14') and the cities database would have 2 fields, one citycode and one cityname. All of the addresses in Cupertino would have a '14' in the city field and all of them would link to the one record in the cities database, so to make the change, all you would have to do is go to the cities database and change the cityname from 'Cupertino' to 'Apple City'.

It sounds like OO 1.1.15 treated the dbf files as unlinked individual databases. Therefore the "flat database" concept was a deficiency in the code of OO, not in the structure of the dbf format. Maybe no one wanted to acknowledge this, so they made the dBase format the scapegoat.

Re: your last comment, I would not mention dBase as a "flat file". If it were necessary to have an example of a "flat fire", I would look for a well known database that actually is a flat file, or define it as a list of data broken into sections, like a comma delimited list.

Another comment was made in another message re: the definition of relation. Actually the 2 databases cited above are related. I the commonness (is that a word?) of them is the citycode field, and the connection is via the software. In dBase they must be indexed on the linking field. The command used to relate them is "set relation to".

Runnin' out of wind,
John


--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.