relational-database

Database design - Similar Contact Information for multiple entities

白昼怎懂夜的黑 提交于 2020-01-01 16:58:32
问题 I realise that the answer to these types of questions are often "it depends" but still I wondering what the general consensus might be. I am dealing with multiple entities such as Company Charity Auditor Stocktaker etc etc... Which all have contact information such as e-mail, telephone and address. The two design methods I was thinking to store the contact info were Method 1) create role tables between the contact tables and company, charity, auditor and stocktaker. dbo.Company -> dbo

Relational to NoSQL Database

懵懂的女人 提交于 2020-01-01 10:28:08
问题 This question is for all NoSQL and specially mongoDB experts out there. I started by designing a relational DB for a project but client wants us to use a DB that can easily scale. To achieve this we have decided to use mongoDB. These days I am having trouble mapping my relational model for NoSQL. I have a users table which has a many-to-many relation with a lot of other tables as illustrated below: I have a few options when converting it for mongoDB: Option 1 (with complete rows in users):

Indexing & alternatives for low-selectivity columns

你说的曾经没有我的故事 提交于 2020-01-01 09:13:25
问题 What are the range of tactics available for selecting records on low selectivity columns? An example might be an orders table where, over many years, you build up a large number of completed orders but often need to select active orders. An order might go through a lifecycle such as placed, stock-allocated, picked from warehouse, despatched to customer, invoiced and paid. An order might additionally be cancelled, held, etc. The majority of records will eventually be in the final state (e.g.

Indexing & alternatives for low-selectivity columns

僤鯓⒐⒋嵵緔 提交于 2020-01-01 09:13:02
问题 What are the range of tactics available for selecting records on low selectivity columns? An example might be an orders table where, over many years, you build up a large number of completed orders but often need to select active orders. An order might go through a lifecycle such as placed, stock-allocated, picked from warehouse, despatched to customer, invoiced and paid. An order might additionally be cancelled, held, etc. The majority of records will eventually be in the final state (e.g.

SQL database structure for Like and DisLike [closed]

ε祈祈猫儿з 提交于 2020-01-01 07:22:43
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I am new to web programming and need some expert advise. I am using SQL database for one of my website project. My website will display a list of topics with a Like and Dislike button. Logged in users will be

Difference between super key and composite key

六月ゝ 毕业季﹏ 提交于 2020-01-01 03:29:08
问题 I need to understand the difference between super key and composite key. The examples I found made more confused. Can you please simply clarify what is the difference? Thanks 回答1: A super key uniquely identifies a row. It could be made up of one column or many. A composite key is a key made of more than one column. If a Super Key is made of more than one column it is also a composite. If a composite key uniquely identifies a row it is also a Super key. I don't see the name 'Super key' used

How would one represent scheduled events in an RDBMS?

喜你入骨 提交于 2020-01-01 03:17:25
问题 I have to store scheduled events, (like say class times, for example) that can be organized on a weekly, daily or monthly basis. Events can occur, say, every Monday and Wednesday, or every second Thursday of the month. Is there a way to store this information in an RDBMS that adheres to 3NF? EDIT: This is not homework; I'm building something with a friend for our own edification and we want it in 3NF. To be specific, I'm trying to store the schedules for mass and confession times at RC

Web Development - Object db vs Relational db

不羁岁月 提交于 2020-01-01 02:34:08
问题 Whats the cons and pros of using a object database or relational database for regular web development which involves a lot of CRUD? UPDATE: I reopened the bounty reward in order to give Neville it. 回答1: Relational database: Pros: Established technology - lots of tools, developers, resources Wide range of Open Source and commercial products Known to scale to very large sites, and very high throughput Expresses many problem domains in a logical and "programmable" way Fairly standard language

what is the better way to index data from Oracle/relational tables into elastic search?

别说谁变了你拦得住时间么 提交于 2019-12-31 17:46:06
问题 What are the options to index large data from Oracle DB to elastic search cluster? Requirement is to index 300Million records one time into multiple indexes and also incremental updates having around approximate 1 Million changes every day. I have tried JDBC plugin for elasticsearch river/feeder , both seems to be running inside or require locally running elastic search instance. Please let me know if there is any better option for running elastic search indexer as a standalone job (probably

Deciding whether a relation is 3NF or 2NF

坚强是说给别人听的谎言 提交于 2019-12-31 03:58:07
问题 From the Database Management Systems book: given the relation SNLRWH (each letter denotes an attribute) and the following functional dependencies: S->SNLRWH (S is the PK) R->W My attempt: First, it is not 3NF: for the second FD, neither R contains W, nor R contains a key, nor W is part of a key. Second, it is/not 2NF. If we examine the second FD, W is dependent on R, which in turn is not part of a key. STUCK. 回答1: 2NF is violated if some proper subset of a candidate key appears as a