data-modeling

What ways are there to store information about an anonymous/guest user in a database?

ⅰ亾dé卋堺 提交于 2019-12-03 12:17:48
Our application has an online shop among other features, and users are normally requested to register before completing a sale, creating a unique customer_ID in the process. When they return, they can log in and their contact details and transaction history are retrieved from the database. We are now exploring what to do in the case of an 'anonymous' or 'guest' customer, opening up the online shop to customers who don't want to register, and also for sales logged in the backend application, where taking the customer's email, postal address, etc is just too time consuming. The solution has

Mysql Datatype for US Zip (Postal Codes)

时光毁灭记忆、已成空白 提交于 2019-12-03 11:42:53
问题 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

Cassandra data model for simple messaging app

。_饼干妹妹 提交于 2019-12-03 11:38:10
问题 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

How would you model a friendship relationship in MongoDB?

好久不见. 提交于 2019-12-03 09:09:16
I know a lot of answers have been given that advise embedding an array of references to other users, but what all answers of this sort neglect is that friendship is a two-way relationship and that when Alice is Bob's friend, Bob is automatically Alice's friend. I'm not modeling followers. So I don't want to keep two references every time a new user enters the system. I need a model that takes into account the two-way nature of the relationship. I was thinking a collection of Friendship 'edges' where each document holds a reference to the two users. Wanted to know if literature regarding this

Data Model tools for DB2

六月ゝ 毕业季﹏ 提交于 2019-12-03 08:22:32
I have created a Database in DB2 and tables with relationships. I would like to create a ER diagram based on my database design in DB2. MS SQL has a facility to create ER diagrams from DB schema, but DB2 doesn't seem to have one, at least to my knowledge. Any one know of any open source tools/facility within DB2 itself for this? You could try TOAD for DB2 (freeware and commercial versions). Download here Also IBM Data Studio looks promising. DbVisualizer can visualize (and much more) just about any database, provided that the relevant foreign keys have been defined. DbVisualizer isn't open

Modelling an equivalent of database NULL in RDF

社会主义新天地 提交于 2019-12-03 06:57:21
I would like to know if there is a standard or generally accepted way of representing an equivalent of NULL used in databases for RDF data. More specifically, I'm interested in a way to distinguish the following cases for a value o of a property p ( p is the predicate, o the object of an RDF triple): The value is not applicable , i.e. property p does not exist or does not make sense in the context. The value is unknown , i.e. it should be there but we don't know it. The value doesn't exist , i.e. the property doesn't have a value (e.g. year of death for a person alive). The value is witheld ,

Relational vs Non-Relational Data Modeling - what's the difference

谁说我不能喝 提交于 2019-12-03 05:46:43
问题 I'm new to databases and I've never worked with any RDBMS. However I get the basic idea of relational databases. At least I think I do ;-) Let's say I have a user database with the following properties for each user: user id name zip city In a relational database I would for example model it in a table called user user id name location_id and have a second table called location location id zip city And location_id is a foreign key (reference) to an entry in the location table. If I understand

What's the difference between data model and object model?

匆匆过客 提交于 2019-12-03 05:13:42
问题 CWM is data modeling UML is object modeling. Can someone explain the difference that a layman can understand? 回答1: Object Model: deals with object oriented "blue-print" of your system. This includes, class diagrams (classes you will be creating), relationship between these classes, methods in the classes, properties etc. Data model: deals with entities at the database level. Like how the classes in the OM will get stored in the database, in which tables etc. So DM deals with Table schema,

Determine Event Recurrence Pattern for a set of dates

感情迁移 提交于 2019-12-03 05:02:46
问题 I am looking for a pattern, algorithm, or library that will take a set of dates and return a description of the recurrence if one exits, i.e. the set [11-01-2010, 11-08-2010, 11-15-2010, 11-22-2010, 11-29-2010] would yield something like "Every Monday in November". Has anyone seen anything like this before or have any suggestions on the best way to implement it? 回答1: Grammatical Evolution (GE) is suitable for this kind of problem, because you are searching for an answer that adheres to a

A good database modeling tool for PostgreSQL? [closed]

雨燕双飞 提交于 2019-12-03 05:00:10
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . PostgreSQL comes with the excellent pgAdmin-tool for managing the database but lacks GUI data-modeling utility? I found this list: