database-schema

Class hierarchy in MySQL

别等时光非礼了梦想. 提交于 2019-12-13 05:48:54
问题 I'm creating clothing shop and therefore I'm creating gallery functionality which consists of 2 types: Product gallery and lookbook gallery. A product gallery is simply pictures of singular products and a lookbook gallery is pictures that contains multiple products. So far i I have a simplified UML diagram somewhat like this I'm not sure how to translate this into MySQL tables. I've tried and I came up with something like this But it seems like overkill and smells funny to me. What would be

ASP.NET Identity Custom with Group-based Roles

别等时光非礼了梦想. 提交于 2019-12-13 05:03:07
问题 Perhaps I've misunderstood the concept of Roles in ASP.NET Identity and the database model, but I'm struggling to wrap my head around how to implement the following scenario: With ASP.NET Identity, it seems a User has permissions globally based on a Role, as opposed to permissions on a more granular level. I'm trying to implement a DB Schema in EF6 with Code-First where a User can be a member of several Groups. Instead of having a global Role however, I want the User to have one role in one

EntityTypeConfiguration - What is a clean method to test mapping against the database?

心已入冬 提交于 2019-12-12 15:50:17
问题 Background: My company's current structure is using Plinqo/Linq to Sql to create "data access objects", and then use a custom set of CodeSmith templates to build "business objects". To make a very long story short, these two sets of objects are very tightly coupled and, with Linq to SQL, lead to pretty ugly workarounds. The Plinqo templates do a direct 1:1 mapping of table to class after generating the dbml. This leads to some comfort in that if the database changes, there is a compile-time

Cassandra and unstructured data

点点圈 提交于 2019-12-12 12:25:34
问题 I'm relatively new to NoSQL, but I've done a fair bit of toying with relational databases. We are evaluating Cassandra for use in an environment where our data model might need to evolve fairly aggressively. I've seen it written multiple places that Cassandra can store "structured, semi-structured and unstructured" data. I understand the structured claim. It's obvious: a table has defined columns. I think I understand the semi-structured claim. A row does not need to populate all columns. But

JPA, Start with entities vs database schema

微笑、不失礼 提交于 2019-12-12 09:22:26
问题 Which is better when using JPA, especially when starting a new project? Start with designing entities and then let JPA generate the database or Start with the database schema and let tools generate entity classes? im part of a small company. im both the software developer and DBA. i have complete freedom for the application and db design im just starting the project 回答1: If you want to design a database, then start with the schema. If you want to write software, then start with the entities.

what is bad in this table schema structure

独自空忆成欢 提交于 2019-12-12 06:54:27
问题 I have got a table structure which is as follows: `CREATE TABLE "pages" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "body" varchar(255), "author" varchar(255), "email" varchar(255), "reference" varchar(255), "created_at" datetime, "updated_at" datetime);` Is this table structure bad? edit-1 Its sqlite database i am using. 回答1: Based on the limited info that you have provided. If the table fits your needs then no it is not bad. However if you will have the same

How to copy a MySql database schema using C#?

佐手、 提交于 2019-12-12 06:37:35
问题 I'm trying to use C# & MySql in order to copy an empty table (recreate the Schema really). The structure looks like this: > TableTemplate (schema) + Tables > FirstTable (table) > second table (table) > ... > SomeOtherTable + Tables > ... What I would like is to copy the TableTemplate into a new Schema with the user name. The first obvious path to oblivion was trying CREATE TABLE @UserName LIKE TableTemplate , swiftly learning that sql parameters are supposed to be used for values and not

DB2 linking schemas across multiple instances

戏子无情 提交于 2019-12-12 06:27:06
问题 I have a few instances of DB2 10.5 server running on one physical Linux machine, let name them INST1 and INST2. All of them contain multiple schemas, however schema-naming is unique accross whole machine, for example INST1_SCHEMA_A, INST2_SCHEMA_A etc. What I would like to do is to somehow create a user that can access all of those schemas as they were on one instance, so it would be possible to make a queries like: SELECT ID FROM INST1_SCHEMA_A UNION SELECT ID FROM INST2_SCHEMA_A How can I

Notes system in database

我的梦境 提交于 2019-12-12 04:43:18
问题 I'm currently working on building an ERP/CRM database in Access 2013 to cover all non-financial aspects of running a business such as customer/supplier info, contacts, order and deliveries tracking, and that sort of thing. We manufacture made-to-measure joinery products (windows, doors etc). One thing that I'm finding is that I'll need to have the ability to write notes about records in almost every table in the database. For example, I may want to write notes on the following tables:

Should I create special schema for each web application or put it all in a single schema?

淺唱寂寞╮ 提交于 2019-12-12 04:06:41
问题 Good day, I'm designing MySQL database for a web application which has two parts: The first part is a member system which maintains country/organization/suborganization/user hierarchy, service parameters and user roles. The second part is a web application for managing orders and tasks within these orders. It will use the member system to authentificate user and get it's roles and service parameters configured for this webapp. In future there will be another application (and later possibly