4 ms·
I'm a bit confused about the concept of actors. Should I create an actor type for each table, and an actor for each row? They seem to be equivalent in some of t
by andypants 13y ago
I'm a bit confused about the concept of actors. Should I create an actor type for each table, and an actor for each row? They seem to be equivalent in some of the examples.
- biokoda 13y agoIt very much depends on your use case. But no you do not split by tables or rows generally. You split your problem into actor types. For instance if you were to create your own news.ycombinator.com you would require 3 types of actors: frontpage, thread, user frontpage: - CREATE TABLE threads (storyid INTEGER PRIMARY KEY, author INTEGER, title TEXT, url TEXT) thread: - CREATE TABLE comments (id INTEGER AUTO INCREMENT, parent INTEGER, user INTEGER, txt TEXT) user: - CREATE TABLE info (id INTEGER PRIMARY KEY, email TEXT, password TEXT) - CREATE TABLE posts (id INTEGER PRIMARY KEY, threadid INTEGER) There would be many thread and user actors, but only 1 frontpage actor.