database-design

Locking to handle concurrency— a good idea? [closed]

我的梦境 提交于 2020-01-03 13:36:21
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . In order to handle concurrency issue, is locking-- any form of locking, whether it's row, table or database locking a good solution? If not, how to handle concurrency issue? 回答1: If you believe Oracle, no, not at all. That's because Oracle went to great lengths to avoid it.

database design tool question [closed]

試著忘記壹切 提交于 2020-01-03 13:11:26
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . is there a good database design tool can generate sql script to create database (tables) in major database (Oracle, MySQL, SQL server,

database design tool question [closed]

对着背影说爱祢 提交于 2020-01-03 13:09:38
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . is there a good database design tool can generate sql script to create database (tables) in major database (Oracle, MySQL, SQL server,

database design tool question [closed]

扶醉桌前 提交于 2020-01-03 13:09:04
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . is there a good database design tool can generate sql script to create database (tables) in major database (Oracle, MySQL, SQL server,

'Many to two' relationship

五迷三道 提交于 2020-01-03 11:39:09
问题 I am wondering about a 'many to two' relationship. The child can be linked to either of two parents, but not both. Is there any way to reinforce this? Also I would like to prevent duplicate entries in the child. A real world example would be phone numbers, users and companies. A company can have many phone numbers, a user can have many phone numbers, but ideally the user shouldn't provide the same phone number as the company as there would be duplicate content in the DB. 回答1: This question

How to track changes in multiple columns in database table for auditing purposes?

故事扮演 提交于 2020-01-03 10:44:09
问题 This question has been answered on SO several times : here, here and external links here and here. I understand the approaches described in above threads and I plan to use this approach. But I've got few basic doubts in implementing that. In my case, multiple columns in a row could be updated at the same time, so is following the correct way to implement: Find out type of operation (INSERT/UPDATE/DELETE) Find out columns which are getting updated Read the full row before updating Insert one

Consolidating tables with one-to-one relationships

做~自己de王妃 提交于 2020-01-03 09:07:09
问题 I have 3 MySQL tables for a membership system. users : Minimum requirement to be a user, only related to account info (email, password, is_activated, etc) user_profiles : Personal information provided by the user (name, address, phone...) user_member_profiles : Information strictly managed by admins (registration fee paid, meetings attended, etc.) These could be condensed into one table, saving me headaches and keeping my code clean - but I feel like it's better to leave them separate as they

How to store a sparse queryable matrix on disk or database?

£可爱£侵袭症+ 提交于 2020-01-03 08:44:12
问题 I need to store a sparse matrix on disk. It is like a database table with millions of rows and thousands of columns, where many or most columns are null. It needs to be queryable, like a SQL SELECT with a WHERE on some of the columns. My specific requirement is on Java. I first thought of using Berkeley DB for Java to simulate a table, but then it does not support querying based on values. Then, I thought about using a regular SQL database. For example, creating a schema with only a Row ID, a

How to store a sparse queryable matrix on disk or database?

99封情书 提交于 2020-01-03 08:43:28
问题 I need to store a sparse matrix on disk. It is like a database table with millions of rows and thousands of columns, where many or most columns are null. It needs to be queryable, like a SQL SELECT with a WHERE on some of the columns. My specific requirement is on Java. I first thought of using Berkeley DB for Java to simulate a table, but then it does not support querying based on values. Then, I thought about using a regular SQL database. For example, creating a schema with only a Row ID, a

Multiple optional query parameters with PostgreSQL

眉间皱痕 提交于 2020-01-03 05:45:08
问题 I use PostgreSQL10 and I want to built queries that have multiple optional parameters. A user must input area name, but then it is optional to pick none or any combination of the following event, event date, category, category date, style So a full query could be "all the banks (category), constructed in 1990 (category date) with modern architecture (style), that got renovated in 1992 (event and event date) in the area of NYC (area) ". My problem is that all those are in different tables,