Relation between Database and Users

Database
Enthusiast

Relation between Database and Users

Hi to all,

I'm not a teradata expert and I have a doubt. Can anyone of you help me?

From official documentation I read the following definition:

"A database and a user are almost identical in Teradata Database. The major difference is that a user can log on to the system whereas the database cannot."

My doubt is: what's the point/sense of creating an alone database (without any user) if it cannot log on to the system?

So, in the above definition it is understood that to any database has associated at least one user and viceversa!!

Is it right?

thanks.

16 REPLIES
Enthusiast

Re: Relation between Database and Users

 "what's the point/sense of creating an alone database (without any user) if it cannot log on to the system?"

Only a user can create a database, therefore all databases have an associated user.

Access to a database and it's tables can then be granted to other users. 

Rglass

Enthusiast

Re: Relation between Database and Users

I think you will come to know the difference when you implement the scenarios like temporary, volatile tables and querying and you can check your space allocated.

You can refer to this link too


eg

CREATE DATABASE def FROM abc AS

       PERM=...

       SPOOL=...

       TEMPORARY=...

       NO BEFORE JOURNAL

       NO AFTER JOURNAL

....

CREATE USER ghi FROM kkk AS

       PASSWORD=kkkkk

       PERM=0

       SPOOL=0

       TEMPORARY=0

....

Enthusiast

Re: Relation between Database and Users

Glass Wrote: Access to a database and its tables can then be granted to other users.

e.g., what you say is:  Immagine there are users A, B and C in the teradata DB. User A create database D.

Access to a database and its table can be granted to users B and C also. Is it right?

If so, now my question is

.... And who can access to an user? (What are the users who can be granted to access to an user?)

-) Surely the user itself.

-) ... and Who else?

eg: Immagine there are users A, B and C in the teradata DB. User A create user D.

My question now is: who can access to a user D?

thanks.

Enthusiast

Re: Relation between Database and Users

ERRATA CORRIGE - PREVIOUS MESSAGE:

Glass Wrote: Access to a database and its tables can then be granted to other users.

e.g., what you say is:  Imagine there are users A, B and C in the teradata DB. User A create database D.

Access to the database D and its tables can be granted to users B and C also. Is it right?

If so, now my question is

.... And who can access to an user? (What are the users who can be granted to access to an user?)

-) Surely the user itself.

-) ... and Who else?

eg: Imagine there are users A, B and C in the teradata DB. User A create user D.

My question now is: who can access to the user D?

thanks.

Junior Contributor

Re: Relation between Database and Users

As a user is the same as a database every user can be granted access to D.

E.g. every user has access to the owner of the system tables, DBC, via PUBLIC rights.

The term database is misleading, in fact it's the same a schema in other DBMS.

It was named database 35 years ago, at that point in time there was no concept of schemas, yet :-)

Enthusiast

Re: Relation between Database and Users

What I do not understand is:

what is the REASON of which there are two separate concepts of users and database (or schema) if they are the same and the only difference is that a user has a password and can log on to the system, whereas the database cannot, that is, users are active repository and databases are passive repository.

What I wonder is why is not sufficient to have only the (concept of) active repository?

What is the motivation (reason) of which there exists also a passive repository?

Junior Contributor

Re: Relation between Database and Users

Why all other DBMSes got similar concepts, users and databases/schemas/owners, too?

Do you want to create random passwords for maybe hundreds of users which never logon?

Enthusiast

Re: Relation between Database and Users

okay, okay. Now it is clear. :)

sri
Enthusiast

Re: Relation between Database and Users

If a user is given permission on a database, both user and database is going to have Perm, Spool and Temp space allocated at the time of creation. How this space is used? Lets say user is having 1GB of Perm, Spool and Temp space as well as Database too. Now if user created a table in which perm space it store?

Thanks in advance.
Sri.