database-design

MySql vs NoSql - Social network comments and notifications data structure and implementation

六眼飞鱼酱① 提交于 2020-05-25 08:25:20
问题 I am really finding it tough to figure out the insights about how does a social networking site (Facebook being a reference) manage their comments and notifications for its users. How would they actually store the comments data? also how would a notification be stored and sent to all the users that. An example scenario would be that a friend comments on my status and everyone that has liked my status including me gets a notification for that. Also each user has their own read/unread

MySql vs NoSql - Social network comments and notifications data structure and implementation

一世执手 提交于 2020-05-25 08:25:01
问题 I am really finding it tough to figure out the insights about how does a social networking site (Facebook being a reference) manage their comments and notifications for its users. How would they actually store the comments data? also how would a notification be stored and sent to all the users that. An example scenario would be that a friend comments on my status and everyone that has liked my status including me gets a notification for that. Also each user has their own read/unread

optimize in clause queries cassandra?

老子叫甜甜 提交于 2020-05-17 07:06:41
问题 I have a table like this in Scylladb. To make it clear I have removed lot of columns from below table but in general this table has ~25 columns total. CREATE TABLE testks.client ( client_id int, lmd timestamp, cola list<text>, colb list<text>, colc boolean, cold int, cole int, colf text, colg set<frozen<colg>>, colh text, PRIMARY KEY (client_id, lmd) ) WITH CLUSTERING ORDER BY (lmd DESC) AND bloom_filter_fp_chance = 0.01 AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'} AND comment =

SQL database - when to use a separate table vs a column of an existing one?

爷,独闯天下 提交于 2020-05-14 18:14:05
问题 So I am pretty new to SQL and databases in general(only designed a very simple one for a minimal site), and I'm trying to work out the best way to design some models for a heavily DB driven site. So take for example, a user uploaded gallery. I have a gallery table with sensible columns like date uploaded, name, etc., and galleries can belong to one category, of which there will not be that many (at most like 6). Should I have the category be a column of the gallery table? Or have a separate

Database table structure for notifications like table for a social networking site

 ̄綄美尐妖づ 提交于 2020-05-14 04:01:11
问题 I am developing a social networking site like Facebook. I am confused how to create structure for notification table. Should it be separate for each user or a huge one for all-where records added and deleted frequently ? 回答1: I have the same problem as you and found this (found this) upon researching where the table structure given is : id user_id (int) activity_type (tinyint) source_id (int) parent_id (int) parent_type (tinyint) time (datetime but a smaller type like int would be better)

Database table structure for notifications like table for a social networking site

对着背影说爱祢 提交于 2020-05-14 03:59:10
问题 I am developing a social networking site like Facebook. I am confused how to create structure for notification table. Should it be separate for each user or a huge one for all-where records added and deleted frequently ? 回答1: I have the same problem as you and found this (found this) upon researching where the table structure given is : id user_id (int) activity_type (tinyint) source_id (int) parent_id (int) parent_type (tinyint) time (datetime but a smaller type like int would be better)

Database table structure for notifications like table for a social networking site

霸气de小男生 提交于 2020-05-14 03:58:09
问题 I am developing a social networking site like Facebook. I am confused how to create structure for notification table. Should it be separate for each user or a huge one for all-where records added and deleted frequently ? 回答1: I have the same problem as you and found this (found this) upon researching where the table structure given is : id user_id (int) activity_type (tinyint) source_id (int) parent_id (int) parent_type (tinyint) time (datetime but a smaller type like int would be better)

Identifying Functional Dependencies II

假装没事ソ 提交于 2020-05-12 01:56:50
问题 I was getting a little confused with the last post so I found a nice example which should clear things up. hireDate & carReg are the primary keys. So my question can anyone find any extra functional dependencies other than the ones I have identified below....Modifications also welcome: fd1 carReg -> make, model, outletNo, outletLoc fd2 custNo -> custName fd3 outletNo -> outletLoc fd4 model -> make (only if we assume a model name is unique to a make) fd5 carReg, hireDate -> make, model, custNo

Identifying Functional Dependencies II

▼魔方 西西 提交于 2020-05-12 01:56:48
问题 I was getting a little confused with the last post so I found a nice example which should clear things up. hireDate & carReg are the primary keys. So my question can anyone find any extra functional dependencies other than the ones I have identified below....Modifications also welcome: fd1 carReg -> make, model, outletNo, outletLoc fd2 custNo -> custName fd3 outletNo -> outletLoc fd4 model -> make (only if we assume a model name is unique to a make) fd5 carReg, hireDate -> make, model, custNo

Identifying Functional Dependencies II

怎甘沉沦 提交于 2020-05-12 01:56:13
问题 I was getting a little confused with the last post so I found a nice example which should clear things up. hireDate & carReg are the primary keys. So my question can anyone find any extra functional dependencies other than the ones I have identified below....Modifications also welcome: fd1 carReg -> make, model, outletNo, outletLoc fd2 custNo -> custName fd3 outletNo -> outletLoc fd4 model -> make (only if we assume a model name is unique to a make) fd5 carReg, hireDate -> make, model, custNo