|
From: | David Lamkins |
Subject: | Re: [Bug-apl] ISO Component File API preview |
Date: | Thu, 10 Jul 2014 13:16:54 -0700 |
Dear David,I haven't actually had time to look at your work yet. I am going off of what Elias said, my fair amount of experience with SQL databases, my experience writing the keyed files system, and the comments you have made. Forgive me if I am wrong, but based on your comments, it seems like you don't have a lot of experience with SQL databases.In SQL terminology, there are no 'files'. A 'database' is analogous to a D: drive in Windows, or a partition, file system, or mount point on Unix. What you would thing of as a 'file' is called a 'table'. A database can have any number of tables. You would never think of putting one table per database. That would be like creating a new drive for each file.Each table can have any number of rows (or records). Each record in a single table will have the same data elements as the other records in that same table - sort of like a spreadsheet. You can order or select by any row or any combinations of rows. In practice, however, it is best to have an index setup for the more popular types of queries you will be doing.SQLite keeps each database in a single Windows or Unix file. PostgreSQL has a complex internal data representation made up of many Windows/Unix files. Both of these facts are totally abstracted away from you, and in fact shouldn't matter to you at all.So, in implementing a component file system, it makes most sense to equate a single APL component file to a single SQL table. Each component would be a record in an SQL table. Ordering and access are handled automatically by the database. Your implementation should not care much at all whether it is SQLite or PostgreSQL.I hope this is helpful and not disrespectful.Sincerely,Blake
[Prev in Thread] | Current Thread | [Next in Thread] |