How would I structure database the best?

Let’s learn how would I structure database the best. The most accurate or helpful solution is served by Stack Overflow.

There are ten answers to this question.

Best solution

How to structure a simple database

I would like to construct a database of the following nature: There are different types of people, and each person does many jobs, example: cleaner: clean toilet, clean kitchen maid: do laundry, cook breakfast, cook lunch gardener: plant flowers, water flowers I will also have a MySQL database with all of the cleaners, maids, gardeners, etc. The user will write which job he needs into an HTML form and then the PHP file will determine who does the desired job and then select the most appropriate...

Answer:

As indicated in the other post, you need to learn basics before you dive into something complicated...

Read more

James at Stack Overflow Mark as irrelevant Undo

Other solutions

Multitenancy: How do I design entities in business layer of a multi-tenant application for an extendable database structure?

For example, I want that a product may have multi-versions like from different tenants, one version product has 3 fields and other has 6 fields. Then how will I represent this entity in business layer to apply logic of my business on, not in database...

Answer:

Simple one-to-many relationship.  If some of the fields are common to both types of users, place them...

Read more

Matt Pickering at Quora Mark as irrelevant Undo

What is the best structure of database for activity (news) feed?

What is the best structure of database for activity (news) feed? Eg. A user is subscribed to activity of a group, actgivity of another user, and certain tag. HJow shall I organize database structure to show these activities to the user? I have the following...

Answer:

Include a timestamp in the activities. Add a column to the users table 'last_checked'.select *from activitieswhere...

Read more

Michael Tepfer at Quora Mark as irrelevant Undo

What is the best MySQL database structure for a social networking website?

How would you structure a MySQL database for a social networking website? Would you use one database for every user and tables within the databases to store user data such as friends and activities or, would you create one database for the social network...

Answer:

Normally, for one application with its group of related entities, you would use one database ("...

Read more

Toby Thain at Quora Mark as irrelevant Undo

How to structure file server to work with database?

I need advise on makeing a good site structure. I have folders that contain unique images uploaded by users that are referenced to database entries. Was told this can cause the server to crash as the number of folders grows. Is there a better solution...

Answer:

I don't believe that server crash is an issue here. NTFS file system can store millions of files in...

Read more

hytga at Yahoo! Answers Mark as irrelevant Undo

How should i create my mysql database? (the structure of it)?

i created a trivia quiz. How should i create my msql database. First the user types in their first name and last name. Then the quiz begins 16 questions Each question is on a different pages and you will have to pick points for each question and an answer...

Answer:

Too many variables. Can the count of questions change? Do you want to handle the linking of questions...

Read more

skateman... at Yahoo! Answers Mark as irrelevant Undo

Answer:

Lay out a table as follows (taken from eBay cat structure): Category1 Category2 Category3 etc. Art Digital...

Read more

Roye at Yahoo! Answers Mark as irrelevant Undo

How to use database table or XML file to describe a social network graph structure?

As I know the social relation is a graph structure and used to build social network relation system(such as "follow relation", "2nd relation" in Quora or Linkedin. How can I use data table or XML base on simple graph structure to...

Answer:

The schema of a SN in the relational paradigm is very simple, you have a table for entity person and...

Read more

Josep Lluis Larriba Pey at Quora Mark as irrelevant Undo

How do I structure a database to handle users in groups?

I've been working on a project that involves having a number of users. Each user can be in any number of predefined groups, and I'd like a user to only be able to see another user if they share at least one group. Right now I have a table of users, and...

Answer:

Couldn't you use three tables, like this: USERS user_id - primary key password etc GROUPS g_id - primary...

Read more

gstoll2003 at Yahoo! Answers Mark as irrelevant Undo

Answer:

I think that's just too generalized of a question to get the answer you're looking for no matter how...

Read more

Scott Mitting at Quora Mark as irrelevant Undo

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.