referential-integrity

NoSQL / RDBMS hybrid with referential integrity (delete cascade)?

回眸只為那壹抹淺笑 提交于 2019-12-03 11:15:19
问题 Is there a database out there that gives you the benefit of referential integrity and being able to use a SQL type language for querying, but also lets entities be loosely defined with respect to their data attributes and also the relationships between them? E.g. take a RBAC type model where you have Permissions, Users, User Groups & Roles. A complex/flexible model could have the following rules: Roles can have one or more permissions and a permission can belong to one or more Roles Users can

Does CouchDB supports referential integrity?

。_饼干妹妹 提交于 2019-12-03 05:36:34
I am new to CouchDB and learning about it. I did not come across CouchDB support for referential integrity. Can we create a foreign key for a field in the CouchDB document? For e.g. Is it possible to ensure a vendor name used in a order document is available in the vendor database? Does CouchDB support referential integrity? And Is it possible to make a field in a document as Primary key? No, CouchDB doesn't do foreign keys as such, so you can't have it handle the referential integrity of the system for you. You would need to handle checking for vendors in the application level. As to whether

What are the alternative ways to model M:M relations in Cassandra?

[亡魂溺海] 提交于 2019-12-03 03:17:55
Consider a M:M relation that needs to be represented in a Cassandra data store. What M:M modeling options are available? For each alternative, when is it to prefer? What M:M modeling choices have you made in your Cassandra powered projects? Instead of using a join table the way you would with an rdbms, you would have one ColumnFamily containing a row for each X and a list of Ys associated with it, then a CF containing a row for each Y and a list of each X associated with it. If it turns out you don't really care about querying one of those directions then only keep the CF that you do care

NoSQL / RDBMS hybrid with referential integrity (delete cascade)?

怎甘沉沦 提交于 2019-12-03 02:49:34
Is there a database out there that gives you the benefit of referential integrity and being able to use a SQL type language for querying, but also lets entities be loosely defined with respect to their data attributes and also the relationships between them? E.g. take a RBAC type model where you have Permissions, Users, User Groups & Roles. A complex/flexible model could have the following rules: Roles can have one or more permissions and a permission can belong to one or more Roles Users can have one or more permissions and a permission can belong to one or more Users Users Groups can have

Can PostgreSQL array be optimized for join?

旧街凉风 提交于 2019-12-02 17:02:31
问题 I see that Postgres array is good for performance if the array's element is the data itself, e.g., tag http://shon.github.io/2015/12/21/postgres_array_performance.html How about if I use array as a way to store foreign keys of integer? Barring foreign key constraint problem, is it advisable to store foreign keys with integer array? Apps should optimize for report or analytics. So if the app will end up joining the array to table most of the time, say the app need to show the label/title/name

Can PostgreSQL array be optimized for join?

ⅰ亾dé卋堺 提交于 2019-12-02 07:34:37
I see that Postgres array is good for performance if the array's element is the data itself, e.g., tag http://shon.github.io/2015/12/21/postgres_array_performance.html How about if I use array as a way to store foreign keys of integer? Barring foreign key constraint problem, is it advisable to store foreign keys with integer array? Apps should optimize for report or analytics. So if the app will end up joining the array to table most of the time, say the app need to show the label/title/name of the foreign key, is it still ok to use array for storage of foreign keys? Would the performance be

Cross table constraints in PostgreSQL

孤者浪人 提交于 2019-12-02 03:52:41
问题 Using PostgreSQL 9.2.4, I have a table users with a 1:many relation to the table user_roles . The users table stores both employees and other kinds of users. Table "public.users" Column | Type | Modifiers -----------------+-------------------+----------------------------------------------------- uid | integer | not null default nextval('users_uid_seq'::regclass) employee_number | character varying | name | character varying | Indexes: "users_pkey" PRIMARY KEY, btree (uid) Referenced by: TABLE

SQL Server relationships buried in stored procedures rather than schema

瘦欲@ 提交于 2019-12-01 23:37:45
At present we have very little referential integrity, as well as having a number of tables that self-join (and indeed would perhaps better be represented as separate tables or views that joined). The knowledge of how these tables relate to each other is implicit in the logic of the stored procedures rather than explicit in the schema. We are considering changing this. The first step is to actually understand the implicit relationships and document them. So my question is... What is the best way to extract that implicit information, short of eyeballing every stored procedure. I will consider

Does SQLite coupled with NHibernate support referential integrity / foreign keys?

别来无恙 提交于 2019-12-01 06:42:37
I have been reading a bit about NHibernate with SQLite, figuring it might be a very good option when I need lightweight database handling. I've read the following (and the links) which talk about how the NHibernate SQLite dialect does not support foreign keys WHILE CREATING the database, since NHibernate creates foreign keys through ALTER TABLE . I'm wondering, if I create an SQLite database through some other tool, would I be able to use NHibernate with said SQLite database, would it honor the referential integrity? Enable referential integrity with nHIbernate using SQlite database NHibernate

Does SQLite coupled with NHibernate support referential integrity / foreign keys?

荒凉一梦 提交于 2019-12-01 04:24:21
问题 I have been reading a bit about NHibernate with SQLite, figuring it might be a very good option when I need lightweight database handling. I've read the following (and the links) which talk about how the NHibernate SQLite dialect does not support foreign keys WHILE CREATING the database, since NHibernate creates foreign keys through ALTER TABLE . I'm wondering, if I create an SQLite database through some other tool, would I be able to use NHibernate with said SQLite database, would it honor