I wonder how to construct mysql DB for school diary.
It will contain info for the students of some class,assessments on their school subjects(math,english and etc.) and school notes.
But for class of 30 students I can't figure out the best solution for constructing the DB.
Can you give me some advices?
Yes,
Read about ER (Entity Relationships' models).
Think how you would organize your data.
Read about foreign keys.
Apply acquired knowledge to design the database.
Implement database design in MySQL RDBMS.
If you wish, there are already some tools that will help you in creating database structure, such as Enterprise Architect (paid one) or MySQL Workbench (it is free, I believe).
you need an admin tool like phpMyAdmin or the MySQL tool that is available at the MySQL.com site (see downloads). i can't recommend any books for learning database design and it's not a trivial matter that can be condensed into a few paragraphs. you might take a look at this ... http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html
good luck
Related
I need to create an ERD of my access database relationships & tables, Do I need to create it manually or is it possible to upload the access file to some website/software that makes it manually?
Commercial products like SAP PowerDesigner, ERWin, DeZign can reverse databases to ER diagrams. Most of them have trial versions, they may be useful if it's one time task.
You can also look for open source products like Dia. Dia cannot reverse databases by itself, but there are a lot of plugins for it like AutoDia, they may help with reverse engineering.
We are embarking upon a Legacy Data Migration project, and in the process of understanding our source database better, we are trying to build a db model out of it.
We dont have any information about the Primary/foreign keys in the db. We are still mining the COBOL code to understand the business better.
However, in our quest to build the db model, we are trying to see if tools like ErWin or PowerDesigner or others can help us "guess" the relationships based on column names etc. I have the community edition downloaded, and trying the reverse engineering process to see if we can get some worthwhile output, before I go and ask my manager to requisition the purchase of the tool.
So far, I have not got any success with that. Tried the option wherein it asks about finding relationships using Index / Name, chose name there, but nothing so far.
Could it be that its possible, but I am missing something ?
Is it altogether possible to guess the relationships based on column names ?
Can any other tool do this job ??
Any help is appreciated...
You should be able to reverse engineer from the DB2 table directly into ERWIN.
You only need a connection to DB2 or get the z/Os dba to provide you with the DDL.
I do not think guessing the relationships is a very good idea when all the information you need is in the DB2 catalog tables. Talk to you DBA.
Can you provide some more information / examples. In Cobol there is often a naming convention
(e.g. A Table-Id is included in field names at the start / end of the field name) in which
case
T1234_Product_code
is equivalent to
T1323_Product_ID
T1245_Product_Code
I suggest investigating (if you have not already) any naming convention.
I am trying to create an Entity-Relationship Diagram by reverse engineering a MySQL database using a .SQL file. The process has been successful, using MySQL WorkBench and Toad Data Modeler. However, the diagram that both tools generate does not show the relationships between entities. So the diagram is of little use.
Having asked the software's technical support team why this is so, the reply is that they have used ADODB as a database abstraction layer in order to support several DBMSs, and ADODB doesn't explicitly define foreign keys. My question is, is there a tool that can generate these relationships by making guesses related to column names etc.?
They also mention that they use an XML descriptor to view the database structure. So is it possible to generate a diagram from the XML document?
I would generally create the ERD myself, but the database contains 99 tables and would be an extremely tedious process.
Thanks a lot,
Amy
Another is ERWin by CA. Its fanatastic tool to reverse and forward engineer databases and can infer relationships from column names. Its very costly though, i have used the trial version.
I have found the answer to my question:
In Toad Data Modeler, there is a function that infers the relationships between tables based on field names etc. In the Menu, it is under Macros -> All -> Infer Relationship.
I haven't checked that the relationships are completely accurate, but it appears to have worked well.
Thanks,
Amy
I am currently developing a business application that will ultimately be hosted at a .Net hosting company. The hosting company provides 1 MSSQL DB (with 2 users) and an unlimited number of MySQL DBs. Purchasing a second MSSQL DB is out of the question as my boss doesn't want to pay any more for the hosting. I am trying to determine the best place to house the ASPNETDB for site authentication and roles.
My first thought was to take advantage of one of the MySQL DBs for this purpose but have noticed that it appears to take some hoop jumping to accomplish this option. Another option may be to keep the ASPNETDB in a Express DB file.
Finally, I have also thought about housing it in the MSSQL DB with the application tables. This option scares me because if I accidentally screw something up in the application, the ASPNETDB tables could be open to SQL injection. Of course, I will do my best to ensure this won't happen anyway, but would like to know I have that extra layer of security knowing it is housed in its own DB.
The hosting company does allow two MSSQL DB users, so this in theory would allow me to have one user dedicated to authentication and restrict the other user from being able to access the ASPNETDB tables all together.
As a fellow developer, what method would you recommend? Thanks in advance for your help.
Use the MSSQL DB and use the preconfigured ASP.NET Membership provider and Roles provider. This is the easiest method. Restrict Table level access and use only Stored Procedures.
Sounds like you are a bit green to this stuff, am I correct? Because of that dont create too many headaches for your self. Dont try to put it in mysql, thats a mistake. I know its free, but it was written to work with MSSQL. Yes, using the other user is a good idea. Just be sure to sanitize your inputs and use properties on your SQL statements or better yet use an ORM like entity framework or Linq to SQL at the least.
I have so many tables and FK relationships it is hard to keep track and visualze it all. Speard across multiple excel documents. I have it already entered in mysql but I want to output a data model diagram that links tables together along with all the FKs.
How to do it apart from manually having to do it? I am open to 3rd part tools as long as they are free.
Well I am using phpMyAdmin on my local server.
phpMyAdmin 3 has this Designer feature that shows you the linkages between various tables and its columns.
Take a look at the MySQL Workbench.
It's a free tool and offers a few nice features like forward and backward engineering and database synchronisation. I has a few bugs, but its the best tool for MySQL I know so far.