erd

Equivalent of ERD for MongoDB?

放肆的年华 提交于 2019-12-18 12:04:10
问题 What would be the equivalent of ERD for a NoSQL database such as MongoDB? 回答1: It looks like you asked a similar question on Quora. As mentioned there, the ERD is simply a mapping of the data you intend to store and the relations amongst that data. You can still make an ERD with MongoDB as you still want to track the data and the relations. The big difference is that MongoDB has no joins, so when you translate the ERD into an actual schema you'll have to make some specific decisions about

The right way in designing a database

喜欢而已 提交于 2019-12-13 17:15:22
问题 I started my first MySQL project designing the ERD, logical and physical diagrams. A friend of mine is making the same project as me. I started the plan of my databases by making an ERD and then normalizing. However, he uses a relational database diagrams where he designs interfaces and other parts first before making the ERD. He for example writes "stack" only to the column phonenumbers, instead of making a "help-table".He says that it is best to make the interfaces first and then make the

Entity Relationship Model for Student / Advisor application

故事扮演 提交于 2019-12-13 15:44:11
问题 I'm building a web application concerns a student and an adviser. The student will select his independent study and an adviser will supervise it. I am struggling to find the correct relationship for my program. Basically the actors in my application are. a Student can select 1 independent study. a Student can only have 1 Adviser. an Adviser can supervise multiple Students. a coordinator can be an adviser also My attempt to make ERD for my application. Student - > Adviser (1 to many)

What is the PK and FK i should assign to my table?

假如想象 提交于 2019-12-13 10:08:14
问题 A company provides transport services to high-ranked staffs. There are 3 tables: DRIVERS, VEHICLES, STAFFS. DRIVERS - license number [PK] - name - language spoken - ... (and so on..) VEHICLES - vehicle ID [PK] - registration number - model - colour - ... and so on... STAFFS - staff ID [PK] - name - position name - ... and so on.... I want to create a new table called ORGANIZE whereby, it will assign a driver and a vehicle to match the needs of the staff. what will be the PK and FKs? 回答1: I've

Struggling with custom SQL query

旧城冷巷雨未停 提交于 2019-12-13 09:54:56
问题 I have to make a query to: show a view which shows the results of counting all the employee dedications per employee area, listed by the area names in alphabetical order. $this->db->query('create temporary table temp as (select dedication.employee_employeeID, dedication ID, COUNT(area) AS TotalFrequency from dedication, employees where dedication.employee_employeeID = dedication group by dedication.employee_employeeID)'); However, doesn't seem to be working on my website? here is my

How to join section table with ERDigram

本秂侑毒 提交于 2019-12-13 08:08:29
问题 Problem Which is correct when join section table with class table OR with course table OR with instructor Table . Details section is group of student classified to ( aa,bb,cc )can take one course or more courses. section can teach in one or more class(lab or class room) . Instructor can teach to more sections and section can have more instructor raltion is many to many and made in third table Inst_Course My ER diagram as following : section table join Database Schema as following : CREATE

SQL Server Bulk Insert with FOREIGN KEY parameter (not existant in txt file, ERDs included)

戏子无情 提交于 2019-12-13 04:11:59
问题 Okay so I have a table ERD designed like so... for regular bulk inserts (source: iforce.co.nz) And a tab delimited \t text file with information about each customer (consists of about 100,000+ records). # columnA columnB columnC data_pointA data_pointB data_pointC And a stored procedure that currently does its intended job fine. CREATE PROCEDURE import_customer_from_txt_para @filelocation varchar(100) AS BEGIN TRUNCATE TABLE dbo.[customer_stg] DECLARE @sql nvarchar(4000) = ' BULK INSERT

To get primary and foreign keys right in ERD

心不动则不痛 提交于 2019-12-13 03:58:16
问题 I read my notes and I am now unsure about the keys. My logical diagram alt text http://files.getdropbox.com/u/175564/db/db-11.png This table should be in line with the following physical ERD alt text http://files.getdropbox.com/u/175564/db/db-22.png I have only one foreign key in the table Question . I would like to know should the question-id and question-tag in the table Question-tag-xref , AND question-id and answer in the table Answers be also foreign keys? 回答1: Masi - Logical models don

What is the right way to use Associative Entity?

。_饼干妹妹 提交于 2019-12-13 03:11:23
问题 This is the description: Draw an Entity-Relationship diagram for Poke-Hospital which provides medical service to pokemon. Each pokemon has an appointment with one of the nurse Joys. In addition to recording the name, type and trainer of each pokemon, the system needs to keep track of the multiple types of sickness being diagnosed for the pokemon. During an appointment, the nurse will always prescribe medicine. It is required to record the date, time and dosage of the medicine. A pokemon may

how do I design intermittent via points for travel itinerary

此生再无相见时 提交于 2019-12-13 02:57:52
问题 I am trying to design the backend and have the following use case. I have flight information from point A to B and need to define a schema which supports different use cases. I'm trying to find a good way to handle the case, when there are stopover via points. For e.g. flight route for A -> B actually looks like this: A -> C C -> D D -> B so A -> B is one entity, but in turn, it is comprised of several legs. My current design: AirLeg table: - id - departure and arrival information - viaPoints