wiki:ЕРДијаграм

Version 4 (modified by 221550, 6 days ago) ( diff )

--

Оваа секција ги претставува концептуалниот дизајн на базата на податоци и податочните побарувања.

ЕР Дијаграм

Податочни побарувања

Ентитети

Entities

1. Client

  • telephone_number - varchar (Primary key)
  • name - varchar (Mandatory attribute)
  • last_name - varchar (Mandatory attribute)

2. Motorcycle

  • registration - varchar (Primary key)
  • chassis_number - varchar (Mandatory attribute)
  • year - date (Mandatory attribute)
  • model - varchar (Mandatory attribute)

3. Mechanic

  • embg - numeric (Primary key)
  • name - varchar (Mandatory attribute)
  • last_name - varchar (Mandatory attribute)

4. Service

  • service_id - serial (Primary key)
  • client_id - varchar (Foreign key referencing Client.telephone_number, Mandatory attribute)
  • motorcycle_registration - varchar (Foreign key referencing Motorcycle.registration, Mandatory attribute)
  • service_date - date (Mandatory attribute)
  • total_price - numeric (Mandatory attribute)

5. Item

  • item_id - serial (Primary key)
  • description - varchar (Optional attribute)
  • unit_of_measurement - varchar (Mandatory attribute)
  • price_per_unit - numeric (Mandatory attribute)
  • tax - numeric (Mandatory attribute)

6. ServiceInvoice

  • invoice_number - serial (Primary key)
  • date - date (Mandatory attribute)
  • recipient - varchar (Foreign key referencing Client.telephone_number, Mandatory attribute)
  • photo_copy - varchar (Mandatory attribute)

7. FiscalBill

  • fiscal_id - serial (Primary key)
  • datetime - timestamp (Mandatory attribute)
  • issuer - varchar (Foreign key referencing Client.telephone_number, Mandatory attribute)
  • description - varchar (Optional attribute)
  • total_price - numeric (Mandatory attribute)
  • ddv - numeric (Mandatory attribute)
  • edb - varchar (Mandatory attribute)

Relations

  1. Owns - 1:N relation where each Client can have multiple Motorcycles.
  2. Has - 1:N relation where each Motorcycle can have multiple Services.
  3. ServicedBy - M:N relation where each Service can be performed by multiple Mechanics, and each Mechanic can work on multiple Services.
  4. HasInvoice - 1:1 relation where each Service has only one Invoice and one Invoice can be linked to one Service.
  5. Contains - M:N relation where each Service contains multiple Items, and each Item can be part of multiple Services.
  6. FiscalRelationship - 1:1 relation where each ServiceInvoice can be associated with one FiscalBill and vice versa.

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.