Many to many relationship?

前端 未结 3 1480
广开言路
广开言路 2021-01-27 03:09

Guys I am trying to make a simple ticket generation system for my company as a favor. For now, I have a table called tblTicket and another table called tblEng

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-27 03:50

    Use a column to store different logic values: check this link http://sqlpro.developpez.com/cours/stockageopt/

    enter image description here

    enter image description here

    This means that 3 tables are necessary for data manipulation, including a significant cost to the relational query engine.

    Are there way to simplify this by integrating all these data within the Member table?

    Assign a code to each state:

    Methode 1 : ( use 2 tables )

    tblTicket ( id_Ticket , Engineers )

    Engineers( id_eng , other columns)

    in tblTicket Engineers you can set multiple value like id_1 - id_2 - id_3 ( 1-2-3) 3 engineers

    Methode 2 : ( use 3 tables )

    tblticket ( id_ticket , other columns ) ( primary key : id_Ticket )

    engineers ( id_Eng , other columns) ( primary key : id_Eng )

    TicketEng ( id_Ticket , id_Eng ) ( primary key : (id_Ticket , id_Eng) )

提交回复
热议问题