English 中文(简体)
最好的MySQL数据类型
原标题:Best MySQL datatype

我试图用一个数据库储存这一系列要点。

我认为好的两种方式首先是一种案文类型,然后使用限定语来细化各点,这样,在 d中就会看一看。

+----------------------------+
| x_points    | 1:2:3:4:5... |
| y_points    | 1:2:3:4:5... |
+----------------------------+

然后,网上浏览会拉到这些要点,并将其划入“水面”。

是否有更好的办法储存在干b线上的位置?

对于复杂的功能,各点可以是每图1 000个点,然后是每一点的限定点,这样就具有体质。


由于这些评论,我将努力进一步阐述。 我正在利用“信道”确定用户投入的职能。 用户还将能够利用图表,我希望储存图纸的线数据,而且我所图的线数据也可以以同样的方式储存,计算点数只需要一度。

sen光仪样本将成为用户,可以 plot子2,然后在 y间盘旋。 然后,他们可以与这一信道相连接,并将重新划定他们的禁闭圈和图表。 当然,这是一个简单的例子,但我无法说明如何最妥善地储存这些要点。

希望更多。

最佳回答

这是一种单人关系。 你有一环,许多实际要点。 你们通常希望把这些要点单独列入一个表格,就像这样。

+----------------------+      +-----------------+
|        Shape         |      |  Point_Values   |
+----------------------+      +-----------------+
| shape_id (INT)       |      | shape_id (INT)  |
| shape_name (VARCHAR) |      | point_x (INT)   |
+----------------------+      | point_y (INT)   |
                              +-----------------+

为形成新的形态,在<代码>Shape表中插入新的形态。 然后,在<代码>>上设定一个或多个数值。 当你想回头来,获得价值时,你会像这样使用:

SELECT s.shape_name, v.point_x, v.point_y
FROM Shape s
JOIN Point_Values v ON s.shape_id = v.shape_id
WHERE s.shape_id = 5

这具有非常灵活的优势。 每一种形状都可能有零点或更多点,而且暗含着强制规定,必须有同等数量的x和 y点。

问题回答

暂无回答




相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

php return a specific row from query

Is it possible in php to return a specific row of data from a mysql query? None of the fetch statements that I ve found return a 2 dimensional array to access specific rows. I want to be able to ...

Character Encodings in PHP and MySQL

Our website was developed with a meta tag set to... <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> This works fine for M-dashes and special quotes, etc. However, I ...

Pagination Strategies for Complex (slow) Datasets

What are some of the strategies being used for pagination of data sets that involve complex queries? count(*) takes ~1.5 sec so we don t want to hit the DB for every page view. Currently there are ~...

Averaging a total in mySQL

My table looks like person_id | car_id | miles ------------------------------ 1 | 1 | 100 1 | 2 | 200 2 | 3 | 1000 2 | 4 | 500 I need to ...

热门标签