relational-database

Are all modern RDBMS row oriented? Why? [closed]

我的梦境 提交于 2019-12-05 02:52:53
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 9 years ago . If one of relational databases paradigms is to be tuple oriented we have the biggest limitation here. If one could design column oriented db, that would improve performance a lot. Vector operations would perform out of the box, indexing, hashing for simple symbol columns lookups, linked lists behind the scenes as

Ruby on Rails: Saving multiple values in a single database cell

我的梦境 提交于 2019-12-05 02:39:56
问题 How do I save multiple values in a single cell record in Ruby on Rails applications? If I have a table named Exp with columns named: Education , Experience , and Skill , what is the best practice if I want users to store multiple values such as: education institutions or skills in a single row? I'd like to have users use multiple text fields, but should go into same cell record. For instance if user has multiple skills, those skills should be in one cell? Would this be best or would it be

BCNF Decomposition

喜欢而已 提交于 2019-12-05 01:40:17
I am trying to figure out the correct steps in performing a BCNF decomposition. I found this example, but I do not understand how to perform the correct steps. Schema = (A,B,C,D,E,F,G,H) FD's + {A -> CGH, AD->C, DE->F, G->G} Could someone show the correct steps? Determine a minimal cover using your FD's: {A -> C, A -> G, A -> H, B -> nothing, C -> nothing, D -> nothing, E -> nothing, F -> nothing G -> nothing H -> nothing DE -> F} Note AD -> C drops out because A alone determines C which implies D is redundant in the FD (see Armstrong's Axioms - Augmentation). 3NF and BCNF definitions relate

Converting large XML file to relational database

江枫思渺然 提交于 2019-12-05 00:50:32
I'm trying to figure out the best way to accomplish the following: Download a large XML (1GB) file on daily basis from a third-party website Convert that XML file to relational database on my server Add functionality to search the database For the first part, is this something that would need to be done manually, or could it be accomplished with a cron? Most of the questions and answers related to XML and relational databases refer to Python or PHP. Could this be done with javascript/nodejs as well? If this question is better suited for a different StackExchange forum, please let me know and I

Relational division in mysql without aggregrate functions?

独自空忆成欢 提交于 2019-12-04 22:00:28
I want to implement a simple relational division in mysql with where exists or where not exists.I don't want to use any of the aggregrate functions and also don't want to use where in or where not in clauses.I am trying to write relational algebra and relational calculus queries for the same so it would be easy if I do it this way. For example: GID PID TEAM 101 1 X 201 2 X 301 3 X 101 4 Y 201 5 Y 101 6 Z The answer is GID,TEAM/GID which gives X as the answer.I want to know how to implement this is mysql with where exists or not exists. What you need is simple codd's relational division. select

Comment system design

…衆ロ難τιáo~ 提交于 2019-12-04 19:50:52
Here is my current comment system design: I'm developing it for a website that has lots of areas, blogs, tutorials, manuals etc etc. As supposed to developing a separate comment table for each ( tblBlogComments , tblTutorialComments ) etc etc, I'm trying to go for a one structure fits all approach. This way, I can turn the comment system into a web control, and just drop it on any page that I want comments for. It means I only have one set of rules, one set of code files to maintain. The only problem is, is coming up with a 'nice' way to determine which section (blog/tutorial/manual) belongs

How to find records, whose has_many through objects include all objects of some list?

谁说胖子不能爱 提交于 2019-12-04 19:42:58
I got a typical tag and whatever-object relation: say class Tag < ActiveRecord::Base attr_accessible :name has_many :tagazations has_many :projects, :through => :tagazations end class Tagazation < ActiveRecord::Base belongs_to :project belongs_to :tag validates :tag_id, :uniqueness => { :scope => :project_id } end class Project < ActiveRecord::Base has_many :tagazations has_many :tags, :through => :tagazations end nothing special here: each project is tagged by one or multiple tags. The app has a feature of search: you can select the certain tags and my app should show you all projects which

How to properly design this part of a database (circular reference?)

元气小坏坏 提交于 2019-12-04 19:28:50
Situation: A company has many projects A project has many tags A project belongs to only 1 company A tag can belong to multiple projects A company must have access to its own tags Example 1: In the first image, all tags for the company are available through the projects/project_tag. But if all projects are removed, then the tags for the company will not be accessible anymore, because the link between project_tag and projects is gone. The tags should be somehow always be linked to the company, even if there are no projects. Example 2 (where tags are also linked to the company): In the second

can the natural-join be seen as a subset of the equi-join and theta-join?

时光怂恿深爱的人放手 提交于 2019-12-04 17:13:09
I have a question regarding relational algebra and how the theta-join, equi-join, and natural-join can be classified in relation to each other. In a comment on stackoverflow.com sqlvogel quotes E.F. Codd , the computer scientist who invented the relational model for database management, "[the] Natural[-join] is a subset of Equi[-join] which is a subset of Theta[-join]." * ( stackoverflow.com retrieved on Feb 12 at 9:01PM). I understand how the equi-join can be seen as a subset of theta-join. They both join and they both use a fixed number of attributes, but the equi-join is restricted to using

Database design - Similar Contact Information for multiple entities

戏子无情 提交于 2019-12-04 14:39:33
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.CompanyAddress <- dbo.Address dbo.Company -> dbo.Companytelephone <- dbo.telephone dbo.Company -> dbo