do guys use realtionship diagram?
hi
sorry if off-topic...just curious to know....when designing database using vb6, do u guys set the primary key, use queries, data relationship?(using ms access) cause many of source code ive download not set their primary key and so on.....or can u guys give me an example of source code that using those database stuff...what r the pros and cons of this???
sorry again,im really new into this system development stuff
Re: do guys use realtionship diagram?
Moved To General Developer
No one designs databases using VB6 (or VB anything else for that matter). VB whatever only comes into play after the database is designed, built, and ready to be used.
In my experience, the best tools for designing a database is a piece of paper and a pencil (although markers and a whiteboard also work pretty well .)
Once the design is worked out and finalized, then actually creating the database with whatever tools the DB platform you have chosen provides is fairly quick and easy.
Re: do guys use realtionship diagram?
Tools I've used for DB Design include: pen & paper, pencil & paper, Marker & Whiteboard, Visio and Excel. And yes, it generally includes PKeys, FKeys & Indexes. Sometimes sample items won't include keys and indexes because they are usually isolated sample items, and the code is the important part, not the database.
-tg
Re: do guys use realtionship diagram?
Most of the time I'll scribble a quick overview of the DB on paper or a whiteboard before actually creating the DB, for the larger ones I'll do a diagram in Visio.
Re: do guys use realtionship diagram?
I use a pen/pencil and paper - and make sure it is finished before I start writing any code.
Most tables should have Primary Keys - they stop you from accidentally editing/deleting multiple rows when you intended to work with just one.
For advice on other database related things, and several code examples/tutorials, see our Database Development FAQs/Tutorials (at the top of the Database Development forum)
Re: do guys use realtionship diagram?
Quote:
Originally Posted by
Hack
Moved To General Developer
No one designs databases using VB6 (or VB anything else for that matter). VB whatever only comes into play after the database is designed, built, and ready to be used.
In my experience, the best tools for designing a database is a piece of paper and a pencil (although markers and a whiteboard also work pretty well .)
Once the design is worked out and finalized, then actually creating the database with whatever tools the DB platform you have chosen provides is fairly quick and easy.
Wanted to just add something to this. VS2010 will have Model first support for the Entity Framework where you can design the database in the IDE and then build the DB from that. Just thought it was an important note to mention about how database desing and programming is getting easier and easier all the become blended together.
Now for what is best now. Either Power Designer if you can afford it or Power Architect which is free are good ways to desing a database. We currrently use Power Designer and it is a magnificant tool.
Re: do guys use realtionship diagram?
Quote:
Originally Posted by
techgnome
Tools I've used for DB Design include: pen & paper, pencil & paper, Marker & Whiteboard, Visio and Excel. And yes, it generally includes PKeys, FKeys & Indexes. Sometimes sample items won't include keys and indexes because they are usually isolated sample items, and the code is the important part, not the database.
-tg
thanks mate for the info...but many of source code ive downloaded not using FKey in their db
Re: do guys use realtionship diagram?
Hey,
Well that is a failing of the source code that you are downloading. What samples are you looking at.
Depending on the sample, they may handle the relationships to other tables in code, so they don't need to rely on the database handling the deletion of Foreign Keys elements, but the decision to do that is solely up to the developer. You should decide how you want to do it, but based on the comments above, it is pretty clear which way you should go.
Gary
Re: do guys use realtionship diagram?
VS 2010 will have ADOEF design-first support but that's not something you want to do for enterprise projects - you still want to design your tables and indices first. You know, indexes, but the proper plural for it. Firefox is highlighting indices as an incorrect word.
I also go paper first, then SQL Server and I then use the SQL Server diagram to talk it over with my coworkers.