Обсуждение: Supertypes?

Поиск
Список
Период
Сортировка

Supertypes?

От
"Christian Marschalek"
Дата:
In school we've learned about supertypes. I don't know if the raw
translation is correct so here is an example:
Supertype human with the attributes name,age,size.
Now I can derrive types from it... For example -> employe with even more
attributes like personal id.

Can I realise this in PostgreSQL? And if yes, would anybody please
explain how, or point me to the right documentation?

Thanks and regards, Christian Marschalek


Re: Supertypes?

От
"Len Morgan"
Дата:
I believe you are talking about inheritance which Postgres does support.  I
suggest the User's Manual for the details.

len

-----Original Message-----
From: Christian Marschalek <cm@chello.at>
To: [GENERAL] PostgreSQL <pgsql-general@postgresql.org>
Date: Tuesday, March 27, 2001 7:08 AM
Subject: [GENERAL] Supertypes?


>In school we've learned about supertypes. I don't know if the raw
>translation is correct so here is an example:
>Supertype human with the attributes name,age,size.
>Now I can derrive types from it... For example -> employe with even more
>attributes like personal id.
>
>Can I realise this in PostgreSQL? And if yes, would anybody please
>explain how, or point me to the right documentation?
>
>Thanks and regards, Christian Marschalek
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>http://www.postgresql.org/users-lounge/docs/faq.html
>


RE: Supertypes?

От
"Christian Marschalek"
Дата:
Guess it's inheritance.. Quite the same as it is in C++

Well no big deal if pg does not support it. It's just because we learned
some rules about data redundancy :o)

Thanks!

> -----Original Message-----
> From: Len Morgan [mailto:len-morgan@crcom.net]
> Sent: Tuesday, March 27, 2001 3:10 PM
> To: Christian Marschalek; [GENERAL] PostgreSQL
> Subject: Re: [GENERAL] Supertypes?
>
>
> I believe you are talking about inheritance which Postgres
> does support.  I suggest the User's Manual for the details.
>
> len
>
> -----Original Message-----
> From: Christian Marschalek <cm@chello.at>
> To: [GENERAL] PostgreSQL <pgsql-general@postgresql.org>
> Date: Tuesday, March 27, 2001 7:08 AM
> Subject: [GENERAL] Supertypes?
>
>
> >In school we've learned about supertypes. I don't know if the raw
> >translation is correct so here is an example: Supertype
> human with the
> >attributes name,age,size. Now I can derrive types from it... For
> >example -> employe with even more attributes like personal id.
> >
> >Can I realise this in PostgreSQL? And if yes, would anybody please
> >explain how, or point me to the right documentation?
> >
> >Thanks and regards, Christian Marschalek
> >
> >
> >---------------------------(end of
> >broadcast)---------------------------
> >TIP 5: Have you checked our extensive FAQ?
> >
> >http://www.postgresql.org/users-lounge/docs/faq.html
> >
>
>


RE: Supertypes?

От
"Christian Marschalek"
Дата:
> Pg DOES support it!
Oh... My fault :o)

> However, it doesn't really have anything
> to do with data redundancy.  Data redundancy means storing
> the same DATA in more than one table meaning that if it
> changes in one table, you have to update all of the other
> tables.  That's not the same as inheritance which means you
> can use a common base_table with additions to child tables as
> necessary.
Well we've learned that when you have lets say five tables which all
contain name, adresse, city and so on you also have a form of
redundancy... Can be wrong, though ;o)

chris


.mdb to Postgres ?

От
Jean-Arthur Silve
Дата:
Hi !

One of our customers has an MS Access DB (I think..)

He sent me a .mdb file.

Does anyone knows a way to convert this to postgreSQL db ?

thank you !
----------------------------------------------------------------
EuroVox
4, place Félix Eboue
75583 Paris Cedex 12
Tel : 01 44 67 05 05
Fax : 01 44 67 05 19
Web : http://www.eurovox.fr
----------------------------------------------------------------


Re: .mdb to Postgres ?

От
"Poul L. Christiansen"
Дата:
You can use some conversion tools that can be found on www.greatbridge.org

I've used PgAdmin (windows only) to convert MS Access files to PostgreSQL.

Poul L. Christiansen

On Tue, 27 Mar 2001, Jean-Arthur Silve wrote:

> Hi !
>
> One of our customers has an MS Access DB (I think..)
>
> He sent me a .mdb file.
>
> Does anyone knows a way to convert this to postgreSQL db ?
>
> thank you !
> ----------------------------------------------------------------
> EuroVox
> 4, place Félix Eboue
> 75583 Paris Cedex 12
> Tel : 01 44 67 05 05
> Fax : 01 44 67 05 19
> Web : http://www.eurovox.fr
> ----------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>


Re: Supertypes?

От
will trillich
Дата:
On Tue, Mar 27, 2001 at 03:58:39PM +0200, Christian Marschalek wrote:
> > Pg DOES support it!
> Oh... My fault :o)
>
> > However, it doesn't really have anything
> > to do with data redundancy.  Data redundancy means storing
> > the same DATA in more than one table meaning that if it
> > changes in one table, you have to update all of the other
> > tables.  That's not the same as inheritance which means you
> > can use a common base_table with additions to child tables as
> > necessary.
> Well we've learned that when you have lets say five tables which all
> contain name, adresse, city and so on you also have a form of
> redundancy... Can be wrong, though ;o)

there's also this construct -- i don't know the name --
exemplified below by using the table ADDR (very u.s.centric, i
know) as a DATATYPE in table PERSON:

    create table addr(
        street varchar(30),
        city varchar(30),
        state char(2),
        zip char(5)
    );
    create table person(
        loc addr,  --  how about them apples?
        phone char(10),
        name varchar(30)
    );
    \d person
               Table "person"
     Attribute |    Type     | Modifier
    -----------+-------------+----------
     loc       | addr        |
     phone     | char(10)    |
     name      | varchar(30) |


the trick, is, how do you insert data into person.addr?

--
It is always hazardous to ask "Why?" in science, but it is often
interesting to do so just the same.
        -- Isaac Asimov, 'The Genetic Code'

will@serensoft.com
http://newbieDoc.sourceforge.net/ -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

RE: Supertypes?

От
"Christian Marschalek"
Дата:
Oh yeah we've learned about the normal forms too :) It's all flying back
into my mind right now ;o)

Thx!

> -----Original Message-----
> From: Gregory Wood [mailto:gregw@com-stock.com]
> Sent: Tuesday, March 27, 2001 5:04 PM
> To: Christian Marschalek
> Subject: Re: Supertypes?
>
>
> > Well we've learned that when you have lets say five tables
> which all
> > contain name, adresse, city and so on you also have a form of
> > redundancy... Can be wrong, though ;o)
>
> When dealing with relational databases, that redundancy (or
> the process of eliminating it) is called normalization. This
> usually involves breaking tables apart into smaller tables.
> There are several 'normal forms' which database designers
> strive for... each normal form is closer to the 'ideal'
> database, although most designers don't bother with much
> beyond 3rd normal form. Of course, it can be wise to break
> the rules for performance reasons...
>
> Anyway, I highly recommend reading up on the topic... I
> didn't when I first started playing with SQL and look back on
> those days as my little database 'Dark Ages'.
>
> Greg
>
>


Re: Supertypes?

От
Jason Earl
Дата:
I believe that what you are looking for is
inheritance.

http://postgresql.readysetnet.com/devel-corner/docs/user/inherit.html

I hope this is helpful,
Jason Earl

--- Christian Marschalek <cm@chello.at> wrote:
> In school we've learned about supertypes. I don't
> know if the raw
> translation is correct so here is an example:
> Supertype human with the attributes name,age,size.
> Now I can derrive types from it... For example ->
> employe with even more
> attributes like personal id.
>
> Can I realise this in PostgreSQL? And if yes, would
> anybody please
> explain how, or point me to the right documentation?
>
> Thanks and regards, Christian Marschalek
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text