A better understanding of the relations beetween database tables
- by Nistor Alexandru
Hi I am trying to get a better understanding of relational databases and there is something that I keep bumping into and don't understand.Let's take this two tables:
In this case Login.ID is the primary key with auto_increment set and Profile.ID_LOGIN is the Foreign KEY.When a user is created and it's username and password is stored in the login database does the ID coresponding to the curesnt username and password get automaticly added into ID_LOGIN or do I have to create an SQL statement to do this?
If I have to create a SQL statement how should I aproach adding the ID_LOGIN to make sure I am adding it corectly?