Hello,
Which version of sharepoint you are using?
You shouldn't ever try to access any sharepoint DB and it is not ever recommend. In sharepoint there is different way to maintain relational lists.
If you are creating a new site then follow below link to create relational lists:
http://msdn.microsoft.com/en-in/library/ff798514.aspx
http://zimmergren.net/technical/sp-2010-how-to-relational-lists-in-sharepoint-2010
Another approach is, use script or server code to get data from multiple lists based on query like SQL. You can use CAML or LINQ to use JOINS mechanism in sharepoint. Refer google/Bing to know more about JOINS.
Let us know if you have any doubt
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help