Re: [sqlite] If I got many to many relationship data first, how do I insert them to my table?

2017-04-07 Thread 邱朗
Hi, Thanks for answering my question. But no matter whether it is "a problem in definition" or other reasons, it already happened in my system (And that was why I asked the question in the first place). And if we just ignore my particular question, I think it is not uncommon that many to many re

Re: [sqlite] If I got many to many relationship data first, how do I insert them to my table?

2017-04-05 Thread Richard Damon
On 3/31/17 6:08 AM, 邱朗 wrote: Say my mobile app has a customer table, a product table, and an order table to record who buys what, the order table basically has 2 foreign keys, customer_id & product_id. Now I got the order information first, within in it I can't find the customer information

Re: [sqlite] If I got many to many relationship data first, how do I insert them to my table?

2017-04-05 Thread petern
Qiulang. I am curious about this requirement. Is there an example commerce site in the real world where having a one to one match in a master customer login table to all real customers is vital to the mission? What sort of business would have that? Even banks do not have such surety about custome

[sqlite] If I got many to many relationship data first, how do I insert them to my table?

2017-04-04 Thread 邱朗
"Another option is to create an "Unknown" customer, and link any new orders to it. You can easily change that parent-id on the order later."This solution seems not work (especially in my case) because it is easy to have more than one unknown customer. Then I can't decide who orders what later.

Re: [sqlite] If I got many to many relationship data first, how do I insert them to my table?

2017-04-02 Thread Quan Yong Zhai
com> Sent: 2017年3月31日 18:09 To: SQLite mailing list<mailto:sqlite-users@mailinglists.sqlite.org> Subject: [sqlite] If I got many to many relationship data first, how do I insert them to my table? Say my mobile app has a customer table, a product table, and an order table to record who bu

Re: [sqlite] If I got many to many relationship data first, how do I insert them to my table?

2017-03-31 Thread R Smith
On 2017/03/31 12:08 PM, 邱朗 wrote: Say my mobile app has a customer table, a product table, and an order table to record who buys what, the order table basically has 2 foreign keys, customer_id & product_id. Now I got the order information first, within in it I can't find the customer informat

[sqlite] If I got many to many relationship data first, how do I insert them to my table?

2017-03-31 Thread 邱朗
Say my mobile app has a customer table, a product table, and an order table to record who buys what, the order table basically has 2 foreign keys, customer_id & product_id. Now I got the order information first, within in it I can't find the customer information in my local sqlite table. As it