Good afternoon ,
I'm thinking about how it would be best to keep posts sqlite table 1 or more than 1,
To take an example, a chat , which is better to keep it all in 1 - same table (if you can ) or better in different ?
(Example 1 table )
http://cmanios.wordpress.com/2013/10/29/read-sms-directly-from-sqlite-database-in-android/
- I think if we have all the information in a table will be easier information overflow ( stack overflow )
Limitations on android sqlite tables: (related topics)
Maximum SQLite Database Size in Android Application
SQLite database limits in Android
I mean I can include more message all in one table . From my point of view , as a programmer , I want to create more than one table.
Example 1 and x tables :
- ( 1 table ) (Where user = "select " ) Only need see specific user, for example "messages of user 1 and 2)
Table : (User 1 + user 2 + user3 ... userx)
+-----------------------------------------------------------------------------------------------------------------+
| date | date_sent | person | body |
|------------------------------------------------------------------------------------------------------------------
| 2013-10-20 13:48:18 | 2013-10-20 13:48:16 | User1 | Hello Christos! How are you? |
| 2013-10-20 16:34:03 | 1970-01-01 02:00:00 | User2 | Fine, thanks ! I configure the left MFD of a F-16 jet |
| 2013-10-20 16:40:02 | 2013-10-20 16:40:01 | User3 | Awesome! I am throwing a party tomorrow at 21:45! |
| 2013-10-20 17:15:15 | 1970-01-01 02:00:00 | Userx | Thanks! I will be there! |
+-----------------------------------------------------------------------------------------------------------------+
- (2 or more tables) easy select all table
+-----------------------------------------------------------------------------------------------------------------+
| date | date_sent | person | body |
|------------------------------------------------------------------------------------------------------------------
| 2013-10-20 13:48:18 | 2013-10-20 13:48:16 | User1 | Hello Christos! How are you? |
| 2013-10-20 16:34:03 | 1970-01-01 02:00:00 | User2 | Fine, thanks ! I configure the left MFD of a F-16 jet |
| 2013-10-20 16:40:02 | 2013-10-20 16:40:01 | User1 | Awesome! I am throwing a party tomorrow at 21:45! |
| 2013-10-20 17:15:15 | 1970-01-01 02:00:00 | User2 | Thanks! I will be there! |
+-----------------------------------------------------------------------------------------------------------------+
+-----------------------------------------------------------------------------------------------------------------+
| date | date_sent | person | body |
|------------------------------------------------------------------------------------------------------------------
| 2013-10-20 13:48:18 | 2013-10-20 13:48:16 | User1 | Hello Christos! How are you? |
| 2013-10-20 16:34:03 | 1970-01-01 02:00:00 | User3 | Fine, thanks ! I configure the left MFD of a F-16 jet |
| 2013-10-20 16:40:02 | 2013-10-20 16:40:01 | User1 | Awesome! I am throwing a party tomorrow at 21:45! |
| 2013-10-20 17:15:15 | 1970-01-01 02:00:00 | User3 | Thanks! I will be there! |
+-----------------------------------------------------------------------------------------------------------------+
. . . .
I believe appropriate, create more than one table , we will not have storage problems , all in a single table.
Someone could tell me which is the best way? or if I'm wrong concepts