data-modeling

What's the difference between Data Modelling and Domain Modelling?

我的未来我决定 提交于 2019-12-03 04:46:25
问题 By the way - with reference to data modelling I'm referring to logical or conceptual data models - not physical ones. The question came up during a discussion at work; naturally I leapt to Wikipedia to get some basic definitions in place - hoping that they might clarify the difference - but they didn't... A conceptual schema or conceptual data model is a map of concepts and their relationships. Logical Data Modles seem very similar (from this definition): A logical data model (LDM) in systems

Xcode consistency error: Setting the No Action Delete Rule… is an advanced setting

怎甘沉沦 提交于 2019-12-03 04:23:15
问题 After creating a data model in Xcode, it's throwing the following error for each of the object relationships: Consistency Error: Setting the No Action Delete Rule on [object relationship] is an advanced setting What is Xcode trying to tell me, and how should I respond? 回答1: Core Data uses inverse relationships and delete rules to keep the object graph consistent Let's say you have A.foo <1—1> B.bar and do a.foo = b . This automatically (effectively) performs b.bar = a . Now let's say you [b

Can I merge two databases into one in Mysql if they both have the same schema?

守給你的承諾、 提交于 2019-12-03 04:13:43
I have two databases in MySQL that already have data. they have exactly the same schema. I would like to merge those two databases into one only. I tried: mysqldump -u root -p --databases database1 database2 database3 > database1_database2_da However, when I try to open database1_database2_da , I only end up with data from one of the database, but not all of them. I also want to mention that the two databases have their records starting at 1, since they are automatically generated. Do you think there is a way to merge those two databases without losing data from any of them? Run mysqldump on

Database design - multi category products with properties

不想你离开。 提交于 2019-12-03 04:03:39
I am designing a basic inventory system for a vendor. They have many different product categories. Each product category has many different properties. A - x1, x2, x3, a1, a2, a3; B - x1, x2, x3, b1, b2, b3, b4; C - x1, x2, x3, c1, c2; Laptop - Make, Price, Quantity, Processor, OS, Hard drive, Memory, Video Card etc Monitor - Make, Price, Quantity, Size, ContrastRatio, Resolution etc Server - Make, Price, Quantity, Processor, OS, Memory, Netowrking etc Design1: Different tables for each category. Design2: Common Table, property table. What is the best approach? Definitely don't want to

Survey Data Model

邮差的信 提交于 2019-12-03 03:48:23
I'm developing a simple survey module for an ASP application I'm working on and I'd like to get some suggestions on the data model. Questions can be one of three types - multiple choice, multiple answer; multiple choice, single answer, and free response. I'm thinking of the following tables: Question - with a question type discriminator ifeld PossibleAnswers- with a questionID and answer text field SurveyQuestionResponse- with a questionID, a clientID, and answer text Am I making this too simple? mjv Take a look at the Data Model library at databaseanswers.org Models #76 thru #81 seem

Cassandra data model for simple messaging app

蹲街弑〆低调 提交于 2019-12-03 03:00:51
I am trying to learn Cassandra and always find the best way is to start with creating a very simple and small application. Hence I am creating a basic messaging application which will use Cassandra as the back-end. I would like to do the following: User will create an account with a username, email, and password. The email and the password can be changed at anytime. The user can add another user as their contact. The user would add a contact by searching their username or email. The contacts don't need to be mutual meaning if I add a user they are my contact, I don't need to wait for them to

Mysql Datatype for US Zip (Postal Codes)

懵懂的女人 提交于 2019-12-03 02:06:24
I am writing a web application, that is US specific, so the format that other countries use for postal codes are not important. I have a list of us zip codes that i am trying to load into a database table that includes the 5 digit us zip code latitude longitude usps classification code state code city the zip code is the primary key as it is what i will be querying against. i started using a medium int 5 but that truncates the zip codes that have leading zeros. i considered using a char5 but am concerned about the performance hit of indexing against a char variable. so my question is what is

Why use an auto-incrementing primary key when other unique fields exist?

孤街浪徒 提交于 2019-12-03 01:36:06
问题 I'm taking a course called "database systems" and for our class project I have to design a website. Here's an example of a table I created: CREATE TABLE users ( uid INT NOT NULL AUTO_INCREMENT, username VARCHAR(60), passhash VARCHAR(255), email VARCHAR(60), rdate DATE, PRIMARY KEY(uid) ); The professor told me "uid" (user id) was completely useless and unnecessary and I should have used the username as the primary key, since no two users can have the same username. I told him it was

What is a “order line”?

微笑、不失礼 提交于 2019-12-03 01:02:53
问题 I listen a number of podcasts. Often I hear the expression "Order line" in the context of database or business object modelling. It seems to be the canonical example of something. I just don't know what. So what is an "order line"? What concept does it represent in a canonical example? 回答1: It refers to a "Purchase Order" which typically consists of one or more lines, called "Order Lines". As almost every business on earth has some similar record of it's orders, purchases and/or sales, it has

Fetched properties as properties of an NSManagedObject subclass

流过昼夜 提交于 2019-12-03 00:50:14
I have a subclass of NSManagedObject (NSMO) called Team. Team has a one to many relationship with another NSMO subclass called Contract. Contract has a 1-to-1 with Player (another NSMO). I would like to simplify my code that uses Team and be able to just refer to its "players". Players will just be an array of players that have a contract with a given team. I've tried creating a fetched property called players in XCode's data modeling tool with little success. I've tried many different approaches, but the one that makes the most sense is to name it "players", have the destination as Player and