A
A
Alksar2015-04-28 13:30:59
Database design
Alksar, 2015-04-28 13:30:59

How to choose what to store in the database?

Good afternoon, I do not know what to do, what to store in the database?
I explain:
The database is created to work with orders. Orders are entered into the program. On the basis of orders, payment documents are created that contain specific services - for example, they add the order "Add order for translation, languages ​​English, Russian, Translation notarized.", while adding an order is implemented by filling out the "order for translation" form containing inputs languages, and a checkbox to indicate whether or not it will be notarized. Based on these data, two services are created - "translation from European (or Western) languages, notarization of translation.".
So, what should be stored in the database?
one)information fields of the order (two languages ​​and a boolean value "certified or not"). Based on this data, it is always possible to automatically compose these two specific services.
2) exactly services should be stored. Because it is probably useful to be able to make selections for different types of services, and in the end it is the services that end up in the documents later.
But for such services, it will not be possible to restore the full input information about the order, for example, the same languages ​​​​(since the service indicates only European or Western ones), which means that additional information and orders will have to be stored.
3)from point 2) this point follows - both this and that. And the order as a set of fields. And the set of services associated with it in a separate table. But a set of services can be obtained dynamically from the order data, wouldn't that be a duplication?
Which option to choose?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2015-04-28
@Alksar

1. order (main fields)
2. list of services to link to the order (id, name, additional fields for each service)
Pros: when adding additional. fields - the data selection expression based on the order will not need to be changed. (if additional fields - just add to the end)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question