relational-database

Triple Stores vs Relational Databases [closed]

社会主义新天地 提交于 2019-12-03 02:16:32
问题 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 6 years ago . I was wondering what are the advantages of using Triple Stores over a relational database? 回答1: The viewpoint of the CTO of a company that extensively uses RDF Triplestores commercially: Schema flexibility - it's possible to do the equivalent of a schema change to an RDF

Decomposing a relation into BCNF

独自空忆成欢 提交于 2019-12-03 02:10:47
问题 I'm having trouble establishing when a relation is in Boyce-Codd Normal Form and how to decompose it info BCNF if it is not. Given this example: R(A, C, B, D, E) with functional dependencies: A -> B, C -> D How do I go about decomposing it? The steps I've taken are: A+ = AB C+ = CD R1 = A+ = **AB** R2 = ACDE (since elements of C+ still exist, continue decomposing) R3 = C+ = **CD** R4 = ACE (no FD closures reside in this relation) So now I know that ACE will compose the whole relation, but the

Relational vs. Dimensional Databases, what's the difference?

妖精的绣舞 提交于 2019-12-03 01:41:32
问题 I'm trying to learn about OLAP and data warehousing, and I'm confused about the difference between relational and dimensional modeling. Is dimensional modeling basically relational modeling, but allowing for redundant/un-normalized data? For example, let's say I have historical sales data on (product, city, # sales). I understand that the following would be a relational point-of-view: Product | City | # Sales Apples, San Francisco, 400 Apples, Boston, 700 Apples, Seattle, 600 Oranges, San

Practical example for each type of database (real cases) [closed]

允我心安 提交于 2019-12-03 01:29:13
问题 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 last year . There are several types of database for different purposes, however normally MySQL is used to everything, because is the most well know Database. Just to give an example in my company an application of big data has a MySQL database at an initial stage, what is unbelievable and

When to use MongoDB

China☆狼群 提交于 2019-12-03 00:39:12
问题 I'm writing an application that doesn't necessarily need scaling abilities as it won't be collecting large amounts data at the beginning. (However, if I'm lucky, I could down the road potentially.) I will be running my web server and database on the same box (for now). That being said, I am looking for performance and efficiency. The main part of my application will be loading blog articles. Using an RDBMS (MySQL) I will make 6 queries (2 of the queries being joins), just to load a single

Using SUM with multiple joins in mysql

烂漫一生 提交于 2019-12-03 00:23:44
I've been looking for a solution to this, there's plenty of similar questions but none have any proper answers that helped me solve the problem. First up, my questions/problem: I want to sum and count certain columns in a multiple join query Is it not possible with multiple joins? Do I have to nest SELECT queries? Here's a SQL dump of my database with sample data: http://pastie.org/private/vq7qkfer5mwyraudb5dh0a This is the query I thought would do the trick: SELECT firstname, lastname, sum(goal.goal), sum(assist.assist), sum(gw.gw), sum(win.win), count(played.idplayer) FROM player LEFT JOIN

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

↘锁芯ラ 提交于 2019-12-03 00:22: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 java based). Any suggestions will be very helpful. Thanks. We use ES as a reporting db and when new

How to get foreign key values with getattr from models

落爺英雄遲暮 提交于 2019-12-03 00:15:52
i have a model Project and i am getting the attributes of that with the following instr attr = getattr(project, 'id', None) project is the instance, id is the field and None is the default return type. my question is what if i want to get the F.K keys with this? Get customer name project.customer.name How to get customer name with the above condition? Already Tried if callable(attr): context[node][field] = '%s' % attr() Current Code context = {'project': {}} fields = ('id', 'name', 'category', 'created_by', customer) for field in fields: attr = getattr(project, field, None) if callable(attr):

How can I make a schedule table for instructor from tables created

别等时光非礼了梦想. 提交于 2019-12-02 22:42:48
问题 Problem I need to make scheduale for instructor in training center. I created tables but relation I cannot do. What relation do I make between instructor_course table class table and section table? (Must I have a foreign key from table class and table section? Must I add ClassID FK from table class And SectionID from table section to table Inst_Courses Table?) Table details I need to show schedule for instructor courses within week from Sunday to Thursday. E.g. In Sunday from 2 - 4 clock

How to design table with primary key and multivalued attribute?

浪子不回头ぞ 提交于 2019-12-02 22:01:51
问题 I'm interested in database design and now reading the corresponding literature. Through the book, i have faced a strange example that makes me feel uncertain. There is a relation In this table we have a composite primary key (StudentID, Activity). But ActivityFee is partially dependent on the key of the table (Activity -> ActivityFee), so the author suggests to divide this relation into two other relations: Now if we take a look at the STUDENT_ACTIVITY, Activity becomes a foreign key and