relational-database

Triple Stores vs Relational Databases [closed]

五迷三道 提交于 2019-12-02 14:14:44
I was wondering what are the advantages of using Triple Stores over a relational database? 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 store live, and without any downtime, or redesign - it's not a free lunch, you need to be careful with how your software works, but it's a pretty easy thing to do. More modern - RDF stores are typically queried over HTTP it's very easy to fit them into Service Architectures without hacky bridging solutions, or performance penalties

When to use MongoDB

人盡茶涼 提交于 2019-12-02 14:09:50
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 blog article page. select blog select blog_album select blog_tags select blog_notes select blog_comments

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

我们两清 提交于 2019-12-02 13:47:58
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 will bring serious consequences to the company. Why MySQL? Just because no one know how (and when) should use another DBMS. So, my question is not about vendors, but type of databases. Can you give me an practical example of specific situations (or apps) for each type of database where is highly recommended to use it?

Attaching categories from one table to entries in another MySQL

懵懂的女人 提交于 2019-12-02 13:17:01
问题 I have a database which takes user submitted data, the entries from which I want to group under one or several of about 10 categories. So for example, you add your entry to my site, say its all about your business (a car valeting service), and I offer you the opportunity to categorize your entry in any number of 10 fixed categories (automotive, mobile service, etc), so if a user searches for businesses under the 'automotive' or 'mobile service' category, your business is returned from the

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

痴心易碎 提交于 2019-12-02 13:03:26
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 Instructor Michel give C# Course in ClassRoom A Section B So I created following tables : Courses (like c#

BCNF: Looking for example that actually uses superkey instead of candidate key

左心房为你撑大大i 提交于 2019-12-02 11:19:31
问题 The definition of the Boyce–Codd normal form states that the determinants of all non-trivial functional dependencies have to be superkeys. All the examples for relations in BCNF I found make use of candidate keys. I am looking for an example that actually has a superkey as determinant which is not a candidate key. I fail to come up with a relation that only uses superkeys which can't be transformed to use candidate keys. Let's say we have a relation with an candidate key and an additional

How to design table with primary key and multivalued attribute?

荒凉一梦 提交于 2019-12-02 11:15:43
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 relation still has a composite primary key. We've got the table in which the whole columns defines a

Hibernate does not create Table in the database

纵饮孤独 提交于 2019-12-02 10:35:06
I am using PostgreSQL and I am trying to run a simple Hibernate application, in particular the application decribed in the page . My hibernate.cfg.xml file is: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">org.postgresql.Driver</property> <property name="hibernate.connection.url">jdbc:postgresql:testDB2</property> <property name="hibernate.dialect">org

How to handle multiple joins

℡╲_俬逩灬. 提交于 2019-12-02 10:16:05
问题 I have a complex query which requires fields from a total of 4 tables. The inner joins are causing the query to take much longer than it should. I have run an EXPLAIN statement, whose visual result is attached below: This is my query: SELECT pending_corrections.corrected_plate , pending_corrections.seenDate FROM (pending_corrections INNER JOIN cameras ON pending_corrections.camerauid = cameras.camera_id) INNER JOIN vehicle_vrn ON (pending_corrections.corrected_plate = vehicle_vrn.vrn500 OR

Entity Framework inserting duplicates on Seeding database [duplicate]

こ雲淡風輕ζ 提交于 2019-12-02 08:31:48
This question is an exact duplicate of: Entity Framework database mapping relationships (Duplicate creation using Seed() method) 1 answer EDIT---- From here i tried assigning Id's in the seeding method and this was OK for Languages but not when i added Address to the customer and assign Id's as well to these addresses, than it created the dupes again... Both Address & Language are declared as DbSet<...> in my Context What i tried: Adding 1 Address (with Id) - add this to 1 customer => Creates a dupe Adding 1 language & 1 Address (with Id's) - add both to 1 customer => Creates a dupe Adding 1