“子列"在MySQL中 [英] "Sub columns" in MySQL

查看:85
本文介绍了“子列"在MySQL中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目想法,如果存在的话,它将变得更加简单;可以在MySQL中创建子列吗?

I have a project idea which would be much more simple if this exists; Is it possible to create sub-columns in MySQL?

这是我的意思的表格形式的示例:

This is an example of what I mean, in table form:

+--------+---------------+
|        |    Weekday    |
|  Time  +-------+-------+
|        |  1ST  |  2ND  |
+--------+-------+-------+
| 8:00   | Jim   | Bob   |
| 9:00   | Steve | Jim   |
| 10:00  | Tod   | Rick  |
+--------+-------+-------+

我必须指定一周中每一天的主要和次要联系点.我认为在周日,周六等下拥有小学"和中学"将非常容易.

I have to specify a primary and a secondary point of contact for every day of the week. I figured it would be very easy to have "Primary" and "Secondary" under Sunday, Saturday, etc.

我的一个朋友建议这样的事情是可能的,这促使我完成了这项任务.

A friend of mine suggested something like this would be possible, which led me to this quest.

推荐答案

首先要考虑的是,所有数据库的目标都是关于存储和操作数据的,而不管数据库的类型如何.以及如何向用户显示数据将在应用程序级别完成.在应用程序级别,数据可以显示为表格,表格,图表或任何您想要的内容.

First think first that all of databases goal is about storing and manipulating data, whatever the type of database. And how data to be shown to user will be done on application level. On application level, data can be shown as table, grid, chart, or whatever you want.

我认为您想念这个目标的想法.

I think you miss conception about this goal.

这篇关于“子列"在MySQL中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆