0

I'm trying to do one patient program for veterinary use. I'm creating a SQLite database table which includes patient name, owner name, address etc. But this table should include also when the patient should be made check-up, when it should be vaccinated, when it will take a surgery.(we can say a time scale)... Name, address etc are unique data's; there is only one name, only one address. But the "time scale" is not unique. It will store not only one data. What can I do now? Should I made a new database table for every patient to store these time scales? or should I store more than one data inside a one database row like using string arrays or something else? I think my best choice is storing a new database inside a database table row but is it possible? Some help will be great. Thanks.

4

1 回答 1

0

为什么不这样:


User_Schedule
-------------
create table user_schedule
(
   user_id integer,
   event_type text,
   event_date text // only because it's SQLite
)

这样,每个用户都可以拥有 n 个事件,并且您可以为每个事件命名,这样您就可以轻松查询诸如“给我所有即将接种疫苗的用户”之类的内容。

于 2013-02-18T01:05:25.943 回答