hi i need to undresdatn the relation which mention in that table which i attached plzzz.... any one.
thanks inadvance...
hi i need to undresdatn the relation which mention in that table which i attached plzzz.... any one.
thanks inadvance...
asked for help with the attached diagram and noted five relationships. Interpreting each connection is best done with a simple checklist applied to every line: identify the two entities and their primary keys; decide which side is "many" (look for a crow's foot or the table that carries the foreign key); decide if the relationship is optional (FK allows NULL or the diagram shows 0..1) or mandatory (FK NOT NULL or 1); and check whether the link has attributes (if it does, treat it as an associative entity and model it as a separate table).
Common implementation patterns to map diagram lines to MySQL tables:
Example DDL fragments:
CREATE TABLE parent (
id INT PRIMARY KEY
);
CREATE TABLE child (
id INT PRIMARY KEY,
parent_id INT,
FOREIGN KEY (parent_id) REFERENCES parent(id)
);
CREATE TABLE student (
id INT PRIMARY KEY
);
CREATE TABLE course (
id INT PRIMARY KEY
);
CREATE TABLE enrollment (
student_id INT,
course_id INT,
grade CHAR(2),
PRIMARY KEY (student_id, course_id),
FOREIGN KEY (student_id) REFERENCES student(id),
FOREIGN KEY (course_id) REFERENCES course(id)
); Quick troubleshooting and cautions: both FK and referenced columns must have compatible types and signedness; the referenced column must be indexed (PRIMARY or UNIQUE); use InnoDB for foreign keys in MySQL; be careful with ON DELETE CASCADE as it can remove more rows than intended. To follow up on 's comment, make a short mapping sheet (left table, right table, FK side, cardinality, nullable, notes). Posting that mapping will let others correct assumptions quickly.
Jump to Post— Salem 6,009I see 5 relationships, which is confusing you?
I see 5 relationships, which is confusing you?
plz if u can explain all the relations i will be thanks full to u
Can't you post what you think you understand about them, then we can correct and inform you.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.