Click here to Skip to main content
15,887,596 members
Home / Discussions / Database
   

Database

 
GeneralRe: Run correctly from code VB.NET Pin
Richard MacCutchan23-Sep-18 23:11
mveRichard MacCutchan23-Sep-18 23:11 
GeneralRe: Run correctly from code VB.NET Pin
Richard Deeming24-Sep-18 8:13
mveRichard Deeming24-Sep-18 8:13 
AnswerRe: Run correctly from code VB.NET Pin
thatraja23-Sep-18 23:21
professionalthatraja23-Sep-18 23:21 
QuestionHow to retrieve List content in JSP from Hibernate Query Language Pin
Mr ARUL SUJU D15-Sep-18 12:38
Mr ARUL SUJU D15-Sep-18 12:38 
Questionstoring a byte[] array in MongoDB Pin
jkirkerx6-Sep-18 12:42
professionaljkirkerx6-Sep-18 12:42 
AnswerRe: storing a byte[] array in MongoDB [solved] Pin
jkirkerx7-Sep-18 6:53
professionaljkirkerx7-Sep-18 6:53 
GeneralRe: storing a byte[] array in MongoDB [solved] Pin
Nathan Minier11-Sep-18 3:09
professionalNathan Minier11-Sep-18 3:09 
GeneralRe: storing a byte[] array in MongoDB [solved] Pin
jkirkerx13-Sep-18 18:48
professionaljkirkerx13-Sep-18 18:48 
QuestionCreate View from another View Pin
jar86956-Sep-18 1:59
jar86956-Sep-18 1:59 
AnswerRe: Create View from another View Pin
Mycroft Holmes6-Sep-18 12:28
professionalMycroft Holmes6-Sep-18 12:28 
QuestionUnable to Get the Proper Result : SQL Query Help Needed Pin
arulsuju29-Aug-18 12:14
arulsuju29-Aug-18 12:14 
SuggestionRe: Unable to Get the Proper Result : SQL Query Help Needed Pin
Richard Deeming30-Aug-18 1:37
mveRichard Deeming30-Aug-18 1:37 
AnswerRe: Unable to Get the Proper Result : SQL Query Help Needed Pin
Jochen Arndt30-Aug-18 2:04
professionalJochen Arndt30-Aug-18 2:04 
QuestionMongoDB document or model planning, best Pin
jkirkerx23-Aug-18 13:38
professionaljkirkerx23-Aug-18 13:38 
I'll admit I'm terrible at database planning or design, architecture.
I finally got my Angular 6 working, folders and files set, navbars and footers and I'm on seeding MongoDB.

In EF DAL, I was never able to figure out how to make relationships. Another topic later in the future.
But in MongoDB it looks pretty easy.

Past I would create a table called Countries and another table called states, and use a join to link them.
In MongoDB, I can add a field called states.

Should I proceed in the using country model and add the states to that.
Or populate the states separately, and use the country ID's to link them?
I'm looking for best practice here, and perhaps NoSQL is different than SQL in terms of planning and design.
I'm not sure what the future holds for me here, in terms of actually using Countries and States in drop downs.
public class WEBSITE_COUNTRIES
{
    [BsonId]
    [BsonRepresentation(BsonType.ObjectId)]
    public ObjectId InternalId { get; set; }

    public string Id { get; set; }
    public string LongName { get; set; }
    public string ShortName { get; set; }
    public bool Enabled { get; set; }
    public WEBSITE_STATES States { get; set; }
}
public class WEBSITE_STATES
{
    [BsonId]
    [BsonRepresentation(BsonType.ObjectId)]
    public ObjectId InternalId { get; set; }
    public string StateId { get; set; }
    public string CountryCodee { get; set; }
    public string LongName { get; set; }
    public string ShortName { get; set; }
    public bool Enabled { get; set; }

}
If it ain't broke don't fix it
Discover my world at jkirkerx.com

AnswerRe: MongoDB document or model planning, best Pin
jschell23-Aug-18 14:35
jschell23-Aug-18 14:35 
GeneralRe: MongoDB document or model planning, best Pin
jkirkerx24-Aug-18 6:49
professionaljkirkerx24-Aug-18 6:49 
GeneralRe: MongoDB document or model planning, best Pin
jschell25-Aug-18 3:57
jschell25-Aug-18 3:57 
AnswerRe: MongoDB document or model planning, best Pin
dan!sh 23-Aug-18 20:45
professional dan!sh 23-Aug-18 20:45 
GeneralRe: MongoDB document or model planning, best Pin
jkirkerx24-Aug-18 6:50
professionaljkirkerx24-Aug-18 6:50 
GeneralRe: MongoDB document or model planning, best Pin
jschell25-Aug-18 4:00
jschell25-Aug-18 4:00 
AnswerRe: MongoDB document or model planning, best Pin
Nathan Minier24-Aug-18 1:31
professionalNathan Minier24-Aug-18 1:31 
GeneralRe: MongoDB document or model planning, best Pin
jkirkerx24-Aug-18 6:58
professionaljkirkerx24-Aug-18 6:58 
GeneralRe: MongoDB document or model planning, best Pin
jkirkerx24-Aug-18 9:16
professionaljkirkerx24-Aug-18 9:16 
GeneralRe: MongoDB document or model planning, best Pin
Nathan Minier24-Aug-18 9:28
professionalNathan Minier24-Aug-18 9:28 
GeneralRe: MongoDB document or model planning, best Pin
jkirkerx24-Aug-18 10:07
professionaljkirkerx24-Aug-18 10:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.