Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Help to create Database Relations

Author  Topic 

globemast
Starting Member

32 Posts

Posted - 2003-03-19 : 16:09:58
Hello i have created a Database for my Intranet with the following 3 tables...

Logins(Username,Password,Rights,Status)
People(Username,FName,LName,Address,Tel)
LoginStats(Username,IP,Since)

The first table holds as you can see the Username,Password and the Rights of the intranet user..
The second holds the First,Last Name etc..
The third table holds the Login Status of the user and its IP.

I have considered to use the Username as the primary key..
Is that correct?

The users are authenticated in the Intranet from the table Logins.


Please help me develop my table relations..

Thank you very much.... Please dont hesistate to ask me anything that will help to make the relations.

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-03-19 : 17:37:04
What do you mean by relations?


"Relations" is not a SQL Server term as such. It does mean different things to different people ....

Jay White
{0}
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-03-19 : 21:39:18
quote:
It does mean different things to different people ....
Like men and women, for example.

Go to Top of Page

globemast
Starting Member

32 Posts

Posted - 2003-03-20 : 11:45:27
I mean relationship diagrams with primary and foreing keys...Like Parent and Child Tables

Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-03-20 : 12:23:58
SQL Server, itself, doesn't have "relationship diagrams". I used Microsoft Access once and I seem to remember there being some sort of "relationship" diagams in that application. Maybe that is the confustion.

Enterprise Manager, a client tool used to connect to SQL Server, has a modest diagramming tool. Books Online has a good chapter on using Enterprise Manager. For true logical design and E-R modeling, you'll need a more robust tool. There are third party tools like ERWin, Rational Rose and Visio that you may find helpful.

Jay White
{0}
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-03-20 : 12:51:18
Well...

why do you have 3 tables?

Logins(Username,Password,Rights,Status)
People(Username,FName,LName,Address,Tel)
LoginStats(Username,IP,Since)


If Since only occurs once, then you really only need one table. If Since is a record of every login then you need 2.

Check out:

http://www.sqlteam.com/item.asp?ItemID=122



Brett

8-)
Go to Top of Page
   

- Advertisement -