I am looking for some advice please as to the best way to configure my laravel database.
The Software is for a Garage who fix cars etc. The Garage Admin will raise a new job on the system, then Engineers will be assigned the job.
Once an Engineer views the job he can open a job sheet. There are 3 different kinds of job sheets to choose.
The engineer will choose a job sheet (which is a checklist) and save the job sheet to the job. He then can open a different job sheet with a different set of questions (which is another checklist) and save that second job sheet to the same job. etc.
My issue is how to create in the database the job_sheet lists.
Do I create one migration with all questions from all sheets on one table with a job_sheet_type to categorise them?
Or do I create 3 separate tables in the database one for each sheet with a relation to the job_id?
I know this may seem very trivial, I am just trying to ensure I do this the best and most optimal way possible.
Please feel free to ask for further information and I can explain more. Thank you.
Related
I'm absolute new to databases! I've developed a web-app with a postgres database. For evaluating my software, I've done a first field experiment with a fee colleagues. Afterwards there was a lot of bugfixes.
Now I've got a dump after the field experiment. But then I changed my database, renamed two tables, added a few tables and so on. How can I merge my dumped/old database the easy way?
Is there an easy way?
Feel free to ask for some data or everything, that helps.
Greetings,
Tobias
In my company we have a selected list of companies that are using our in-house built tool (e.g. Northwind).
When we make changes we deploy these to all our client locations.
The structure currently is: the application is installed at the client's location and the databases sit with them.
However, we would like to consolidate all this information into one database and clients will connect via web services for any data requests.
For example....We have deployed Northwind App and Db to company X, Y and Z and would like to create a single database to maintain all these company's data.
We have reviewed one option which is to create a field for the Company to associate it with the various tables and another option is to create a schema for each company and in this way we can allocate permissions to the relevant company. Is there an alternative to this and what are the pros and cons to the ways we could do this.
One con with adding a company field, is that we have to cater for indexes being the same in all the client databases and this makes it more difficult and the performance of the app as a whole due to multiple requests to the same db. Please Help?
Note: Using Sql Server 2008
Research "multi-tenant database architecture". (For your purposes, think of one tenant as one client.) You'll find a spectrum from "one database per tenant" to "every tenant in every table".
Read carefully. Writers in this field can confuse you. Expect technical terms like shared schema to mean different things to different writers.
See this SO answer for tradeoffs.
For your first step, I wouldn't consider anything besides simply moving those client databases in-house. Just doing that is going to give you and your application programmers enough headaches. You don't need an architectural change on top of it.
That will also give you time for research and testing.
Here is the description of the situation:
I have a reload Job that takes data
the reload Job loads the new data every day in the morning in SQL Server Database
When the new data is in the tables, the job processes 3 Cubes (Mgmt, Team, and Project cube)
In regard to 3 cubes, 3 roles have been defined: Mgmt_Reader, Project_Reader, and Box_Reader, respectively.
Here is the request - department manager wants to "clone" the project for his department.
My question is - what would be smart to do:
Maybe on the lower level in the reload Job include the data for the both departments.
In the next phase no changes are made - when the reload job loads the Database on SQL Server
Would than be possible to make another 3 Roles (6 overall) for the department manager? And would then be possible to make the corresponding restrictions, so that he can see only the data relevant to his department?
If yes, I ask kindly for feedback, how I can do it?
Or, do you know an approach that is more elegant, that the suggested one?
Thanks in advance!
first of all, I don't know if this is the right platform for this question. I hope it is. This is basically an architectural issue or more specifically a database design issue.
My company has asked me to create a service based website where individual subscribers can log in to their own customizable retail store. One fundamental question related to this requirement is designing the database. As I can understand there are two major approaches
Create a separate database based on a template for each subscriber / client.
Have a single database for all clients and link the tables based on primary key fields.
If any one has experience with the above scenario or can provide any useful insights, please do let me know.
Regards
Romi
separate database
You can put them easy to a other dedicated server
You have to administrate 1,000 databases for 1,000 clients
Your application need to figure out which database have to be used
one database with relationships
You have to administrate only one database
Less additional complexity in your application (tons of configurations etc.)
You can easy JOIN tables over all clients. For statistics or what ever.
I have a question but I'm not sure of the word to use.
My problem: I have an application using a database to stock information. The database can ben in access (local) or in a server (SQL Server or Oracle). We support these 3 kind of database. We want to give the possibility to the user to do what I think we can call versioning.
Let me explain : We have a database 1. This is the master. We want to be able to create a database 2 that will be the same thing as database 1 but we can give it to someone else.
They each work on each other side, adding, modifying and deleting records on this very complex database. After that, we want the database 1 to include the change from database 2, but with the possibility to dismiss some of the change.
For you information, ou application is already multiuser so why don't we just use this multi-user and forget about this versionning? It's because sometimes, we need to give a copy of the database to another company on another site and they can't connect on our server. They work on their side and then, we want to merge.
Is there anyone here with experience with this type of requirement? We have a lot of ideas but most of them require a LOT of work, massive modification to the database or to the existing queries.
This is a 2 millions and growing C++ app, so rewriting it is not possible!
Thanks for any ideas that you may give us!
J-F
The term you are looking for is Database Replication. You can google that to get more information about the topic (my personal experience is limited).
This was already done by ical (an old SunOS calendar app).
What you store/remember/transmit when the app makes the changes is not just the database contents, but the actual change log (e.g. "delete record with ID 1", "update record with ID 2 with these fields", "insert record with these fields")
That way you can apply these changes to master DB later on, AND to filter them before applying