Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Related to database schemas and design

I am building a website for users to be able to make their own profile page with details about themselves, users shall also be able to create pages (similar to those on G+ & FB), however, they can either associate their current personal account with their page or create a separate page with a different account. There shall be many different pages (page types).

I've found this picture:


(source: tomtenthij.nl)

Which seems very interesting, however, how can I structure this in a better way, for example: College Page, or Collect & University Page, or University Page or Hospital Page or Company Page etc. Each have their own set of attributes etc. Any help would be appreciated. I was thinking if Page_type could help me separate each depending on if it is a Hospital or Company etc.

EDIT: I am a beginner in Database Schemas, I have no problem with the PHP code. But want to know of a better way to structure a Database schema for multiple users, pages etc.

like image 946
John Smith Avatar asked Feb 02 '14 13:02

John Smith


People also ask

What is database schema design?

A database schema represents the logical configuration of all or part of a relational database. It can exist both as a visual representation and as a set of formulas known as integrity constraints that govern a database. These formulas are expressed in a data definition language, such as SQL.

What are the 2 main types of database schemas?

There are two types of schema – logical and physical. The first represents how data is organized, and the second defines the structure of its physical storage. A database schema is vital for creating databases and database management systems. It helps users understand and read the information stored in the database.


1 Answers

I had a cursory look on the tables. I found it satisfactory + problematic (or just I'm not understanding right away). It shall be better if we go through all the tables one by one and discuss the things over the matter of days. One week's input and roll in, roll out of ideas can give us good confidence on what we are going to achieve. Right?

First of all I would like to identify all the possible relations between a user and profile.

Secondly, I have to decide which will be my master table which will go on to occupy the relations with rest of the tables. Tables those are in or will come in the future. Don't forget that we have to put such a design in place which will never mind any kind of extension.

I read the comment about the graph database. Don't mind that is not something we are ready in position to dive in there. You are right on the track, just need to polish ideas. I'm starting this discussion so that other people can also join here.

I often ran out of time, but will try my best to discuss things as much as my knowledge can take me that far.

like image 65
Superman Avatar answered Sep 26 '22 04:09

Superman