search
HomeBackend DevelopmentPHP TutorialHow to design a multi-dimensional cross feed flow (database design, home page display information)

I am currently building a simple Q&A website
Now it has the following four elements
People, topics, questions, answers
How to design a database (MySQL)
People can follow people, topics, questions
Questions can have multiple hashtags
feed Streams (displayed on the home page) can appear mixed:

  1. New questions added to the topics I follow

  2. New answers to questions I’m concerned about

  3. Questions from people I follow

I feel that the database is not easy to design. How should the data on the home page mix and display different information?

Reply content:

I am currently building a simple Q&A website
Now it has the following four elements
People, topics, questions, answers
How to design a database (MySQL)
People can follow people, topics, questions
Questions can have multiple hashtags
feed Streams (displayed on the home page) can appear mixed:

  1. New questions added to the topics I follow

  2. New answers to questions I’m concerned about

  3. Questions from people I follow

I feel that the database is not easy to design. How should the data on the home page mix and display different information?

You can design a special feed flow table. This table can support home page display and can also be used as an information collection table.

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
php怎么把负数转为正整数php怎么把负数转为正整数Apr 19, 2022 pm 08:59 PM

php把负数转为正整数的方法:1、使用abs()函数将负数转为正数,使用intval()函数对正数取整,转为正整数,语法“intval(abs($number))”;2、利用“~”位运算符将负数取反加一,语法“~$number + 1”。

php怎么判断有没有小数点php怎么判断有没有小数点Apr 20, 2022 pm 08:12 PM

php判断有没有小数点的方法:1、使用“strpos(数字字符串,'.')”语法,如果返回小数点在字符串中第一次出现的位置,则有小数点;2、使用“strrpos(数字字符串,'.')”语句,如果返回小数点在字符串中最后一次出现的位置,则有。

php怎么设置implode没有分隔符php怎么设置implode没有分隔符Apr 18, 2022 pm 05:39 PM

在PHP中,可以利用implode()函数的第一个参数来设置没有分隔符,该函数的第一个参数用于规定数组元素之间放置的内容,默认是空字符串,也可将第一个参数设置为空,语法为“implode(数组)”或者“implode("",数组)”。

数据库设计中的冗余字段问题:PHP编程中的最佳实践数据库设计中的冗余字段问题:PHP编程中的最佳实践Jun 22, 2023 am 11:02 AM

随着互联网的普及和应用场景的不断增加,数据库设计成为了极其重要的一个问题。而在数据库设计中,冗余字段是一个很重要的问题。冗余字段是指在设计数据库时,出现了重复或不必要的字段。虽然冗余字段可以在一定程度上提高查询效率和速度,但同时也会浪费存储空间和加大维护难度,甚至会影响数据的一致性和安全性。因此,在PHP编程中,应该遵循一定的最佳实践,来解决冗余字段带来的问

php怎么去除首位数字php怎么去除首位数字Apr 20, 2022 pm 03:23 PM

去除方法:1、使用substr_replace()函数将首位数字替换为空字符串即可,语法“substr_replace($num,"",0,1)”;2、用substr截取从第二位数字开始的全部字符即可,语法“substr($num,1)”。

利用MongoDB技术开发中遇到的数据库设计问题的解决方案探究利用MongoDB技术开发中遇到的数据库设计问题的解决方案探究Oct 08, 2023 pm 05:53 PM

利用MongoDB技术开发中遇到的数据库设计问题的解决方案探究摘要:随着大数据和云计算的快速发展,数据库设计在软件开发中显得尤为重要。本文将讨论开发过程中常遇到的数据库设计问题,并通过具体代码示例来介绍MongoDB的解决方案。引言:在软件开发过程中,数据库设计是一个关键的环节。传统的关系型数据库在处理大规模数据时存在一些性能和可扩展性的问题。而MongoD

php怎么去掉右边几个字符php怎么去掉右边几个字符Apr 21, 2022 pm 07:45 PM

去掉方法:1、用substr_replace()删除右边n位置开始的全部字符,语法“substr_replace($str,"",-n)”,参数“n”为需要去除的字符个数;2、用substr(),语法“substr($str,0,-n)”。

php有操作时间的方法吗php有操作时间的方法吗Apr 20, 2022 pm 04:24 PM

php有操作时间的方法。php中提供了丰富的日期时间处理方法:1、date(),格式化本地日期和时间;2、mktime(),返回日期的时间戳;3、idate(),格式化本地时间为整数;4、strtotime(),将时间字符串转为时间戳等等。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft