GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  Database Administration
Go To First  |  Previous Question  |  Next Question 
 Database Administration  |  Question 5 of 231    Print  
Explain the relationship among database, tablespace and data file.What is schema

  
Total Answers and Comments: 8 Last Update: January 09, 2009   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 09, 2005 02:34:29   #1  
vipul        

RE: Explain the relationship among database, tablespace and data file.What is schema
database contain atleast one tablespace and tablespace must have atleast one datafile
 
Is this answer useful? Yes | No
June 11, 2005 00:17:06   #2  
Ravi Prakash Pichika        

RE: Explain the relationship among database, tablespace and data file.What is schema
Databases tablespaces and datafiles are closely related but they have important differences:

--- A Oracle Database consists of one or more tablespaces
--- Each Table space in an Oracle database consists of one or more files called datafiles.
--- A database's data is collectively stored in the datafiles that constitute each tablespace of the database.

 
Is this answer useful? Yes | No
June 18, 2005 00:10:04   #3  
soccer_champ        

RE: Explain the relationship among database, tablespace and data file.What is schema
When a database user is created a corresponding schema with the same name is created for that user. A schema is a named collection of objects that include Tables Triggers constraints Indexes Views etc. A user can only be associated with one schema and that is the same name as the user's. Username and schema are often used interchangeably.
 
Is this answer useful? Yes | No
January 10, 2007 12:34:30   #4  
RAVI SALUJA        

RE: Explain the relationship among database, tablespac...

There is a very close relationship between database tablespaces and datafiles

Technically --> A database is linked with one or more tablespaces

and a tablespace is linked with one or more datafile

One datafile has not linked with two or more tablespaces means one datafile is linked with only one tablespace and this is the same case in relation of database and tablespace -- > one tablespace is not linked with one or more databases but a database has one or more tablespaces

Thanks


 
Is this answer useful? Yes | No
June 09, 2008 11:56:37   #5  
fdg28 Member Since: February 2006   Contribution: 1    

RE: Explain the relationship among database, tablespace and data file.What is schema

Database : Collection of data is called database.

Tablespace : An Oracle Database consists of one or more logical storage units called tablespace which collectively use to store all the database's data.

DataFile : Each tablespace in an Oracle Database consists of one or more datafiles which are used to store data physically.

Schema : A schema is a named collection of objects that include Tables Triggers constraints Indexes Views etc. A user can only be associated with one schema and that is the same name as the user's. Username and schema are often used interchangeably.


 
Is this answer useful? Yes | No
July 24, 2008 14:20:22   #6  
srinivasanram2004 Member Since: July 2008   Contribution: 7    

RE: Explain the relationship among database, tablespace and data file.What is schema

A database consists of one or many tablespaces. A database has one-to-many relationship with tablespaces. That is one database can have many tablespaces but a given tablespace can belong to only one database. Similary a tablespace has one-to-many relationship with datafiles. That is a tablespace can have one or many datafiles but a given datafile can belong to only one tablespace.

Here is an example:

select * from v$database;
This will give you the name of the database dbid created log_mode etc. You will see only one row.

select *
from v$tablespace;
This will give TS# tablespace_name etc. You will see many rows. TS# is primary key here.

select *
from v$datafile;
This will give you the datafiles name TS# where TS# here is a foreign key referencing the TS# of the v$tablespace table. Also you can see name column where the complete path is available as
/u5/fdgre2/fergdb/horm_data_01.dbf
/u5/fdgre2/fergdb/horm_data_02.dbf ...... etc.


So the short and correct answer is:

A database has one-to-many relationship with tablespace.
A tablesapce has one-to-many relationship with datafile.

Ram Srinivasan


 
Is this answer useful? Yes | No
July 24, 2008 23:38:23   #7  
ammupriyaa Member Since: July 2008   Contribution: 5    

RE: Explain the relationship among database, tablespace and data file.What is schema

Table Space : The table space is useful for storing the data in the
database. When a database is created two table spaces are created.



a) System Table Space : This data file stores
all the tables related to the system and dba tables


b) User Table Space : This data file stores all the
user related tables. We should have separate table spaces for storing the tables
and indexes so that the access is fast.



Data Files : Every Oracle Data Base has one or more physical data files.
They store the data for the database. Every data-file is associated with only
one database. Once the Data file is created the size cannot change. To increase
the size of the database to store more data we have to add data file.


 
Is this answer useful? Yes | No
January 09, 2009 08:31:25   #8  
imran44 Member Since: December 2008   Contribution: 12    

RE: Explain the relationship among database, tablespace and data file.What is schema
The database is actually a collection of objects which are made up of tablespaces and each tablespace must have datafile associate with it. The tablespace cannot be created without datafile. The tablespaces are two kind physical and logical.
The logical made up of Segments extents and blocks and physical made of OS blocks where the actual data exist and smallest unit unit of the database.

In Oracle schema is a user who can owned objects and owned by others users. The database comes with sys and system schemas which are default schemas later on many other users or schemas can be created on needed bases.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape