relational-database

Any way to automatically generate a UML diagram? [closed]

自古美人都是妖i 提交于 2019-12-20 06:20:45
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I have a MySQL DB and I would like to generate its relational diagram. Is there a tool that can connect to the DB and automatically generate it for me? 回答1: Yes, DEVART's DBForge for MySQL will do this. There is a free Express edition, I'm not sure it has this functionality, but have a look at: http://www.devart

How to have multiple one-to-many relations between two entities using Entity Framework Code First

若如初见. 提交于 2019-12-20 06:18:14
问题 Below is a simple approach to save relational database records which is working perfectly fine. I have doubt on one scenario. Before that i need to know the way i am approaching has any difficulties if the database complexity increases. Any better, efficient but simple approach? ONE to ONE: tb_student // store student details id, name, country_id (country_id foriegnkey set with id of tb_country) tb_country // store all available countries id, name [Table("tb_student")] public class Student {

A relational database shared by an android app and a website - the easy way

泪湿孤枕 提交于 2019-12-20 03:53:33
问题 I have a project where I will develop an android application and a website. They both should share the same database. I am trying to explore all the options and I am really confused. Here are my requirements: 1- I need an extremely simple and EASY way. I am not trying to learn; I am just trying to get things done. 2- The database design includes relationships and foreign keys. Therefore, I need a relational database. 3- The users of the android app are limited ; as it is not an app that will

Which highest normal form is this table in?

可紊 提交于 2019-12-20 03:28:30
问题 Ticket Vname Nname 1 Oli Seitz 1 Andi Hofmann 2 Oli Seitz 2 Oli Schmidt 2 Tim Schmidt 3 Tim Hofmann This table represents a mapping of persons ( Vname, Nname ) and tickets ( Ticket ). Vname and Nname together identify a person, but every Person ( Vname, Nname ) can have multiple tickets ( Ticket ), and a ticket can be assigned to multiple people. The PK in this table are all three columns together. So this table should be 1NF because there is no multi dimensional data in one column. But then

Should I make a foreign key that can be null or make a new table?

删除回忆录丶 提交于 2019-12-20 01:13:20
问题 I have a small question concerning with how I should design my database. I have a table dogs for an animal shelter and I have a table owners. In the table dogs all dogs that are and once were in the shelter are being put. Now I want to make a relation between the table dogs and the table owners. The problem is, in this example not all dogs have an owner, and since an owner can have more than one dog, a possible foreign key should be put in the table dogs (a dog can't have more than one owner,

How to provide relational algebra for the given schema?

夙愿已清 提交于 2019-12-19 12:30:10
问题 EMPLOYEE(PERSONNAME, STREET, CITY) WORKS(PERSONNAME,COMPANYNAME, SALARY) COMPANY(COMPANYNAME, CITY) MANAGES(PERSONNAME, MANAGERNAME) Find the names of all employees in this database who do not work for First Bank Corporation (assuming that all people work for exactly one company and people are allowed to appear in the database (e.g. in employee) but not appear in works). Here I do not understand the assumption part. What does it actually mean ? 回答1: As @wildplasser pointed out: The first part

Are multiple foreign keys in a single field possible?

佐手、 提交于 2019-12-19 10:38:07
问题 I want to know if there is a way to have multiple values in a single field in a MySQL database where each value is a foreign key referencing one other table. I am designing a database with a product table and a product certification table. I am using InnoDB and foreign key constraints. The "product" table contains the details about specific instances of the product. One of the details contained in the product table is the column “product_certification_id”, which is a foreign key referencing

Self-contained database?

房东的猫 提交于 2019-12-19 09:41:50
问题 Is there a way to distribute a (smallish) self-contained relational database along with an Windows application that does not require users to install additional dependencies such as MS Access, SQL Server, MySQL, SQLite, etc.? Only the application will be accessing the database - not users directly. 回答1: Microsoft SQL Server Compact 4.0 SQL Server Compact Edition 3.5 SQLite to name just a few. 回答2: SQL Server Compact Edition 4 回答3: I would embed SQLite in my application. There's various ways

Can good Object Orientated Design be formalised as good relational database design has been?

穿精又带淫゛_ 提交于 2019-12-19 09:08:22
问题 In the database world, we have normalisation. You can start with a design, crank the steps and end up with a normal form of the database. This is done on the basis of the semantics of the data and can be thought of as a series of design refactorings. In object orientated design, we have the SOLID principals and various other adhoc guidelines towards good design. Do you think it is possible to define the equivalent of normal forms for OO, such that a series of refactoring steps could move a

MySQL: Two n:1 relations, but not both at once

戏子无情 提交于 2019-12-19 07:32:45
问题 Sorry for the title, it's difficult to explain. I need a data model similar to this: As you can see, a set can belong to both a user or a school. My problem: It should only be allowed to belong either to a user OR a school. But never both at the same time. How can I solve this problem? 回答1: Your current design is called exclusive arcs where the sets table has two foreign keys, and needs exactly one of them to be non-null. This is one way to implement polymorphic associations, since a given