I have table users (for admin) & players (front-end users). I have successfully implemented Auth for admin.
Now I want to implement same for players. I cannot merge users and players table since both have different foreign keys and many tables are dependent on them.
Also, Player registration is done from a different form with many more fields then Admin.
Can anybody please help me?
I started using CakePHP 3.X
Related
i want to design a db for my project in laravel but confused how to manage tables. I have four entities Admin, Users, Agents and International Agents. Please help me how i manage my db tables. and if i make single table for multiple users then how to identify users.
Note: Each of the mentioned entities are different. Please ask if it not sounds clear. Thanks
I am trying to build an API first web app that has two parts:
Part A: The Project Management App. This would be built using php/mysql. One of the table in the mysql DB will be the users table where all users information will be stored viz username, password, email etc.
Part B: The online chat App. The users of the project management system will be able to chat among themselves. This will be built using nodejs/mongo. The mongodb DB would store the chat transcripts of each users and so would have a users collection containing the user details. The users collection would contain the same user information that the mysql users table has viz username, password, email etc.
Now, i have a couple of questions in terms of the architecture of this app.
Question 1: Is it at all a wise idea to maintain two different sources to store the user's information? The reason why I wanted to have a replica of the users table in the MongoDB as well is because since there will be too many reads and writes happening in the chat app so its best we use a nosql DB. (Lets assume here that my app will be used heavily going forward)
Question 2: If the answer to Question 1 is "Yes", how do we make sure of data consistency? I have thought of two approaches to achieve this:
Option A: Since we are using the API first approach, so during the registration of a user when the CREATE user api call is made, it will add the user in both mysql and mongodb databases.
Option B: I setup a cron that will sync the data between the mysql users table and the mongodb users collection periodically.
Can someone please throw some light on this and tell me if my approaches are right and that if I am going towards the right direction.
Many thanks
I am currently creating an Entity Relationship Diagram for a project but it seems to look strange.
I feel like there must be a better way to store the data to avoid repeated values or multiple NULL values but can't quite seem to figure how.
The project is a website that allows users to request their own forum which is then approved and added to the site.
Other times, administrators can create forums between themselves by skipping the request stage.
I have 3 tables:
Users
Requests
Forums
Users table stores the administrators and subscribers (using a role field).
Requests table stores the requested forum title and user, as well as whether this was approved and who by if so.
Forums table stores the active forums with their URL, the ID of the administrator, which admin user created the actual page, and if created from a request then request_id.
Here is how the model looks at the minute:
Entity Relationship Diagram
The issues I see are related to forums that are created without requests, the request_id field in Forums would be NULL if there was no request.
Also, if the forum IS associated with a request, then the user_id field will be duplicated in both the Forums and Requests table.
Can anyone see any problems with keeping it this way or whether there are better ways to model this?
I am new to access, and I am trying to make a simplae project of managing users.
I have a table of USERS, and to more tables of SERVICES and GAMES.
I have connections of ID in USERS, and ID -> USER_ID in SERVICES, as well in GAMES.
Now I want to display in one form, USER profile, and to print the games related to the user and the services related to the user.
I added a query, that joins with USERS and SERVICES and GAMES, and it shows everything right, except that if the user for example has two services and only one game connected to the USER_ID, then it prints the game twice.
is there a way to display it correctly?
in normal SQL and PHP, it would be easy, though in access I have no idea how to do it.
thaks
I want to use two tables for login one for admin and another user. Tables have different fields.
For that reason I don't want to use same table for authentication. How do I differentiate the authentication for login in cakephp 3.0