relational-database

Identifying Functional Dependencies II

怎甘沉沦 提交于 2020-05-12 01:56:13
问题 I was getting a little confused with the last post so I found a nice example which should clear things up. hireDate & carReg are the primary keys. So my question can anyone find any extra functional dependencies other than the ones I have identified below....Modifications also welcome: fd1 carReg -> make, model, outletNo, outletLoc fd2 custNo -> custName fd3 outletNo -> outletLoc fd4 model -> make (only if we assume a model name is unique to a make) fd5 carReg, hireDate -> make, model, custNo

What are some good references for learning relational database design QUICKLY? [closed]

雨燕双飞 提交于 2020-05-09 20:25:34
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . So say you already know how to do basic things with databases e.g. create them...:) and you understand basic concepts like views and joins..and basic SQL syntax....but you just don't feel comfortable that your solutions follow the "best practices" or are even "correct". Where could you

What are some good references for learning relational database design QUICKLY? [closed]

会有一股神秘感。 提交于 2020-05-09 20:25:13
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . So say you already know how to do basic things with databases e.g. create them...:) and you understand basic concepts like views and joins..and basic SQL syntax....but you just don't feel comfortable that your solutions follow the "best practices" or are even "correct". Where could you

Hibernate relation with aggregation

♀尐吖头ヾ 提交于 2020-05-01 02:49:00
问题 @Entity public class Device { private long id; private String deviceName; //column D_NAME private Set<LoginDate> loginDates; } /** Audit table being filled by some other processes on the network */ @Entity public class LoginDate { private long id; //pk private String deviceName; //column D_NAME private Date loginDate; } My aim to display the last login date of the device on the report screens; I have implemented OneToMany relation between Device and LoginDate tables where it is using OrderBy

Hibernate relation with aggregation

删除回忆录丶 提交于 2020-05-01 02:48:24
问题 @Entity public class Device { private long id; private String deviceName; //column D_NAME private Set<LoginDate> loginDates; } /** Audit table being filled by some other processes on the network */ @Entity public class LoginDate { private long id; //pk private String deviceName; //column D_NAME private Date loginDate; } My aim to display the last login date of the device on the report screens; I have implemented OneToMany relation between Device and LoginDate tables where it is using OrderBy

How to design a relational model for double-entry accounting with job costing

核能气质少年 提交于 2020-03-13 06:51:23
问题 I would like to commend to readers for the depth and obvious thought that went into the answers here and here. I stumbled across them while searching for something tangential for a project I'm working on, and I got caught up reading them from top to bottom. I am trying to build a niche-market app using these principles (namely, double-entry accounting), with job-costing thrown in. The above answers have been extremely helpful in reshaping my concept of what both the accounting and the

Advise on database design for a project lifecycle

此生再无相见时 提交于 2020-02-25 13:32:36
问题 In our company, a project begins it's life as a business development which has it's own 3-stage lifecycle. Once the business development ends its lifecycle it may become a full fledged project, which then begins a entirely new 3-stage lifecycle. However sometimes business developments never mature beyond their initial phase into projects. Considering all this, I decided to have a table for Business Developments (BD) and a seperate table for Projects (treating them as seperate entities), each

How do I convert a relational hierarchy to a closure table in MySQL?

ぐ巨炮叔叔 提交于 2020-02-25 05:30:33
问题 I recently started using a closure table, and it was working fine when I had to convert simple parent-child relationships from person to lineage, but now I have to convert grandparent-parent-child and great-grandparent-parent-child relationships, and maybe even longer relationships than that into the closure table. This is the table I need to pull the relationships from: CREATE TABLE `person` ( `person` BIGINT UNSIGNED NOT NULL , `parent` BIGINT UNSIGNED NULL , PRIMARY KEY (`person`) , INDEX

database normalization - merge/combine tables

假如想象 提交于 2020-02-07 06:57:54
问题 Please consider the following scenario. We have a 0NF table StudentTeacherTable: StudentName StudentDepartment StudentDepartmentAdd TeacherName TeacherDepartment TeacherDepartmentAdd John CS London Dave Eng, CS Oxford Mike CS London Dave Eng, CS Oxford Chris Eng Oxford Dave Eng, CS Oxford Ideally after normalization I would like to have tables like Student Table: StudentName Department TeacherName John CS Dave Mike CS Dave Chris Eng Dave Teacher Table: Name Dave TeacherDepartment Table:

database normalization - merge/combine tables

孤街醉人 提交于 2020-02-07 06:57:11
问题 Please consider the following scenario. We have a 0NF table StudentTeacherTable: StudentName StudentDepartment StudentDepartmentAdd TeacherName TeacherDepartment TeacherDepartmentAdd John CS London Dave Eng, CS Oxford Mike CS London Dave Eng, CS Oxford Chris Eng Oxford Dave Eng, CS Oxford Ideally after normalization I would like to have tables like Student Table: StudentName Department TeacherName John CS Dave Mike CS Dave Chris Eng Dave Teacher Table: Name Dave TeacherDepartment Table: