🔒 Closed Db -fk-pk

Status
Not open for further replies.

Netflix

Forum Veteran
Mga paps kapag ang Primary Key po ba natin ay naka auto-increment dapat din po ba yung foreign key naka auto-increment din? Pwede ko po ba gamitin sa 4 tables yung FK?

At hindi na po ba yan mag iincrement pag tinawag sila isa-isa?

Sana may sumagot
 
Pa-upload ng ERD mo. What do you mean auto-increment din yung foreign key? Ang foreign key is only a reference key sa primary key ng another table. Kaya depende yan sa relationship (one to one, one to many, many to many) ng mga tables mo. Sa pagkaka-alam ko pag sinet mo na naka auto-increment yung primary key ay ganun na rin ang magiging behavior niya sa lahat ng foreign key ng primary key ng table na yun. HIndi ako sure, hindi kasi ako nagdedesign ng mga RDBMS sa projects ko.
 
Wala pa akong ERD iniimagine ko palang po mga possible problems ko na ma eencounter sa pag gawa ko ng database using mysql..

And dapat po ba ang pag declare ko sa tables ng mga keys ko ay auto-increment?
 
Status
Not open for further replies.

About this Thread

  • 2
    Replies
  • 442
    Views
  • 2
    Participants
Last reply from:
Netflix

Online now

Members online
413
Guests online
892
Total visitors
1,305

Forum statistics

Threads
2,275,080
Posts
28,960,512
Members
1,233,576
Latest member
palautogmongpinoy
Back
Top