Basic question [message #671805] |
Thu, 20 September 2018 05:02 |
|
lucasmol
Messages: 4 Registered: September 2018
|
Junior Member |
|
|
Hi, I am new in SQL and I have this exercise that I don't know do it.
According to the attached list (which I do not have but is worth any example) indicate the physical model of the tables and the relationships of a relational database to obtain this list.
Thank a lot!!
|
|
|
|
|
Re: Basic question [message #671812 is a reply to message #671811] |
Thu, 20 September 2018 05:30 |
Roachcoach
Messages: 1576 Registered: May 2010 Location: UK
|
Senior Member |
|
|
It's literally impossible to ascertain the physical layout of the tables from a list of table names and nothing more.
Edit: Or are you asking how you take a list and query the data dictionary for the information?
[Updated on: Thu, 20 September 2018 05:31] Report message to a moderator
|
|
|
|
Re: Basic question [message #671814 is a reply to message #671813] |
Thu, 20 September 2018 05:37 |
Roachcoach
Messages: 1576 Registered: May 2010 Location: UK
|
Senior Member |
|
|
You need to query the data dictionary. The best way to do this (in my experience) is to have a poke around the dictionary:
select * from dict order by 1
--for likely related views
select * from dict where table_name like 'DBA%TAB%' order by 1
This will return table/view names for you to query subsequently. Have a look at the comments and cross reference that with the documentation online.
Beyond that the requirement is a bit too broad ranging for a simple answer.
Edit: Oh and read the CONCEPTS book. It'll help more than anything
[Updated on: Thu, 20 September 2018 05:39] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: Basic question [message #671835 is a reply to message #671833] |
Thu, 20 September 2018 08:14 |
gazzag
Messages: 1119 Registered: November 2010 Location: Bedwas, UK
|
Senior Member |
|
|
TEST_VW is a user-created view. It won't be dict. Try:
SQL> select * from dict where table_name like '%TAB%'
|
|
|
|
Re: Basic question [message #671837 is a reply to message #671833] |
Thu, 20 September 2018 09:02 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
msol25 wrote on Thu, 20 September 2018 09:06Hi Roachcoach/Blackswan,
Sorry to bear me. It gives data dictionary views and table details.
I don't quite understand.
You've been here over 7 years, are a senior member and you don't know the basics?
|
|
|