All Forums Database
Enzopre 16 posts Joined 02/13
16 Jul 2014
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.

 

Glass 225 posts Joined 04/10
16 Jul 2014

 "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

Raja_KT 1246 posts Joined 07/09
16 Jul 2014

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

 

http://www.info.teradata.com/HTMLPubs/DB_TTU_14_10/index.html#page/Database_Management/B035_1100_112A/Creating_Users_Granting_Access_Privileges.102.15.html

 

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

....

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

Enzopre 16 posts Joined 02/13
17 Jul 2014

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.

Enzopre 16 posts Joined 02/13
17 Jul 2014

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.
 

dnoeth 4628 posts Joined 11/04
17 Jul 2014

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 :-)

Dieter

Enzopre 16 posts Joined 02/13
17 Jul 2014

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?

dnoeth 4628 posts Joined 11/04
17 Jul 2014

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?

Dieter

Enzopre 16 posts Joined 02/13
17 Jul 2014

okay, okay. Now it is clear. :)

You must sign in to leave a comment.