P
P
Pavel2021-02-25 13:06:18
MySQL
Pavel, 2021-02-25 13:06:18

How to think over the structure of the "warehouse" in the database?

good afternoon everyone, I’m just starting to comprehend the beauty of databases, I’ve already tried some goodies in different projects but I didn’t write anything from scratch, they set me the task of writing a convenient warehouse accounting so that I could hang goods on a person, a person with a person could exchange them and see all kinds of reports what weighs on whom .. yes, in fact,

tell me everything how to think over the tables for this? The first is users itself, the second is the items themselves, the 3rd table is the history of movements Who gave -> who took -> date / time, maybe I'm missing something?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
T
Talyan, 2021-02-25
@mrusklon

In theory, goods are moved between warehouses in movements. There is no need to move goods between users. The user can be responsible for the move, and be listed as a userid in the move table.
In order to move goods from a warehouse to a person, you can simply create a warehouse that has the same name as the person's name.
For example:
Moving:
FROM: Warehouse Ivanov. A.V.
Q: Warehouse Loading for dispatch.
Responsible: Ivanov A.V.
This will simplify the logic, and it will not be necessary to separate the physical warehouses-rooms from the logical warehouses-people.
Then there will be tables:
Users
Warehouses
Goods
Movements
But the final calculation of the balances in warehouses can be done in two ways:
1) Or change the number of goods in the "warehouses" table, and in parallel create an entry in the transfer table.
2) Either enter the initial balances in the table of warehouses, but do the final calculation on the basis of only movements alone.
It’s up to you to choose, but I would choose the second option, since if you add a document posting field to the transfer table, then you can exclude unposted documents during the final calculation of the balances.
And this will enable employees to prepare and save transfers, and change them before the document is posted and the goods are physically transferred.

F
Feeddie, 2017-11-09
@mQExcellent

The most effective and fastest way is to give money to LoftSchool for training and take a course on layout. This will be the most efficient. Checked on personal experience;)
But if you follow the free path, then the path will be long and the main thing is to make it right.
The first thing to understand is how the browser works (and the engine it runs on). This will help in understanding when writing prefixes for cross-browser layout.
Further it is worth taking for an understanding of protocols, IP addresses and DNS. Also understand how requests are sent to the server and how frontend differs from backend.
These are the basics. I have personally read a very good book that covers these concepts, but it is for full stack development. It's called "Building Dynamic Websites with PHP, MySQL, JavaScript, CSS, and HTML5. 3rd Ed." There are many good layout books from the same publisher. In general, there is something for every taste.
The next step is to get down to business. To begin with, you need to know several technologies:
1) HTML / HTML5 - the foundation of the basics, without which the site cannot exist. You can learn this language on the htmlbooks website, or watch lessons on YouTube from the same Gosha Dudor. It tells quite well, but very little and you still have to finish off all the new tags yourself.
2) CSS / CSS3 - if you need a visual part for the site, then you are definitely here. And with the advent of CSS3, animation can also be handled without any bourgeois scripts. You can also go through htmlbooks, or look at Dudar's channel. Without fail, I advise you to study vanilla CSS and take the SASS preprocessor into service. SASS makes things incredibly easy and fast. I still have only one admiration for him.
3) JavaScript (EcmaScript) - the highlight of any site, because it is JavaScript that is responsible for handling events. Pop up popups on click? To JS! Send AJAX request to server? Also for JS. Without it, in our time, nowhere. Default js can inspire melancholy, so after studying it, you immediately need to cling to jQuery, or go even higher and look after some React JS with all the consequences. But the most important gift that you will be just in time for the article from JS is Node.JS. This is an incredible platform that I have not mastered for half a year now. Be sure to learn the basics of Node.Js and take either Gulp or Grant for layout and enjoy life. Gulp and Grant are project builders. In them, in the JS language, you can write tasks that will be performed later when the application is normally launched via the command line. For example, need to concatenate css files and transfer to production? Yes, no question, three lines and they are there. This is a great thing, but first you will need to go through the command line - creating files, running through directories and, of course, package managers. The documentation will tell you about all this, or the narrator when you study Node (Node.JS).
This is the most basic set that allows you to quickly and efficiently make up. In addition, I will add Git. Why is it needed? Yes, to store all your work on a remote repository and freely interact with them. Very often, an employer asks for a link to a repository or portfolio. The ability to work with git will always be a plus.
In general, here it is. I described my profession as briefly as possible) Good luck in your endeavors.

M
Morriarte, 2017-11-09
@Morriarte

htmlacademy.ru

M
mishapsv, 2018-04-22
@mishapsv

I'll duplicate my answer .
From personal experience:
1. Start with layout - the entry threshold is lower.
Study the theory, be sure to consolidate with a lot of practice. Having laid out several large layouts for the portfolio, actively look for work. At this stage, there is nothing better than full-time work. At first there will be a lot of questions, errors, problems, but progress will go as quickly as possible.
Where to study?
Theory: developer.mozilla.org , htmlbook.ru , learn.javascript.ru/css-for-js
It's convenient to try to typeset in the sandbox (I like codepen.io ).
Practice: interactive courses htmlacademy.ru(most can be accessed for free).
These same guys have an intensive site development from scratch. Passed it.
If you can afford it, I highly recommend it. Really grow in a month. Plus, you will have webinar recordings and free access to all subsequent intensives.
I can share the promo code "344a1a5b" (without quotes) - a discount of 800 rubles.
2. Continue learning JS.
Theory: learn.javascript.ru .
Practice: stepik.org , htmlacademy.ru has a little .
Intensives: I took JS intensives at learn.javascript.ru and htmlacademy.ru .
I liked htmlacademy better: a well-developed course interface, interactive exercises, the project is suitable for a portfolio, and the constant help of a mentor.
3. Further study the framework(s) : React, Angular, Vue.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question