Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 515237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:36:27+00:00 2026-05-13T07:36:27+00:00

where can i learn more abt creating database markup in yaml and data fixtures.

  • 0

where can i learn more abt creating database markup in yaml and data fixtures.

i followed a tutorial and they create a relationship like so: under relations in both User and Car. my qn is why is ‘type: many’ in Car. can i have it in User instead (just curious)?

abt data types. different database have different database support. i thought that in MySQL (InnoDB as used here) integer shld be tinyint(x), bigint(x), int(x) … or string shld be varchar not string? isit not strict what i shld use here?

options:
  type: INNODB
  collate: utf8_general_ci
  charset: utf8

User:
  columns:
    id:
      type: integer
      primary: true
      autoincrement: true
    name: string(300)
    email: string(300)
    phone: string(9)
    car_id: integer
  relations: 
    Car: 
      local: car_id
      foreign: id
Car:
  columns:
    id:
      type: integer
      primary: true
      autoincrement: true
    brand: string(300)
  relations:
    Users:
      class: User
      foreign: car_id
      local: id
      type: many

UPDATE 1

  1. “it is only necessary to specify the relationship on the end where the foreign key exists” in my example, that will be? do they mean the FK table (car) or the FK column (user)?

  2. i dont see TEXT data type, is that clob (Character Large OBject)? – iceangel89 0 secs ago [delete this comment]

  3. what is foreignAlias? is there a alias too?

UPDATE 2

this will be abit long, i just wish to clarify some of the code examples in the Doctrine YAML Schema Files docs page. focus on the relationships section -> in // comments

User:
  columns:
    username:
      type: string(255)
    password:
      type: string(255)
    contact_id:
      type: integer
  relations:
    Contact:
      class: Contact // if the table is named Contact, class will be Contact also?
      local: contact_id 
      foreign: id
      foreignAlias: User // whats alias for? 
      foreignType: one // one contact ... to ...
      type: one // one user?

Contact:
  columns:
    first_name:
      type: string(255)
    last_name:
      type: string(255)
    phone:
      type: string(255)
    email:
      type: string(255)
    address:
      type: string(255)
  relations:
    User:
      class: User
      local: id
      foreign: contact_id
      foreignAlias: Contact
      foreignType: one
      type: one

regarding the many to many example, what does the following mean?

attributes:
  export: all
  validate: true

tableName: group_table

refClass: GroupUser
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:36:27+00:00Added an answer on May 13, 2026 at 7:36 am

    where can i learn more abt creating database markup in yaml and data fixtures.

    Doctrine manual, “YAML schema files” and “Data Fixtures” chapters.

    can i have it in User instead (just curious)?

    Yes, but this section will be called foreignType then. Here, an example:

    User:
      columns:
        id:
          type: integer
          primary: true
          autoincrement: true
        name: string(300)
        email: string(300)
        phone: string(9)
        car_id: integer
      relations: 
        Car: 
          local: car_id
          foreign: id
          foreignType: many
    

    abt data types…

    Well, Doctrine column types and database column types are “slightly” different. Just compare list of Doctrine column types and, say, MySQL’s one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 262k
  • Answers 262k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer A cron daemon fulfills this purpose on unix-derived platforms. You… May 13, 2026 at 11:43 am
  • Editorial Team
    Editorial Team added an answer Personally, I'd probably go with simplicity in this case. Load… May 13, 2026 at 11:43 am
  • Editorial Team
    Editorial Team added an answer I may be misunderstanding your question, but it seems like… May 13, 2026 at 11:43 am

Related Questions

I do not understand pointers. Where can I learn more about them?
I recently read through Code Complete, and it recommends that I create a project
I am experimenting with Intraweb right now, for a few small personal-use web apps
Consider: var something = { wtf: null, omg: null }; My JavaScript knowledge is
I have a array that looks like this Array ( [provider] => Array (

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.