English 中文(简体)
分子排名数据库——表数
原标题:Athletics Ranking Database - Number of Tables
  • 时间:2011-08-16 23:29:42
  •  标签:
  • database

我对这一点说得很新,因此,你可能不得不与我在一起。 我为网站开发了一个数据库,其中的小册子排名,我很想知道有多少表格是实现这一目标的最有效方式。

我目前有2个表格,一个称为运动员的表格,载有我所有管理者的详细情况(可能约有600人/记录),其中包括以下领域:

mid (member id - primary key)
firstname
lastname
gender
birthday
nationality

And a second table, results , which holds all of their performances and has the following fields:

mid
eid (event id - primary key)
eventdate
eventcategory (road, track, field etc)
eventdescription (100m, 200m, 400m etc)
hours
minutes
seconds
distance
points
location

第二张桌旁有2000年左右的记录,可能随着时间的推移将翻四番,这主要是因为约有30个轨道活动、10个实地、10个道路、跨国家、中继器、多波束等,如果我的第一张桌上有600名运动员,则相当于我第二张桌上的大量记录。

So what I was wondering is would it be cleaner/more efficient to have multiple tables to separate track, field, cross country etc?

我想利用该数据库,根据人民的业绩,命令他们取得成果。 如果你想更好地了解我试图效仿的情况,请看网站

问题回答

改变图谋取得了一些成果。 即使你将会议地点分成一个单独的会议桌,每次活动的参与者仍然有一次结果。

建立一个单独的地点表的潜在好处是更加正常化。 经营人可以取得许多成果,某一地点可在某一日期取得许多成果。 你胜过,不得不重复每次结果记录中的场地信息。

You ll want to pay attention to indexes. Every table must have a primary key. Add additional indexes for columns you use in WHERE clauses when you select.

http://databases.about.com/od/specificproducts/a/normalization.htm rel=“nofollow”

PS——数千个记录胜出是一个问题。 大型数据库按千兆克或兆字节顺序排列。

我的想法——

页: 1 如果把全部数据放在同一个表格中,那么你就会有更方便的时间来回答数据。

否则,您的两张表格就看得很好——这是一个良好的开端。





相关问题
what is wrong with this mysql code

$db_user="root"; $db_host="localhost"; $db_password="root"; $db_name = "fayer"; $conn = mysqli_connect($db_host,$db_user,$db_password,$db_name) or die ("couldn t connect to server"); // perform query ...

Users asking for denormalized database

I am in the early stages of developing a database-driven system and the largest part of the system revolves around an inheritance type of relationship. There is a parent entity with about 10 columns ...

Easiest way to deal with sample data in Java web apps?

I m writing a Java web app in my free time to learn more about development. I m using the Stripes framework and eventually intend to use hibernate and MySQL For the moment, whilst creating the pages ...

join across databases with nhibernate

I am trying to join two tables that reside in two different databases. Every time, I try to join I get the following error: An association from the table xxx refers to an unmapped class. If the ...

How can I know if such value exists in database? (ADO.NET)

For example, I have a table, and there is a column named Tags . I want to know if value programming exists in this column. How can I do this in ADO.NET? I did this: OleDbCommand cmd = new ...

Convert date to string upon saving a doctrine record

I m trying to migrate one of my PHP projects to Doctrine. I ve never used it before so there are a few things I don t understand. In my current code, I have a class similar to this: class ...

热门标签