Dear Finuda Collaborators, I received several questions on the issue of the Finuda database. Thanks exspecially to Ambrogio for constructive criticisms. I shall try and keep this file of Frequently Asked Questions (FAQ) updated on the finuda msql web page. Hope this helps; if not then let me know, and do not forget to Please Enjoy, Stefano ============================================================================== miniSQL The Finuda Database FREQUENTLY ASKED QUESTIONS F A Q sb mar 28 1997 1) WHAT IS miniSQL ? --------------------- miniSQL is a "lightweight database engine", as it self-defines. It is a database using SQL as query language; is used free-of-charge by non-profit organization; runs on most Unix platforms; it does not run on alphaVAXes. Source code is downloaded from an internet site. A discussion list exists for user to exchange problems, suggestions, and so on. 2) WHAT DOES SQL STAND FOR ? ----------------------------- SQL (??? Query Language) is a quite standard language to compose data access requests ("queries") to databases. Many commercial databases running on business machines use SQL. Your bank or your favourite airline probably uses SQL as query language. Typical expression is human-like: SELECT FROM SALARIES COMPANY.EMPLOYEES WHEN AGE>50 AND SEX='MALE' 3) WHERE CAN I FIND A miniSQL MANUAL ? --------------------------------------- The manual is on the Finuda private www server, in the database page. Postscript format. 4) HOW DOES miniSQL WORK ? -------------------------- It works with a client-server structure. A process (server) continuously runs on the Unix machine where the database files are. When you wish to access the database, by invoking msql you create a process (client) which will submit your query to the server. The server receives your query, decodes it, access the files, finds the information, transfers the data to the client. This is done through tcp/ip. 5) WHERE IS miniSQL INSTALLED FOR FINUDA ? ------------------------------------------ Provisionally, miniSQL is installed on hpcalc (V 1.10) and osfin1 (V1.16). Eventually, only one of the Finuda online machines will have miniSQL installed. 6) HOW DO I ACCESS miniSQL ? ----------------------------- Login on osfin1, setup msql as explained in the finuda private page, mSQL release notes on osfin1. Once you have setup, start typing relshow this will tell you what databases exist on osfin1. Then, iterate relshow this will tell you what tables the database is composed of. Yet again relshow this will tell you what fields the table in database in made of. 7)WAIT WAIT WAIT NOW YOU CONFUSED ME. WHAT IS A DATABASE AND WHAT IS A TABLE ? ------------------------------------------------------------------------------ A table is a collection of data divided by rows ("records") and columns ("fields"). Each table can contain a large number of records. Each record is made of many fields. Each field can be either character, or real or integer. Each table belongs to a database. Each database is made of at least one table. Databases are distinct structures, they do not talk each other. An example may be the STRAW database, the DRIFT database, the official FINUDA database. The FINUDA database can contain the ADC table and the TDC table. And also the HV table. You can make a query selecting fields belonging to differente tables within the SAME database. You cannot relate tables belonging to different databases. 8)ANYBODY CAN READ/WRITE ANY DATABASE ? --------------------------------------- This should be decided. mSQL provide tools to set Access Control Lists for each database. It may be necessary to set up such control lists. 9) MAY I ACCESS THE FINUDA DATABASE FROM MY HOME INSTITUTION ? -------------------------------------------------------------- Yes, in principle you can, although it can be very slow. 10) CAN I ACCESS mSQL FROM A TASK ? ------------------------------------ Yes, of course, you can write a program using subroutines describe in the manual, to performe any query that you might performe interactively. 11) WHAT IS FILU ? ------------------ Filu is a menu-driven interface which makes unnecessary even to learn SQL language to performe simple to fairly complicated queries to SQL. It has been written by Lu Jie during her stay in Frascati. It is being used since more than one year by the strawtube people for production and testing. Again, refer to the web page for release notes and user's manual. 12) IS IT TRUE THAT REAL TYPE FIELDS ARE NOT SUPPORTED ON HPCALC ? ------------------------------------------------------------------- Yes, mSQL v-1.10 has a bug on HP machines and crashes if Real type fields are used. mSQL V-1.16 is ok on osfin1. 13) HOW DO I CREATE A DATABASE ? -------------------------------- Just type > msqladmin create 14) HOW DO I CREATE A TABLE ? ----------------------------- Enter the msql monitor > msql and type the command, look in the user's manual. Or, run filu and select option "create table". 15) HOW DO I DELETE A DATABASE ? -------------------------------- Only the administrator can do it. You do not need to know how. 16) WHO IS THE ADMINISTRATOR ? ------------------------------ In our implementation, administrator "root user" is the finuda username. 17) I TRIED TYPING msql mydatabase AND IT ANSWERED "Can't connect to msql server". ------------------------------------------------------------------------- This means the server process has died (see FAQ n.4). To fire it up, type >msqld& 18) WHO SHOULD I BOTHER WHEN I FIND PROBLEMS WITH mSQL? ---------------------------------------------- As of today, send e-mail to benussi@lnf.infn.it and bianco@lnf.infn.it 19) WHO SHOULD I BOTHER WHEN I FIND PROBLEMS WITH filu? ---------------------------------------------- As of today, send e-mail to benussi@lnf.infn.it and bianco@lnf.infn.it and lujie@lnf.infn.it somebody will answer, maybe.