Show tables ? + 2 Feature requests

Ivan Smahin ivan_smahin at paradigmasoft.com
Wed Sep 19 07:45:05 CDT 2007


Hello Bart,

Wednesday, September 19, 2007, 3:05:47 PM, you wrote:

> Hi List, Ruslan

> 1) When running the "show tables" command, the query result also  
> includes VIEWS.

> Is this by design or a bug. If by design I would suggest updating the
> WIKI with the explanation that not only tables are included (as it  
> states now) but also views.

Yes - it is a feature. Of course WIKI must be up to date.
BTW, now  it  is  possible  to  filter  show  results as usual -
for subquery results:

Example:
SELECT * FROM (SHOW TABLES) WHERE type = 'TABLE'

> 2) Feature request: When running the show tables query the result  
> includes a field called text where , for views, the create statement  
> is stored.
> Would it be possible to do the same (store the create statement in  
> the text field) for tables. This would make it easier to copy tables  
> from one db to another, instead of dumping a table to disk (sql) and  
> the opening the .sql file copying the create statement and pasting  
> this in the SQL editor.
> I do realise that the create statement would need to include the  
> alter table statement in order to define the links.

Strictly speaking - it  is  impossible.  Look - there is a single way to
create  an  view  -  CREATE  VIEW  statement.  But  it  could  be some
dependency for the tables.
Example: Assume we have two tables t1 and t2. T2 has ObjectPtr pointed
to  table t1. Now you want to get a single statement which can be used
for t2 creation. Something like this:

CREATE TABLE t2 ( fPtr ObjectPtr REFERENCES t1 ON DELETE SET NULL );

But there is no guarantee that table t1 exists - right?
So it is not so simple and can not be expressed in a single statement.
You  can  try  to  make  SQL dump for some database and you will see -
there are some "ALTER TABLE" statements presented in most of cases.



> 3) May I repeat an earlier FR to have the possibility to include  
> comments for all Valentina Objects (Table, Field, Link, Method). I do
> realise that this is overkill for most projects, but I can assure you
> that having this for big projects where multiple people are working  
> on a common database, this feature would be very welcomed. I am sure  
> PostgreSQL has it and I think this is also true for other major db  
> engines

Instead  of  having  just a comments we are going to implement
more  common thing - "properties". It would be system properties, says
properties which are most common for particular object kind (Obviously
'comment' is kind of such property) and UDP (user-defined properties).


-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list