infinity86 Posted January 25, 2009 Share Posted January 25, 2009 i am trying to build a dictionary from scratch but doesnt really know what applications are best for this, and also need to know the foundation/the starting point... i would very much appreciate it if anyone can help with this.Thnaks very much in advance Link to comment Share on other sites More sharing options...
justsomeguy Posted January 25, 2009 Share Posted January 25, 2009 That's pretty vague. How does one build a dictionary from scratch? Don't you need a list of words and definitions first? Do you have any more details about what you're trying to do? Link to comment Share on other sites More sharing options...
jeffman Posted January 25, 2009 Share Posted January 25, 2009 You'll probably want to store your data in a database rather than a flat file. The DB will use built-in indexing methods to speed up the search.But first, you'd better design your user interface, the HTML portion. Just the bare bones (don't worry about CSS yet), but you should have an excellent idea about inputs and outputs. Knowing that will help you design the database itself. Link to comment Share on other sites More sharing options...
infinity86 Posted January 26, 2009 Author Share Posted January 26, 2009 That's pretty vague. How does one build a dictionary from scratch? Don't you need a list of words and definitions first? Do you have any more details about what you're trying to do?Thanks justsomeguy appreciate it...well i kind of started writing words and the definitions and saved it as a text file, other than that im lost and don't have any clue of what to do next.The dictionary would have a search box where a user can search for a particular word as well as listing all the words and their translation alphabetically ofcourse. Link to comment Share on other sites More sharing options...
justsomeguy Posted January 26, 2009 Share Posted January 26, 2009 OK, that's a pretty basic database application then. It sounds like you really only need 1 table for the definitions, 1 table for users (if you want to be able to log in and add new words), and a third table if you want to link multiple languages together. So the definition table could contain English definitions and words, and the third table would contain a translated word and link to the English word.The word table should have 1 column that is an auto-increment column for an ID, then a column for the word (a varchar column), then a text column for the definition. The translation table would need an auto-increment ID, varchar word column, a column to say which language it's in, and an integer column to hold the ID number of the English word that is the translation.Have you worked with databases before? If you haven't you'll want to read through the database tutorials on the w3schools site, about how to select and insert data. Other than that, most of the application is designing the form to add words, the search form, etc. Link to comment Share on other sites More sharing options...
infinity86 Posted January 26, 2009 Author Share Posted January 26, 2009 OK, that's a pretty basic database application then. It sounds like you really only need 1 table for the definitions, 1 table for users (if you want to be able to log in and add new words), and a third table if you want to link multiple languages together. So the definition table could contain English definitions and words, and the third table would contain a translated word and link to the English word.The word table should have 1 column that is an auto-increment column for an ID, then a column for the word (a varchar column), then a text column for the definition. The translation table would need an auto-increment ID, varchar word column, a column to say which language it's in, and an integer column to hold the ID number of the English word that is the translation.Have you worked with databases before? If you haven't you'll want to read through the database tutorials on the w3schools site, about how to select and insert data. Other than that, most of the application is designing the form to add words, the search form, etc.It sounds quite simple then... :)I have worked with Databases before and have quite a good knowledge on the use of MYSQL, but im not sure whether it supports Arabic language as my dictionary is based on translating English words into Arabic. Link to comment Share on other sites More sharing options...
jlhaslip Posted January 26, 2009 Share Posted January 26, 2009 Set the Character Encoding to UTF-8 and you should not have a problem with multiple languages in the same Database. Link to comment Share on other sites More sharing options...
infinity86 Posted February 2, 2009 Author Share Posted February 2, 2009 Thanks guys for your help... really appreciate it Link to comment Share on other sites More sharing options...
infinity86 Posted February 5, 2009 Author Share Posted February 5, 2009 Set the Character Encoding to UTF-8 and you should not have a problem with multiple languages in the same Database.How do you set the character encoding to UTF_8? and does it support farsi/arabic language?i tried this but came up with an error shown below... create table dari( -> d_id int(5)NOT NULL auto_increment, -> id int(5) NOT NULL, -> word varchar(100), -> def varchar(100), -> PRIMARY KEY (d_id), -> FOREIGN KEY (id) references englishwords(id) -> ) -> ENGINE=MyISAM DEFAULT CHARSET=utf8 CLLATE=utf8_persian_ci;ERROR 1064: You have an error in your SQL syntax near 'ENGINE=MyISAM DEFAULT CHARSET=utf8 CLLATE=utf8_persian_ci' at line 9 Link to comment Share on other sites More sharing options...
jlhaslip Posted February 5, 2009 Share Posted February 5, 2009 Mis-spelling on COLLATE.http://dev.mysql.com/doc/refman/5.1/en/charset-table.html Link to comment Share on other sites More sharing options...
infinity86 Posted February 10, 2009 Author Share Posted February 10, 2009 Mis-spelling on COLLATE.http://dev.mysql.com/doc/refman/5.1/en/charset-table.html Thanks for the link...I followed that example given on that link u gave me, but unfortunately i get the same error message. I researched about it quite alot but found nothing useful to help me on that matter. any alternative ways of doing it? Link to comment Share on other sites More sharing options...
justsomeguy Posted February 10, 2009 Share Posted February 10, 2009 Leave out the foreign key constraints. MyISAM tables do not support foreign key constraints currently. It's not going to cause an error, it's just going to be ignored, but at least remove it from the query so we know it's not the problem. create table dari(d_id int(5) NOT NULL auto_increment,id int(5) NOT NULL,word varchar(100),def varchar(100),PRIMARY KEY (d_id))ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci; http://dev.mysql.com/doc/refman/5.1/en/ans...reign-keys.html Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.